Skip to content

Commit a402a00

Browse files
authored
Rollup merge of rust-lang#96900 - GuillaumeGomez:fix-js-error, r=notriddle
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`
2 parents c5d946d + fe4fa53 commit a402a00

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/librustdoc/html/static/css/rustdoc.css

-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ li {
331331
nav.sub {
332332
position: relative;
333333
font-size: 1rem;
334-
text-transform: uppercase;
335334
}
336335

337336
.sub-container {

src/librustdoc/html/static/js/source-script.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// From rust:
2-
/* global search, sourcesIndex */
2+
/* global sourcesIndex */
33

44
// Local js definitions:
55
/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */
@@ -69,7 +69,6 @@ function createDirEntry(elem, parent, fullPath, currentFile, hasFoundFile) {
6969
files.appendChild(file);
7070
}
7171
}
72-
search.fullPath = fullPath;
7372
children.appendChild(files);
7473
parent.appendChild(name);
7574
parent.appendChild(children);

src/test/rustdoc-gui/sidebar-source-code-display.goml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ assert-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
1515
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "hidden", "opacity": 0})
1616
// Let's expand the sidebar now.
1717
click: "#sidebar-toggle"
18-
// Because of the transition CSS, better wait a second before checking.
18+
// Because of the transition CSS, we check by using `wait-for-css` instead of `assert-css`.
1919
wait-for-css: ("#sidebar-toggle", {"visibility": "visible", "opacity": 1})
20-
assert-css: (".sidebar > *:not(#sidebar-toggle)", {"visibility": "visible", "opacity": 1})

0 commit comments

Comments
 (0)