Don't apply percent-height ancestor-resolution quirk to percentages inside of a flex item or grid item
Categories
(Core :: Layout: Flexbox, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(2 files)
For flex items with indefinite heights and percent-height children, we currently can trigger a quirks-mode-only behavior where the percent height children will walk up the tree until they find a frame to resolve their percentage against[1] (which in this case will probably be the flex container frame since it's their first non-block ancestor, and CalcQuirkContainingBlockHeight stops when it hits a frame whose type it doesn't recognize).[2]
This behavior is "for compatibility with IE", but IE doesn't properly support modern flexbox and is not a relevant compat target these days. The more relevant compat target is Chrome, which does not have this quirky behavior on percentages inside of an indefinite-height flex or grid item (the second and third cases in the attached testcase).
We should avoid applying this quirk for flex and grid items. Right now we end up resolving the percent for other reasons (which is bug 1092007 at least in flexbox), but we should fix this here as well to avoid the percent continuing to have some quirks-mode-specific resolution behavior.
[1] https://searchfox.org/mozilla-central/rev/9bb55ae4d808fc48afcf93f99da6a685265b86c6/layout/generic/ReflowInput.cpp#2132-2144
[2] https://searchfox.org/mozilla-central/rev/9bb55ae4d808fc48afcf93f99da6a685265b86c6/layout/generic/ReflowInput.cpp#1981-1983
[3] https://searchfox.org/mozilla-central/rev/9bb55ae4d808fc48afcf93f99da6a685265b86c6/layout/generic/ReflowInput.cpp#1983-1984
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Sorry for the wait on addressing this suggested followup. (This was filed as an opportunistic fixup for a note that came up during bug 1092007's review, basically -- intended to fix it sooner but didn't consider it high-priority, and didn't end up getting to it as soon as I'd wanted.)
Patch posted for review, with a testcase based on the attached testcase (just asserting that the scenarios with grid/flex should look the same regardless of whether we're in quirks or standards mode).
Comment 6•5 years ago
|
||
bugherder |
Description
•