mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
2933f10325
Flex containers resolve a main-axis size for each of their flex items, and they impose this size on the flex items by stomping on the items' ReflowInput::ComputedISize() or ComputedBSize() data. For cases when we're stomping on the flex item's block-axis, then this can make us improperly treat this size as definite (i.e. use it for percent resolution). The flexbox spec does call out some cases where the item's size *is* supposed to be considered definite[1], but if we're not in one of those cases, we need to be careful to treat the size as indefinite even though it's been resolved. This patch achieves this by: - adding a flag to FlexItem, which gets set in cases where we know we need to treat the size as indefinite. - adding a flag to ReflowInput, which gets set whenever a ComputedBSize is imposed (if the FlexItem had its flag set). - adding some code to the ReflowInput percent-resolution codepath to test for this flag and skip past percent-resolution if it's set. This patch makes us pass all of the existing testcases in the web-platform-test "percentage-heights-003.html". This patch also adds a few more subtests there to exercise cases where the flex container and item have orthogonal writing-modes. (Note the XXXdholbert comments in the patch about items being "fully inflexible" in some cases in order to be treated as having a definite size. If I were to address that comment here, then we would start failing the web-platform-test "percentage-heights-005.html", which all browsers currently pass[2]. Therefore, I'm not adding that restriction at this point.) [1] https://drafts.csswg.org/css-flexbox/#definite-sizes [2] https://wpt.fyi/results/css/css-flexbox/percentage-heights-005.html Differential Revision: https://phabricator.services.mozilla.com/D43705 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
painting | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |