Skip to content

The design language that makes your AI harness better at design.

JavaScript

A stuck preloader that lets clicks pass through is still on top

Paul Bakausacc199c15e82
diff --git a/crates/browser/src/overlays.rs b/crates/browser/src/overlays.rs
index 4e1b86812..34235d755 100644
--- a/crates/browser/src/overlays.rs
+++ b/crates/browser/src/overlays.rs
@@ -147,8 +147,23 @@ pub fn preloader_js() -> String {
}}
}}
if (!opaque) continue;
- // On top: every probe point lands on the layer or inside it.
- if (!points.every(([x, y]) => {{ const hit = document.elementFromPoint(x, y); return !!hit && (hit === el || el.contains(hit)); }})) continue;
+ // On top: every probe point lands on the layer or inside it. Hit
+ // testing skips a layer with `pointer-events: none` (clicks pass
+ // through while it paints), so it is made hit-testable for the probe
+ // and put back in the same task, before anything paints.
+ const passThrough = cs.pointerEvents === 'none';
+ const pe = [el.style.getPropertyValue('pointer-events'), el.style.getPropertyPriority('pointer-events')];
+ if (passThrough) el.style.setProperty('pointer-events', 'auto', 'important');
+ let onTop;
+ try {{
+ onTop = points.every(([x, y]) => {{ const hit = document.elementFromPoint(x, y); return !!hit && (hit === el || el.contains(hit)); }});
+ }} finally {{
+ if (passThrough) {{
+ if (pe[0]) el.style.setProperty('pointer-events', pe[0], pe[1]);
+ else el.style.removeProperty('pointer-events');
+ }}
+ }}
+ if (!onTop) continue;
// Not a gate or a dialog: no control, link, frame or dialog inside.
if (el.matches('[role=dialog], [role=alertdialog], [aria-modal=true], dialog')) continue;
if (el.querySelector('a[href], button, input:not([type=hidden]), select, textarea, iframe, [role=button], [role=dialog], [role=alertdialog], [aria-modal=true], dialog, [contenteditable=""], [contenteditable=true]')) continue;
diff --git a/crates/browser/tests/overlay_hiding.rs b/crates/browser/tests/overlay_hiding.rs
index 99b70b27b..6a20b227e 100644
--- a/crates/browser/tests/overlay_hiding.rs
+++ b/crates/browser/tests/overlay_hiding.rs
@@ -6,7 +6,8 @@
//! finding carries `overlaysHidden`, and the body classes that took the page
//! out of hit tests are removed; with `keep_overlays` (the CLI's
//! `--no-overlay-hiding`) the tour stays and its popover text is scored.
-//! - A preloader that never clears is waited for, then hidden and recorded.
+//! - A preloader that never clears is waited for, then hidden and recorded,
+//! one that lets clicks pass through (`pointer-events: none`) included.
//! - A preloader that clears on its own is waited for and nothing is hidden.
//! - A routing gate on a full-screen opaque layer named like a loader stays:
//! it holds controls, so it is not a preloader.
@@ -46,7 +47,13 @@ fn handle(mut stream: TcpStream) {
.and_then(|l| l.split_whitespace().nth(1))
.unwrap_or("/")
.to_string();
- let body = std::fs::read(fixtures_dir().join(path.trim_start_matches('/'))).unwrap_or_default();
+ // Only files in the fixture directory: no `..` segment, no absolute path.
+ let rel = path.trim_start_matches('/');
+ let body = if rel.split('/').any(|seg| seg == ".." || seg.contains('\\')) {
+ Vec::new()
+ } else {
+ std::fs::read(fixtures_dir().join(rel)).unwrap_or_default()
+ };
let head = format!(
"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: {}\r\nConnection: close\r\n\r\n",
body.len()
@@ -174,6 +181,21 @@ fn a_stuck_preloader_is_waited_for_then_hidden() {
assert!(!has(&flagged(&kept), "low-contrast", "#covered-copy"), "{kept:#?}");
}
+#[test]
+fn a_stuck_preloader_clicks_pass_through_is_hidden_too() {
+ let Some(engine) = engine() else { return };
+ let port = serve();
+ let url = format!("http://127.0.0.1:{port}/preloader-pass-through.html");
+ let mut browser = engine.launch().expect("launch");
+ let (findings, evidence) =
+ detect_url_evidence(&mut browser, &url, &ScanOptions::default(), "load", 100, &EvidenceRequest::default())
+ .expect("scan");
+ browser.close();
+ assert!(has(&flagged(&findings), "low-contrast", "#covered-copy"), "{findings:#?}");
+ let report = evidence.overlays.as_ref().expect("overlay report");
+ assert_eq!(report.hidden, vec![hidden("preloader", "div#preloader")]);
+}
+
#[test]
fn a_preloader_that_clears_is_waited_for_and_nothing_hidden() {
let Some(engine) = engine() else { return };
diff --git a/docs/CLI-CONTRACT.md b/docs/CLI-CONTRACT.md
index 0fef038b6..3e2952e71 100644
--- a/docs/CLI-CONTRACT.md
+++ b/docs/CLI-CONTRACT.md
@@ -363,7 +363,7 @@ Optional keys added later by engines (appended after the above): `ignoreValue` (
- **Page validity gate.** After `goto` (and settle), before injecting anything, the engine classifies the page (`crates/browser/src/validity.rs`) from the main document's final CDP response and an in-page probe (title, visible text length, final URL, challenge-widget markers). Challenge: an `x-amzn-waf-action` header, `cf-mitigated: challenge`, a final URL on a challenge-only host (`perfdrive.com`, `captcha-delivery.com`), or, on a page with at most 3000 characters of visible text, a challenge title prefix ("Just a moment", "Attention Required! | Cloudflare", "Human Verification", "Access Denied", "Radware Bot Manager", "Captcha", ...) or a full-page widget marker (Cloudflare challenge form, PerimeterX, DataDome, Imperva, Akamai, AWS WAF, slider captchas). On a page of any size, a bot manager's challenge sheet laid over the rendered page is a challenge too: HUMAN Security's (PerimeterX's) "Press & hold" check, `#px-captcha-modal` or `#px-captcha-wrapper`, while it is showing (not `display: none`, not `visibility: hidden`, opacity over 0.02) and covers at least half the viewport; the signal reads `overlay human-press-and-hold`, and the probe records `overlays` only when one shows. HTTP error: a final status >= 400 with no challenge signal. A blocked page throws `the page is a bot challenge, not the site (<signals>). Findings would describe the challenge page, so none are reported.` or `the page returned an error (HTTP <status>). Findings would describe the error page, so none are reported.`, which the CLI prints as `Error: ...` and counts as an operational failure (exit 1). A `file://` load has no response, so only the probe signals apply.
Consent wall: a page where a known consent manager (next item) is showing (its text counted with the text of open shadow roots under its roots, where Usercentrics renders), hiding it would leave next to nothing (fewer than 20 visible characters outside its roots, and no visible form control (`input` other than hidden, `select`, `textarea`, `button`) and no `img`, `svg`, `video`, `canvas`, `iframe`, `object` or `embed` of 10,000 square pixels or more outside them), and the manager holds at least 100 characters. It throws `the page is a consent wall, not the site (consent manager <names>, <n> of <total> visible characters outside it, no control or image outside it). Findings would describe the consent dialog, so none are reported.` A short page under an ordinary banner (a sign-in form, a splash page with a button, an image-first page) is scanned. The probe runs before any banner is hidden, and again before the hide pass after the reveal sweep, so a wall that arrives after load is refused too (the evidence then carries that later probe). With `--no-consent-hiding` the gate is off and the page is scanned with its banner, which is what that flag asks for. The probe object (evidence) carries `consent` (the names of the managers showing), `consentChars` (visible characters inside them) and `consentOutside` (visible controls and sizable media outside them, counted up to 20).
- **Consent banners** (Rust engine). A consent banner covers copy a visitor reads once they dismiss it: text under it was skipped as covered or scored against the banner, and the banner's own text was scored as the site's. After the validity gate, again after the reveal sweep (so a banner injected after load or on the first scroll is caught before the capture), and once more right after the capture (when that pass changes the page, the page is captured again, so the capture, the live hit tests and the pixel reads agree), the engine hides the roots and backdrops of the consent managers in `crates/browser/src/consent.rs`: OneTrust, Cookiebot, Usercentrics, TrustArc, Didomi, Quantcast Choice, Sourcepoint, Osano, the open-source Cookie Consent library, CookieYes, Complianz, iubenda, Termly, Axeptio, Borlabs Cookie (its box, its floating `#BorlabsCookieWidget` and its `#BorlabsDialogBackdrop`), Klaro, Cookie Notice, Shopify's privacy banner, consentmanager (`#cmpwrapper`, the host of the open shadow root its box renders in, and `#cmpbox`), and Google Funding Choices. Selectors are the vendor's own ids and classes, never a generic word, so a notice a site wrote for itself stays on the page and is scanned. Hiding is one injected `<style id="impeccable-consent-hide">` of `display: none !important` rules (plus an inline `display: none !important` on a matched element whose own inline style outranks the rule); nothing is clicked and no cookie or consent state is set. The scroll lock is undone only where the manager applied it: its own lock classes on `<html>` / `<body>` (Didomi `didomi-popup-open`, Sourcepoint `sp-message-open`) are removed, the `aria-hidden="true"` a manager put on the page behind its dialog is removed from exactly the elements it marked (Borlabs Cookie marks them `data-borlabs-cookie-aria-hidden`; reported in `unlocked` as `aria-hidden [<mark>]`), and an inline `overflow` / `overflow-y: hidden` on `<html>` or `<body>` is removed only while that manager's backdrop was showing the page is not an app shell (an element outside the managers at least half the viewport tall that scrolls itself with `overflow-y: auto` / `scroll`, whose body lock is the site's own), and no modal of the site's own (`dialog[open]`, `[aria-modal="true"]`, `[role="dialog"]`, `[role="alertdialog"]` outside the managers) is showing, since that modal may hold the lock. Every hide pass is best-effort: one that fails hides nothing and does not fail the scan. Every pass, the hit tests, and the evidence screenshot see the page without the banner (a last hide runs before the screenshot). Findings from a scan that hid a showing banner carry `consentHidden: ["<name>", ...]` (after `thirdParty`), and text mode prints the note above. `--no-consent-hiding` turns all of it off. The evidence API (`detect_url_evidence`) leaves the findings untagged, so they replay equal, and records `Evidence.consent`: `{ hidden, matched: { <name>: [selectors] }, unlocked }`. The static (file) engine is unaffected.
- - **Tours and preloaders** (Rust engine, `crates/browser/src/overlays.rs`). Right after the consent hide following the validity gate, the engine looks for a preloader still covering the page: a `position: fixed` layer other than `html` / `body` that covers at least 90% of the viewport, is what `elementFromPoint` returns (or contains it) at the center and at 20% / 80% of each axis, paints an opaque fill (alpha 0.9 or more) on itself or on a descendant covering as much, has at most 60 visible characters and no `a[href]`, `button`, visible `input`, `select`, `textarea`, `iframe`, `[role=button]`, dialog role, `aria-modal=true`, `dialog` or editable descendant, is not itself a dialog, and whose id or one of its classes names a loader (after trailing wrapper words such as `wrapper`, `overlay`, `screen`, `bg`, its last `-` / `_` word is `preloader`, `preload`, `preloading`, `loader`, `loading`, `pageloader`, `siteloader`, `loadingscreen` or `spinner`). If one is there the engine polls every 250ms for up to 5s for it to go on its own, then hides whatever is left with an inline `display: none !important` and marks it `data-impeccable-hidden="<name>"` (`<name>` is the tag plus the naming id or class, `div#preloader`). Known product tours are hidden by their library's own markup with one injected `<style id="impeccable-overlay-hide">`: driver.js 1.x (`.driver-popover`, `svg.driver-overlay`), whose `driver-active` / `driver-fade` / `driver-simple` body classes (its stylesheet sets `pointer-events: none` under `.driver-active`, which hides the page from hit tests), highlight classes (`driver-active-element`, `driver-no-interaction`) and highlight aria (`aria-controls="driver-popover-content"` with `aria-haspopup` and `aria-expanded`) are removed too. The hide runs at the same points as the consent hide (after the validity gate, after the reveal sweep, after the capture with a recapture when it changed the page, before the screenshot) and is as best-effort. A gate the visitor answers, a site's own dialog, and any layer with controls or more text are left on the page. Findings from a scan that hid any carry `overlaysHidden: [{ "kind": "tour" | "preloader", "name": "<name>" }, ...]` (tours first, after `consentHidden`), and text mode prints the note above. `consentHidden` is unchanged and lists consent managers only. `--no-overlay-hiding` turns all of it off, the wait included. The evidence API leaves the findings untagged and records `Evidence.overlays`: `{ hidden: [{ kind, name }], matched: { <library>: [selectors] }, unlocked, waitedMs }` (`waitedMs` is 0 when no preloader was covering the page).
+ - **Tours and preloaders** (Rust engine, `crates/browser/src/overlays.rs`). Right after the consent hide following the validity gate, the engine looks for a preloader still covering the page: a `position: fixed` layer other than `html` / `body` that covers at least 90% of the viewport, is what `elementFromPoint` returns (or contains it) at the center and at 20% / 80% of each axis (a layer with `pointer-events: none` is made hit-testable for that probe and put back), paints an opaque fill (alpha 0.9 or more) on itself or on a descendant covering as much, has at most 60 visible characters and no `a[href]`, `button`, visible `input`, `select`, `textarea`, `iframe`, `[role=button]`, dialog role, `aria-modal=true`, `dialog` or editable descendant, is not itself a dialog, and whose id or one of its classes names a loader (after trailing wrapper words such as `wrapper`, `overlay`, `screen`, `bg`, its last `-` / `_` word is `preloader`, `preload`, `preloading`, `loader`, `loading`, `pageloader`, `siteloader`, `loadingscreen` or `spinner`). If one is there the engine polls every 250ms for up to 5s for it to go on its own, then hides whatever is left with an inline `display: none !important` and marks it `data-impeccable-hidden="<name>"` (`<name>` is the tag plus the naming id or class, `div#preloader`). Known product tours are hidden by their library's own markup with one injected `<style id="impeccable-overlay-hide">`: driver.js 1.x (`.driver-popover`, `svg.driver-overlay`), whose `driver-active` / `driver-fade` / `driver-simple` body classes (its stylesheet sets `pointer-events: none` under `.driver-active`, which hides the page from hit tests), highlight classes (`driver-active-element`, `driver-no-interaction`) and highlight aria (`aria-controls="driver-popover-content"` with `aria-haspopup` and `aria-expanded`) are removed too. The hide runs at the same points as the consent hide (after the validity gate, after the reveal sweep, after the capture with a recapture when it changed the page, before the screenshot) and is as best-effort. A gate the visitor answers, a site's own dialog, and any layer with controls or more text are left on the page. Findings from a scan that hid any carry `overlaysHidden: [{ "kind": "tour" | "preloader", "name": "<name>" }, ...]` (tours first, after `consentHidden`), and text mode prints the note above. `consentHidden` is unchanged and lists consent managers only. `--no-overlay-hiding` turns all of it off, the wait included. The evidence API leaves the findings untagged and records `Evidence.overlays`: `{ hidden: [{ kind, name }], matched: { <library>: [selectors] }, unlocked, waitedMs }` (`waitedMs` is 0 when no preloader was covering the page).
- **What the visual pass refuses to read.** The JS reported whatever its sampling produced; the engine says nothing where the reading is not the text's own background. The candidate collector applies the element pass's text gates before a candidate takes one of the `maxCandidates` slots, is sampled, or is scrolled into view: text with no letter and no digit (`◯`, `{ }`, `/`) as well as emoji-only text; a disabled control (`[disabled]`, `[aria-disabled="true"]`); a computed font size under 1px; a `color` at alpha 0.02 or less, or a transparent `-webkit-text-fill-color`, unless the element clips its own background to its text; and an element the painted-at-capture predicate (`crates/core/src/browser/painted.rs`, text gate) says is not painted, such as a tab-strip cell past its clipping edge or a carousel slide parked beside the page. A background image read as a surface has to be under the text: an image drawn `no-repeat` (from the computed `background` shorthand's first layer) whose painted rect, at a `background-size` the capture can place (pixels, percentages, `cover`, or any size once the image's intrinsic size is loaded), covers neither the candidate's text box nor its own box (`body` and `html` are asked only about the text) ends the walk `background image does not cover the text` (`stop`), whether or not the pass could load the file. An icon sprite framing a count and a mark beside a button label are refused this way; a repeating tile and a placement the capture cannot state are read as before. In the stack walk (`impeccable_core::browser::visual`): a translucent surface no longer restarts the walk at its own parent (which re-entered the stack above the node it came from and composited that surface over itself until its alpha read as opaque, and which skipped siblings painted between the surface and that parent) — the walk keeps descending the one `elementsFromPoint` stack, collecting translucent surfaces until an opaque one grounds them, then composites them back in order (topmost surface still names the method, `...+alpha`); a walk that reaches the end of the stack with nothing opaque is unresolved rather than reporting the last translucent color as a surface. A gradient answers analytically only when its stops agree: any stop below 0.95 alpha (a scrim, a glow, a `from-x/10` wash composites differently at every point of the box) or two opaque stops more than 2× apart in contrast make it `gradient stops disagree`, and an `svg` in the stack makes it `<tag> paint`; both end the walk (`stop`) rather than letting the nodes under them answer for the text, so the candidate falls to the screenshot pass. In the screenshot flow: a candidate whose reasons include `background-clip text`, `filter`, or `backdrop filter` is refused before the two screenshots are taken; the verdict is the median over the *glyph cores* (channel delta ≥ 90% of the strongest delta in the box, ≥ 8 of them; when fewer than 8 pixels reach 90%, as on small or thin text, the pixels from 75% up) rather than the tenth percentile over every changed pixel, which antialiased edges drive to 1:1; and the pass reports nothing when the diff is not a glyph over its background — more than 55% of the clip changed (the page repainted), more than a quarter of the changed pixels moved the opposite way from the rest (text mid-animation leaves its old position and its new one in the same diff), most fully painted pixels are not the color the text declares (`preferRenderedForeground` aside, where the painted value *is* the claim), the surface under the glyphs stands 2:1 or further from the surface beside them in the same box (the page paints its own text twice, so hiding one copy leaves the other where the glyphs were), or the median of every measured pixel is more than 3× the verdict (the sample is two populations, not one surface). The snippet shape is unchanged. `median` in it is the median over the same glyph cores the verdict reads, so it prints the verdict's number and never reads below it (it used to be the median over every changed pixel, edges included, which printed verdicts above their own median such as `pixel contrast 3.5:1 median 1.7:1`). The median over every changed pixel still decides the bimodal refusal above, but it is not printed.
- **Viewport edges and overflow.** `body-text-viewport-edge` reports a gutter under 16px, or under 12px when `innerWidth` is 480px or less. A paragraph whose measured text runs past a side of the viewport (the distance rounds below 0) reports no gutter on that side; it still reports a gutter from 0px to the floor on the other side (`(left 8px)`). Those paragraphs, through the same gates plus the Text paint gate and inline ignores, report once per page instead: one `body-text-viewport-edge` finding attributed to the page (`selector` `body`, in `pageLevel`) on the side the furthest text reaches. The message follows what the page does. It reads `text runs past the <side> edge of the <vw>px viewport and is cut off: <name> reaches <d>px past it, with text in <n> block(s)` when the text is cut off: the viewport clips x overflow (the root's `overflow-x`, or body's when the root's is `visible`, at `hidden` or `clip`), the side is not the one the page scrolls to (right, or left under `direction: rtl`), the root's recorded `scrollWidth` does not exceed its `clientWidth` by more than 1px, or for every paragraph on that side a box at `overflow-x: hidden` or `clip` (the paragraph or an ancestor below the body, with its own edge on that side inside the viewport) is passed by the text. `<name>` is then the box reaching furthest among the paragraphs and their ancestors. Otherwise it reads `page scrolls sideways at <vw>px: <name> reaches <d>px past the <side> edge, and text in <n> block(s) runs past it`, where `<name>` is the box reaching furthest past that side among those no ancestor below the root clips or scrolls on x and not `position: fixed`, and no further than the page scrolls (ties go to the outer box). When the engine cannot tell (nothing it can see clips the text and the root recorded no `scrollWidth`) the sideways wording stands and `<name>` is the box reaching furthest among the paragraphs and their ancestors. In both wordings the paragraph itself is named when its text reaches further than any such box. `<name>` is the element's `class_selector`, except that a `div` with no class is named `div#<id>`, else `div in <tag>#<id>` or `div in <tag>.<class>` (at most three classes) after its nearest ancestor below the body with an id or a class, else `div ("<text>")` with up to 40 characters of its text, cut at a word and ended with `…` when cut, double quotes in the text written as `'`. `text-overflow` reports a spill only when it does harm: a box at `overflow-x: hidden` or `clip` (the element itself or an ancestor below the body, with area) is passed by the spill's reach, the spill reaches within a quarter em of the viewport's side or past it, or the spilled part comes within a quarter em of another element's text or painted box on the element's lines (not an ancestor or descendant, not a box that holds the element's whole box, and not a decoration layer: an absolutely or fixed positioned box with no text, other than a replaced element or an `svg`, that is 2px thick or less or paints only a plain fill, with no background image or border, at alpha times opacity under 0.25). The reach is the painted extent, or the scroll extent where that is taken as read; text that runs past its box into free space reports nothing.
- **Round 7 recall and gates** (corpus run 28). `line-length` and `body-text-viewport-edge` (its element and page-level forms) also measure prose written straight into a generic block: a `div`, `section`, `article`, `aside` or `main` laid out as `block` or `flow-root`, with more than 10 characters of its own text, only phrasing inside it, not set `white-space: pre*`, and outside any link, button, label, summary, select, textarea, button-, link-, tab-, menuitem- or option-role element and editable field; it is measured on its text runs only (where those cannot be measured it is not taken for a paragraph), and the edge snippet names it (`<div> with 228-char body ...`). The label collectors read the element that holds a label's text: its own text, else the one child whose text is not empty, at most three levels down, so a chip with an icon beside its text span is read through the span; `hero-eyebrow-chip` reads its sibling that way too, and its tracked-caps floor is 1.6px or 0.08em of the label's size; under 1.6px a label that is or holds a `time` element, or that names a year (1900 to 2099 as a word), is a dated meta line and not tracked caps (the recorded JS vectors pin the fixed floor alone). `kicker-above-heading` hands a label over a 48px-or-larger h1 to the hero rule at 1.6px, or, when the label is the h1's own previous sibling at 14px or less, at 0.08em where `hero-eyebrow-chip` reports that label (it does not read small-caps as capitals and passes over a dated line, so such a label stays a kicker; the static engine: at 14px or less). A card-context ancestor (`article`, `li`, `a`, `button`, ...) more than two viewports tall holds the page and is not a card for the kicker and numbered-label collectors. `icon-tile-stack` anchors on a card title set on a `div` or `span` too: laid out as a block, with no element children, 2 to 80 characters of its own text, weight 600 or more at 16px or more, outside any heading, link, button or label; it reads an `oklab()` or other modern tile fill. `tiny-text` skips a label typed in capitals (all its letters capitals, at most 40 letters, one line) and a run in a monospace face with `white-space: pre*`. `wide-tracking` counts a caps label's letters, not its characters, toward its 40-letter gate, and skips a one-line link or button label of at most 40 letters. The element contrast pass scores a box under 10px tall when it holds a line of its own text at 8px or more and is at least 0.9 of the font size tall. `ai-color-palette`'s gradient form skips a box whose gradient, sampled at nine points over the box from its computed size and position, shows one colour (every sample within 12 levels on each channel); an element reports the rule once: the computed gradient form stands for the utility-class gradient form, the computed purple-heading form for the class form (`text-purple-600 on heading`), and `gradient-text` on the element for both gradient forms. `gradient-text` skips a ramp whose strongest stop, times the element's own opacity, is under 0.15, and its stylesheet form does not stand when every element computing a clipped gradient is unpainted or under that floor. `gpt-thin-border-wide-shadow` reads, under one gradient ancestor with no picture, each of its stops composited over the fills below: a halo that shows over at most half of them does not count. `dark-glow`'s surface lift counts only layers carrying at least half the strength floor (1.5px of light), and its stylesheet form with no selector does not stand when an element's computed shadow carries the declaration: the element form read that element.
diff --git a/tests/fixtures/overlays/preloader-pass-through.html b/tests/fixtures/overlays/preloader-pass-through.html
new file mode 100644
index 000000000..01d7ad341
--- /dev/null
+++ b/tests/fixtures/overlays/preloader-pass-through.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Overlay hiding: a stuck preloader clicks pass through</title>
+ <style>
+ /* The stuck preloader again, with pointer-events: none so clicks pass
+ through while it paints: hit testing skips it, and it still covers the
+ page. An epcco.com.sa-shaped preloader: `div#preloader`, fixed, 100% by
+ 100%, white, a spinner and no text, which the site never removes. The
+ URL engine waits for it, then hides it, so the page under it is
+ scored. Pinned by crates/browser/tests/overlay_hiding.rs. */
+ * { box-sizing: border-box; }
+ body { font: 16px/1.5 system-ui, sans-serif; margin: 0; padding: 40px; color: #111; background: #fff; }
+ #preloader { width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 9999999; background: #fff; pointer-events: none; }
+ .sk-circle { width: 80px; height: 80px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
+ border: 6px solid #0b5c63; border-right-color: transparent; border-radius: 50%; }
+ .faint { margin: 0; font-size: 14px; line-height: 28px; color: #aaaaaa; }
+ </style>
+</head>
+<body>
+ <div id="preloader"><div class="sk-circle"></div></div>
+ <h1>A page under a stuck preloader</h1>
+ <p class="faint" id="covered-copy">Faint copy the preloader covers.</p>
+</body>
+</html>