Skip to content

layout: skip display:none children when classifying flow children - #661

Merged
nicoburns merged 1 commit into
mainfrom
devin/1786204567-display-none-classification
Aug 8, 2026
Merged

layout: skip display:none children when classifying flow children#661
nicoburns merged 1 commit into
mainfrom
devin/1786204567-display-none-classification

Conversation

@nicoburns

@nicoburns nicoburns commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

classify_flow_children let display:none children vote in the inline-vs-block classification: they cleared all_out_of_flow while leaving all_inline true. For css/css-overflow/overflow-body-propagation-013.html (:root { display: none }), the Document node's only child (the display:none <html>) produced an "all inline" classification, so the Document node itself was queued as an inline layout root, panicking at resolve.rs:375 on element_data_mut().unwrap() (Document nodes have no element data).

display:none children generate no boxes, so they now cast no vote at all (skipped like whitespace/comments):

} else if matches!(display.inside(), DisplayInside::None) {
    continue;
}

With this (plus the harness fix in #660) the test goes CRASH → PASS. Full css WPT run shows no regressions from this change (a few FAIL → PASS improvements).

Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/f1a0d6696eaa4076a48f366a24bfd26f
Requested by: @nicoburns

WPT results

9 newly passing, 0 newly failing (net +9), 2 other status changes.

Full diff (11 changed tests)
+ Crash => Pass css/CSS2/box-display/root-box-003.xht
+ Fail => Pass css/CSS2/linebox/line-height-applies-to-016.xht
+ Fail => Pass css/CSS2/normal-flow/max-height-applies-to-016.xht
+ Fail => Pass css/CSS2/normal-flow/max-width-applies-to-016.xht
+ Fail => Pass css/CSS2/normal-flow/min-width-applies-to-016.xht
+ Fail => Pass css/css-animations/animation-name-in-shadow-part-inner-match.html
+ Crash => Pass css/css-backgrounds/background-color-body-propagation-005.html
! Crash => Fail css/css-backgrounds/background-color-root-propagation-001.html
+ Crash => Pass css/css-page/root-element-display-none-print.html
! Crash => Fail css/css-view-transitions/new-content-from-root-display-none.html
+ Crash => Pass css/selectors/not-default-ns-001.html

Generated by the WPT workflow.

@nicoburns nicoburns self-assigned this Aug 8, 2026
@staging-devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@nicoburns
nicoburns merged commit 990a90b into main Aug 8, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant