about summary refs log tree commit diff
path: root/tests/rustdoc-gui/javascript-disabled.goml
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-07 18:12:54 +0200
committerGitHub <noreply@github.com>2024-05-07 18:12:54 +0200
commit7af9ad1465c32eaa6abdd4469161042467ad01ec (patch)
tree5c5e941b4baeb06d583c2f7f41b118e2802ad9c4 /tests/rustdoc-gui/javascript-disabled.goml
parentcc8d9b692720c7d15445024485c4bbfce35dbce6 (diff)
parent926281619479776ab56870424c16a8a968ed637d (diff)
Rollup merge of #124738 - notriddle:notriddle/search-form-js, r=GuillaumeGomez
rustdoc: dedup search form HTML

This change constructs the search form HTML using JavaScript, instead of plain HTML. It uses a custom element because

- the [parser]'s insert algorithm runs the connected callback synchronously, so we won't get layout jank
- it requires very little HTML, so it's a real win in size

[parser]: https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token

This shrinks the standard library by about 60MiB, by my test.

There should be no visible changes. Just use less disk space.
Diffstat (limited to 'tests/rustdoc-gui/javascript-disabled.goml')
-rw-r--r--tests/rustdoc-gui/javascript-disabled.goml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/rustdoc-gui/javascript-disabled.goml b/tests/rustdoc-gui/javascript-disabled.goml
index a7579ef7ec1..c6a7ad94b3f 100644
--- a/tests/rustdoc-gui/javascript-disabled.goml
+++ b/tests/rustdoc-gui/javascript-disabled.goml
@@ -4,7 +4,7 @@ javascript: false
 
 go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
 show-text: true
-assert-css: (".sub", {"display": "none"})
+assert-false: ".sub"
 
 // Even though JS is disabled, we should still have themes applied. Links are never black-colored
 // if styles are applied so we check that they are not.