gecko-dev/layout
Daniel Holbert 2933f10325 Bug 1092007 part 2: Treat a flex item's main-size as indefinite if the item and the container both have an indefinite size in that axis. r=mats
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
2019-09-04 22:45:08 +00:00
..
base Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal 2019-09-04 22:12:39 +00:00
build Bug 1573364 - Convert svg.new-getBBox.enabled to a static pref. r=heycam 2019-08-13 04:55:09 +00:00
doc Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio 2019-04-16 07:25:10 +00:00
forms Bug 1573992 - Convert browser.tabs.remote.desktopBehavior to static pref. r=njn 2019-08-26 20:25:42 +00:00
generic Bug 1092007 part 2: Treat a flex item's main-size as indefinite if the item and the container both have an indefinite size in that axis. r=mats 2019-09-04 22:45:08 +00:00
inspector Bug 1564968 - add isElementThemed method to InspectorUtils to infer native theme styling such as focus. r=emilio 2019-08-28 17:49:22 +00:00
ipc Bug 1556548 - Rename RenderFrame to RemoteLayerTreeOwner. r=mattwoodrow 2019-06-02 13:51:33 -04:00
mathml Backed out changeset f20ce5c7a25c (bug 1575870) for assertion failure at nsNavHistory.cpp on a CLOSED TREE 2019-08-29 13:45:54 +03:00
media
painting Bug 1563649 - As with display list item and reflow for position:fixed elements, use the adjusted layout viewport size getComputedStyle() r=mstange 2019-09-05 01:15:05 +00:00
printing Bug 1577711 - Part 2: Perform frame static clone after parent static clone, r=smaug 2019-09-05 14:55:19 +00:00
reftests Bug 1092007 part 2: Treat a flex item's main-size as indefinite if the item and the container both have an indefinite size in that axis. r=mats 2019-09-04 22:45:08 +00:00
style Bug 1563649 - As with display list item and reflow for position:fixed elements, use the adjusted layout viewport size getComputedStyle() r=mstange 2019-09-05 01:15:05 +00:00
svg Bug 1576372 - Check the validity of the DrawTarget before rendering SVG content into it. r=aosmond 2019-08-28 13:16:58 +00:00
tables Bug 1577364 - Remove the NS_TABLE_CELL_HAS_PCT_OVER_BSIZE frame bit since it's not used. r=dholbert 2019-08-29 21:22:25 +00:00
tools Bug 1577390 - Wait a bit before loading document in Layout Debugger when profiling. r=dbaron 2019-08-30 23:12:58 +00:00
xul Bug 1578164. Use async notifications when requesting decode of an image in most places. r=aosmond 2019-09-03 15:36:23 +00:00
moz.build