Changeset 276634 in webkit
- Timestamp:
- Apr 27, 2021 3:15:02 AM (15 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderFlexibleBox.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r276631 r276634 1 2021-04-21 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] percent children don't resolve against the flex basis on a fully inflexible item with fixed flex-basis 4 https://bugs.webkit.org/show_bug.cgi?id=210478 5 6 Reviewed by Darin Adler. 7 8 * TestExpectations: Unskipped a couple of tests that are passing now. 9 1 10 2021-04-27 Rob Buis <rbuis@igalia.com> 2 11 -
trunk/LayoutTests/TestExpectations
r276627 r276634 3910 3910 webkit.org/b/210093 imported/w3c/web-platform-tests/css/css-flexbox/select-element-zero-height-002.html [ ImageOnlyFailure ] 3911 3911 webkit.org/b/210144 imported/w3c/web-platform-tests/css/css-flexbox/anonymous-flex-item-005.html [ ImageOnlyFailure ] 3912 webkit.org/b/210478 imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-006.html [ ImageOnlyFailure ]3913 3912 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/overflow-area-001.html [ ImageOnlyFailure ] 3914 3913 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/overflow-area-002.html [ ImageOnlyFailure ] 3915 3914 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/overflow-auto-005.html [ ImageOnlyFailure ] 3916 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-007.html [ ImageOnlyFailure ]3917 3915 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-014.html [ ImageOnlyFailure ] 3918 3916 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/scrollbars-auto.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r276633 r276634 1 2021-04-21 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] percent children don't resolve against the flex basis on a fully inflexible item with fixed flex-basis 4 https://bugs.webkit.org/show_bug.cgi?id=210478 5 6 Reviewed by Darin Adler. 7 8 Flexbox spec defines some additional cases where sizes could be considered definite despite they are 9 actually indefinite. One of those cases is whenever we have a fully inflexible item with a definite 10 flex-basis. In that case we should allow desdendants of flex item to resolve against the post-flexing 11 size of the flex item which is basically the value of the definite flex-basis. Note that in the majority 12 of cases those percentages are resolved before flexing the item and not recomputed after that. 13 14 * rendering/RenderFlexibleBox.cpp: 15 (WebCore::RenderFlexibleBox::useChildOverridingMainSizeForPercentageResolution): let descendants of 16 fully inflexible flex items with definite flex-basis to resolve against the post-flexing size. Also added 17 some documentation because that part of the code is far from obvious for the casual reader. 18 1 19 2021-04-27 Youenn Fablet <youenn@apple.com> 2 20 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r276235 r276634 1242 1242 } 1243 1243 1244 // This method is only called whenever a descendant of a flex item wants to resolve a percentage in its 1245 // block axis (logical height). The key here is that percentages should be generally resolved before the 1246 // flex item is flexed, meaning that they shouldn't be recomputed once the flex item has been flexed. There 1247 // are some exceptions though that are implemented here, like the case of fully inflexible items with 1248 // definite flex-basis, or whenever the flex container has a definite main size. See 1249 // https://drafts.csswg.org/css-flexbox/#definite-sizes for additional details. 1244 1250 bool RenderFlexibleBox::useChildOverridingMainSizeForPercentageResolution(const RenderBox& child) 1245 1251 { 1246 1252 ASSERT(!mainAxisIsChildInlineAxis(child)); 1253 1254 // The main size of a fully inflexible item with a definite flex basis is, by definition, definite. 1255 if (child.style().flexGrow() == 0.0 && child.style().flexShrink() == 0.0 && childMainSizeIsDefinite(child, flexBasisForChild(child))) 1256 return child.hasOverridingLogicalHeight(); 1257 1247 1258 // This function implements section 9.8. Definite and Indefinite Sizes, case 2) of the flexbox spec. 1248 1259 // If the flex container has a definite main size the flex item post-flexing main size is also treated 1249 1260 // as definite. We make up a percentage to check whether we have a definite size. 1250 auto updateDescendants = m_inLayout ? UpdatePercentageHeightDescendants::Yes : UpdatePercentageHeightDescendants::No; 1251 if (!canComputePercentageFlexBasis(child, Length(0, LengthType::Percent), updateDescendants)) 1261 if (!canComputePercentageFlexBasis(child, Length(0, LengthType::Percent), UpdatePercentageHeightDescendants::Yes)) 1252 1262 return false; 1253 1263
Note: See TracChangeset
for help on using the changeset viewer.