Changeset 262124 in webkit
- Timestamp:
- May 25, 2020 7:18:22 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r262123 r262124 1 2020-05-22 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them 4 https://bugs.webkit.org/show_bug.cgi?id=212264 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 * css3/flexbox/definite-main-size-expected.txt: Updated expectation. 9 * css3/flexbox/definite-main-size.html: Updated comment. 10 1 11 2020-05-25 Diego Pino Garcia <dpino@igalia.com> 2 12 -
trunk/LayoutTests/css3/flexbox/definite-main-size-expected.txt
r213149 r262124 10 10 Simple case of percentage resolution, columns: 11 11 12 auto flex-basis , we should ignore the percentage height here:12 auto flex-basis. This is still definite. 13 13 14 14 -
trunk/LayoutTests/css3/flexbox/definite-main-size.html
r213149 r262124 62 62 </div> 63 63 64 <p>auto flex-basis , we should ignore the percentage height here:</p>64 <p>auto flex-basis. This is still definite.</p> 65 65 <div class="flexbox column" style="height: 300px;"> 66 66 <div data-expected-height="50"> 67 <div style="height: 50%;" data-expected-height=" 50">67 <div style="height: 50%;" data-expected-height="25"> 68 68 <div class="rect"></div> 69 69 </div> -
trunk/LayoutTests/imported/w3c/ChangeLog
r262056 r262124 1 2020-05-22 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them 4 https://bugs.webkit.org/show_bug.cgi?id=212264 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 * web-platform-tests/css/css-flexbox/percentage-heights-003-expected.txt: There were 3 subtests 9 marked as failures. All of them work fine now. 10 1 11 2020-05-22 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-003-expected.txt
r261859 r262124 1 1 2 FAIL .flexbox 1 assert_equals: 3 <div class="flexbox column" style="height: 0"> 4 <div> 5 <span data-expected-height="100"></span> 6 </div> 7 </div> 8 height expected 100 but got 0 9 FAIL .flexbox 2 assert_equals: 10 <div class="flexbox column-wrap" style="height: 0"> 11 <div> 12 <span data-expected-height="50"></span> 13 </div> 14 <div> 15 <span data-expected-height="50"></span> 16 </div> 17 </div> 18 height expected 50 but got 0 2 PASS .flexbox 1 3 PASS .flexbox 2 19 4 PASS .flexbox 3 20 5 PASS .flexbox 4 21 6 PASS .flexbox 5 22 7 PASS .flexbox 6 23 FAIL .flexbox 7 assert_equals: 24 <div class="flexbox vert-wm"> 25 <div class="horiz-wm"> 26 <span data-expected-height="100"></span> 27 </div> 28 </div> 29 height expected 100 but got 0 8 PASS .flexbox 7 30 9 -
trunk/Source/WebCore/ChangeLog
r262122 r262124 1 2020-05-22 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them 4 https://bugs.webkit.org/show_bug.cgi?id=212264 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Implement https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8 which modified 9 the way percentages were resolved in flexible items with indefinite sizes. From now on we can pretend that 10 they're really definite. 11 12 This allows us to mark 3 tests which were testing percentages in flex items as correct. 13 14 Based on Blink's crrev.com/1247184 by <cbiesinger@chromium.org> 15 16 * rendering/RenderFlexibleBox.cpp: 17 (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): Do only check flex container main size 18 definiteness when computing the main size for percentage resolution, no need to check flex basis at all. 19 1 20 2020-05-25 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r260055 r262124 1144 1144 Optional<LayoutUnit> RenderFlexibleBox::mainSizeForPercentageResolution(const RenderBox& child) 1145 1145 { 1146 // This function implements section 9.8. Definite and Indefinite Sizes, case 1147 // 2) of the flexbox spec. 1148 // We need to check for the flexbox to have a definite main size, and for the 1149 // flex item to have a definite flex basis. 1150 const Length& flexBasis = flexBasisForChild(child); 1151 if (!mainAxisLengthIsDefinite(child, flexBasis)) 1146 // This function implements section 9.8. Definite and Indefinite Sizes, case 2) of the flexbox spec. 1147 // If the flex container has a definite main size the flex item post-flexing main size is also treated 1148 // as definite. We make up a percentage to check whether we have a definite size. 1149 if (!mainAxisLengthIsDefinite(child, Length(0, Percent))) 1152 1150 return WTF::nullopt; 1153 if (!flexBasis.isPercentOrCalculated()) { 1154 // If flex basis had a percentage, our size is guaranteed to be definite or 1155 // the flex item's size could not be definite. Otherwise, we make up a 1156 // percentage to check whether we have a definite size. 1157 if (!mainAxisLengthIsDefinite(child, Length(0, Percent))) 1158 return WTF::nullopt; 1159 } 1160 1151 1161 1152 if (hasOrthogonalFlow(child)) 1162 1153 return child.hasOverrideContentLogicalHeight() ? Optional<LayoutUnit>(child.overrideContentLogicalHeight()) : WTF::nullopt;
Note: See TracChangeset
for help on using the changeset viewer.