robertsspaceindustries.com - Broken layout, elements not rendered correctly
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox155 | --- | unaffected |
| firefox156 | --- | disabled |
| firefox157 | --- | verified |
People
(Reporter: ctanase, Assigned: emilio)
References
(Regression, )
Details
(Keywords: regression, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][autowebcompat:processed][autowebcompat:repro-success], [wptsync upstream])
User Story
autowebcompat-repro-status:success autowebcompat-repro-chrome-mask-fixed:false autowebcompat-repro-channels:nightly autowebcompat-repro-report-os:all autowebcompat-diagnosis-status:success platform:windows,mac,linux,android impact:site-broken configuration:general affects:all branch:release diagnosis-team:layout user-impact-score:1500
Attachments
(4 files, 1 external file)
Environment:
Operating system: Windows 11/10
Firefox version: Firefox Nightly Version 157.0a1
Steps to reproduce:
- Go to https://robertsspaceindustries.com/en/
- Dismiss the cookie banner.
- Observe the page.
Expected Behavior:
The elements are rendered correctly.
Actual Behavior:
The layout is broken, elements are missing or not rendered correctly.
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly and beta
- Does not reproduce in firefox-release (154), and chrome
Created from https://github.com/webcompat/web-bugs/issues/233231
| Reporter | ||
Comment 1•2 months ago
|
||
| Reporter | ||
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 2•2 months ago
|
||
In Firefox Nightly the RSI homepage renders raw CSS source as visible page text (:root { --rsi-mini-bar-height: 2.5rem; }, --orion-navigation-bar-height, --rsi-footer-height), and the navigation bar is blown up into a tall vertical block instead of a single row, pushing the hero image/carousel off screen. Chrome renders the same page correctly: no CSS text is exposed, the nav bar is a normal single-row bar, and the hero content is visible.
Comment 3•2 months ago
|
||
Updated•2 months ago
|
Comment 4•2 months ago
|
||
Root cause analysis generated by autowebcompat bot:
Firefox engine bug in :host selector matching (not UA sniffing). The site ships Swiper's CSS inside an inline document stylesheet, namespaced by its build with a [data-orion-skin] prefix, producing the rule "[data-orion-skin] :host { position: relative; display: block; margin-left: auto; margin-right: auto; z-index: 1 }". The page has body[data-orion-skin]. Per CSS Scoping (https://drafts.csswg.org/css-scoping/#host-selector) :host only matches the shadow host of the shadow tree in which the containing rule appears, so in a document stylesheet it must match nothing, and Chrome treats the rule as inert. Firefox Nightly instead treats a bare :host that appears after a combinator in a complex selector as if it were the universal selector, so "[data-orion-skin] :host" matches every descendant of body and applies display:block to all of them. Two consequences produce the reported breakage. First, display:block overrides the UA stylesheet rule that hides style elements (https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements), so the raw CSS source of the site's injected style blocks is laid out and painted as page text. Second, those now-rendered style blocks sit inside header.o-navigationBar and inside the footer wrapper, and the site's JS measures those containers and writes the result into --orion-navigation-bar-height and --rsi-footer-height; the extra text inflates the measurement to 18.125rem (290px) instead of 4rem (64px) for the nav bar and 76.71875rem for the footer, which pushes the hero/carousel off screen. Narrow divergence: a bare :host in a non-shadow stylesheet, when it is not the first compound of the selector, matches all elements in Firefox and nothing in Chrome.
Evidence:
Live site, 1366x768, default prefs. Firefox: 3 leaked CSS strings in body innerText, nav height 290px, --orion-navigation-bar-height computes to 18.125rem. Chrome: 0 leaked strings, nav height 64px, var 4rem. Identical 17 style elements in both browsers, so no UA sniffing. The leaked text nodes are children of real HTMLStyleElements inside header.o-navigationBar, the platform footer, and a body-level div; their computed display is block in Firefox and none in Chrome, with no inline style attribute and no shadow DOM. Disabling all document stylesheets in Firefox restored display none, so an author rule was responsible. Re-enabling sheets one at a time isolated two inline sheets, and replaying each of that sheet's 488 rules individually into a constructed stylesheet pinpointed exactly one, rule index 462, the Swiper rule with the "[data-orion-skin] :host" selector setting display block. Adopting a probe sheet with that same selector and an outline declaration highlighted 282 of 520 elements in Firefox, including STYLE and SCRIPT, so :host behaved as a universal match. Element.matches with that selector returns false and querySelectorAll returns 0, so the divergence is in style rule matching rather than the selector API. Further probes in Firefox: bare :host matches 0 elements, :host(div) matches 0, "div :host-context(x)" matches 0, but "div :host" matches every descendant of every div. The reduced testcase puts "#wrap :host" with display block in a plain document stylesheet and a style element inside the wrapper. Firefox Nightly: 3 matched elements, leaky style display block, 1 leaked :root string, broken true. Chrome: 0 matched, display none, 0 leaked strings, broken false. Same divergence as the live site.
Comment 5•2 months ago
|
||
Updated•2 months ago
|
Comment 6•2 months ago
|
||
Claude analysis
Bug 2048847 (95301699ebff) added bucketing that marks a selector's subject compound as known-matching so matching can be skipped, but its Component::Host(None) arm deliberately leaves bucket_matches untouched (":host rules are bucketed") — which only holds for shadow-tree host rules. For a bare :host after a combinator in a document stylesheet, the rule lands in the universal bucket as BucketMatches::Subject, so Rule::matches_selector calls iter_past_subject and skips the :host check entirely — making it match every element. That's exactly the site's [data-orion-skin] :host { display: block; ... } rule un-hiding every injected <style>
Comment 7•2 months ago
|
||
Comment 8•2 months ago
|
||
:emilio, since you are the author of the regressor, bug 2048847, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 10•2 months ago
|
||
Comment 11•2 months ago
|
||
| bugherder | ||
Comment 12•2 months ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox156towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 13•2 months ago
|
||
Let's back out the regressor from beta instead, Donal is that possible?
Comment 15•2 months ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #13)
Let's back out the regressor from beta instead, Donal is that possible?
The regressor Bug 2048847 was reverted from Fx156 beta
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62439 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Updated•1 month ago
|
Comment 18•1 month ago
|
||
Verified as FIXED using the RC Build
Tested with:
Browser / Version: Firefox 157.0-candidate build 1
Operating System: Windows 10 PRO x64
Updated•1 month ago
|
Description
•