Carry needs_wrap into a display:contents child's layout children - #649
Open
latentharbor wants to merge 1 commit into
Open
Carry needs_wrap into a display:contents child's layout children#649latentharbor wants to merge 1 commit into
latentharbor wants to merge 1 commit into
Conversation
`collect_complex_layout_children` recurses into a `display: contents`
child through `collect_layout_children`, which does not carry the
enclosing container's `needs_wrap` policy. The text child is then pushed
into a block container unwrapped, and taffy asks that Text node for its
`style`, panicking with
`style` is not available on this node kind
Minimal reproduction, no script and no shadow DOM:
<div><span style="display:contents">x</span><div>y</div></div>
`<slot>` is `display: contents` in the UA stylesheet, so this tends to
surface as a shadow-DOM failure although it has nothing to do with shadow
trees.
One behavioural note, measured rather than assumed: against the Web
Platform Tests this clears a large share of the panics of this class but
not all of them, and it changes `display-contents-suppression-dynamic-001`
from PASS to FAIL. That test appears to have been passing because the
subtree was suppressed by the bug rather than by the cascade, but I have
not confirmed that reading and would welcome a second look.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
collect_complex_layout_childrenrecurses into adisplay: contentschild throughcollect_layout_children, which does not carry the enclosing container'sneeds_wrappolicy. The text child is then pushed into a block container unwrapped, and taffy asks that Text node for itsstyle, panicking with ```styleis not available on this node kind.Minimal reproduction, no script and no shadow DOM:
<slot>isdisplay: contentsin the UA stylesheet, so this tends to surface as a shadow-DOM failure although it has nothing to do with shadow trees.One behavioural note, measured rather than assumed: against the Web Platform Tests this clears a large share of the panics of this class but not all of them, and it changes
display-contents-suppression-dynamic-001from PASS to FAIL. That test appears to have been passing because the subtree was suppressed by the bug rather than by the cascade, but I have not confirmed that reading and would welcome a second look.Found while running WPT against blitz-dom in OpenKitesurf.