Skip to content

Commit

Permalink
Rollup merge of #96900 - GuillaumeGomez:fix-js-error, r=notriddle
Browse files Browse the repository at this point in the history
Fix js error

On the source code pages, we get a JS error:

![Screenshot from 2022-05-10 16-26-53](https://user-images.githubusercontent.com/3050060/167656292-51e0b0e9-6b0c-4f94-82e0-dd8fb77adf52.png)

It's fixed in the first commit. The second one is removing an unused CSS rule and the third one is a little cleanup of a GUI test.

cc ``@jsha``
r? ``@notriddle``
  • Loading branch information
JohnTitor authored May 11, 2022
2 parents 7bf795b + fe4fa53 commit 95b2d37
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ li {
nav.sub {
position: relative;
font-size: 1rem;
text-transform: uppercase;
}

.sub-container {
Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/html/static/js/source-script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// From rust:
/* global search, sourcesIndex */
/* global sourcesIndex */

// Local js definitions:
/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */
Expand Down Expand Up @@ -69,7 +69,6 @@ function createDirEntry(elem, parent, fullPath, currentFile, hasFoundFile) {
files.appendChild(file);
}
}
search.fullPath = fullPath;
children.appendChild(files);
parent.appendChild(name);
parent.appendChild(children);
Expand Down
3 changes: 1 addition & 2 deletions src/test/rustdoc-gui/sidebar-source-code-display.goml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ assert-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "hidden", "opacity": 0})
// Let's expand the sidebar now.
click: "#sidebar-toggle"
// Because of the transition CSS, better wait a second before checking.
// Because of the transition CSS, we check by using `wait-for-css` instead of `assert-css`.
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "visible", "opacity": 1})

0 comments on commit 95b2d37

Please sign in to comment.