[css-flexbox] Add tests for intrinsic sizing behavior by cbiesinger · Pull Request #5791 · web-platform-tests/wpt (original) (raw)
@cbiesinger , sorry for the delay - I've been largely AFK for the past couple weeks. (Just got married, and then was on honeymoon. \o/ )
Looking at intrinsic-height-000.html and its reference: it intuitively makes sense, but I'm not sure how it corresponds to the spec text. (This might be an indication that the spec needs an adjustment, not the testcase -- but that probably needs to happen [or I need to correct my spec understanding] before this lands.)
In particular: you're testing section 9.9.1, but really that relies on 9.9.3 ("Flex Item Intrinsic Size Contributions") to define what the max-content contribution is for each flex item.
And in this case, I believe 9.9.3 says the max-content height contribution is ZERO for each flex item. Specifically: it says the contribution is the max-content size of the item (which is zero since there's no content and no specified height), and clamped by the flex-basis in some cases, but not in this case because the item has nonzero flex-grow and flex-shrink.
So when we apply 9.9.1 "subtract its outer flex base size from its max-content contribution size", I think we're subtracting the flex base sizes from zero, and then we end up using the flex-shrink factor below that, because we end up with a negative value. (0 - 200px and 0 - 100px)
With that, I think the spec ends up with an intrinsic height of zero for the flex container (with zero being contributed by each flex items), after I follow all the steps in 9.9.1 -- NOT 600px/200px/400px as your testcase expects.
Let me know if I'm just misunderstanding the spec somehow, though, and how you see it arriving at the values in your testcase. (In particular, is there any spec text that says the "max-content size" of each item is nonzero here? If there was [or if 9.9.1 had each item contributing something nonzero one way or another], then your testcase's expectations would make more sense.)