[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages...
authorsvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2020 15:56:18 +0000 (15:56 +0000)
committersvillar@igalia.com <svillar@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2020 15:56:18 +0000 (15:56 +0000)
commite10de086e0d4925f37b823268d9cb6036826a864
treea31a23564ba2300b9cf4116aad5ef54324b9e47a
parent00508d2eed98256fc1f38c6e00b57e695ac80e6d
[css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them
https://bugs.webkit.org/show_bug.cgi?id=212264

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-flexbox/percentage-heights-003-expected.txt: There were 3 subtests
marked as failures. All of them work fine now.

Source/WebCore:

Implement https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8 which modified
the way percentages were resolved in flexible items with indefinite sizes. From now on we can pretend that
they're really definite.

This allows us to mark 3 tests which were testing percentages in flex items as correct.

Based on Blink's crrev.com/1247184 by <cbiesinger@chromium.org>

This is a reland of r262124 which got reverted due to the bug fixed in r263389.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): Do only check flex container main size
definiteness when computing the main size for percentage resolution, no need to check flex basis at all.

LayoutTests:

* css3/flexbox/definite-main-size-expected.txt: Updated expectation.
* css3/flexbox/definite-main-size.html: Updated comment.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/definite-main-size-expected.txt
LayoutTests/css3/flexbox/definite-main-size.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-003-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp