Changeset 286207 in webkit
- Timestamp:
- Nov 29, 2021 2:29:38 AM (8 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
r286206 r286207 1 2021-10-27 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] Do not shrink tables bellow their intrinsic sizes 4 https://bugs.webkit.org/show_bug.cgi?id=232383 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 * TestExpectations: Unskip table-as-item-fixed-min-width-3.html which works fine now. 9 1 10 2021-10-27 Sergio Villar Senin <svillar@igalia.com> 2 11 -
trunk/LayoutTests/TestExpectations
r286206 r286207 4235 4235 4236 4236 # Tables as flex items. 4237 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-fixed-min-width-3.html [ ImageOnlyFailure ]4238 4237 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-1.html [ ImageOnlyFailure ] 4239 4238 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-2.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r286206 r286207 1 2021-10-27 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] Do not shrink tables bellow their intrinsic sizes 4 https://bugs.webkit.org/show_bug.cgi?id=232383 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Flex layout algorithm uses the flex items min|max sizes to compute the hypothetical main size which 9 will be used to clamp the size of the items when flexed. In the case of tables as flex items, we were 10 using the min-size straight away whenever that was definite. However we cannot do that because tables 11 must not shrink bellow their intrinsic sizes. That's why we should select the maximum of the intrinsic 12 size and the min-size. 13 14 This fixes a WPT test covering this case. 15 16 * rendering/RenderFlexibleBox.cpp: 17 (WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes): Do not select a min-size smaller than the 18 table intrinsic size in the main axis. 19 1 20 2021-10-27 Sergio Villar Senin <svillar@igalia.com> 2 21 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r286206 r286207 1324 1324 Length min = mainSizeLengthForChild(MinSize, child); 1325 1325 // Intrinsic sizes in child's block axis are handled by the min-size:auto code path. 1326 if (min.isSpecified() || (min.isIntrinsic() && mainAxisIsChildInlineAxis(child))) 1327 return { computeMainAxisExtentForChild(child, MinSize, min).value_or(0_lu), maxExtent.value_or(LayoutUnit::max()) }; 1326 if (min.isSpecified() || (min.isIntrinsic() && mainAxisIsChildInlineAxis(child))) { 1327 auto minExtent = computeMainAxisExtentForChild(child, MinSize, min).value_or(0_lu); 1328 // We must never return a min size smaller than the min preferred size for tables. 1329 if (child.isTable() && mainAxisIsChildInlineAxis(child)) 1330 minExtent = std::max(minExtent, child.minPreferredLogicalWidth()); 1331 return { minExtent, maxExtent.value_or(LayoutUnit::max()) }; 1332 } 1328 1333 1329 1334 if (shouldApplyMinSizeAutoForChild(child)) {
Note: See TracChangeset
for help on using the changeset viewer.