[css-grid][css-flexbox] ApplyStyleFixups is too eager to blockify display:flex/grid children
Categories
(Core :: Layout, defect, P4)
Tracking
()
People
(Reporter: MatsPalmgren_bugz, Unassigned)
References
Details
Follow-up from bug 997709. That bug was about <select style="display:flex"> where nsComboboxControlFrame child frames was blockified by ApplyStyleFixups. This problem might also affect other frame types (form controls, MathML, SVG, XUL) leading to wrong layout or crashes. This bug is about auditing the code and see if we can come up with a more general solution.
Comment 1•9 years ago
|
||
The tools we currently use this for are... (1) the RAII AutoParentDisplayBasedStyleFixupSkipper class (used in nsCSSFrameConstructor) (2) nsStyleSet::eSkipParentDisplayBasedStyleFixup. These both ultimately set the nsStyleContext constructor-arg "aSkipParentDisplayBasedStyleFixup" to true. (The goal is to cover cases where we should ignore the parent's "display" value for these fixups, because we know the parent element has its own type of [non-flex|grid] frame class that it wants, regardless of its "display".) It's possible there are more places we need to apply these tools (as shown by bug 997709 I suppose).
Reporter | ||
Updated•8 years ago
|
Comment 2•5 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #1)
The tools we currently use this for are...
(1) the RAII AutoParentDisplayBasedStyleFixupSkipper class (used in
nsCSSFrameConstructor)
(2) nsStyleSet::eSkipParentDisplayBasedStyleFixup.
Looks like neither of these tools exist anymore (nor does nsStyleContext). Not sure how specifically this works in today's Stylo world, but it seems to be working out OK. Is there more that we need to do here?
Reporter | ||
Comment 3•5 years ago
|
||
I think this is probably OK now. We still have something similar:
https://searchfox.org/mozilla-central/source/servo/components/style/style_adjuster.rs#199-202
where skip_item_display_fixup()
is true for anon frames:
https://searchfox.org/mozilla-central/source/servo/components/style/gecko/wrapper.rs#1519
which should skip form control interior in general.
Description
•