Title: [273955] trunk
- Revision
- 273955
- Author
- [email protected]
- Date
- 2021-03-05 02:14:57 -0800 (Fri, 05 Mar 2021)
Log Message
WPT test css/css-flexbox/flex-minimum-height-flex-items-023.html fails
https://bugs.webkit.org/show_bug.cgi?id=214292
Reviewed by Javier Fernandez.
Source/WebCore:
CSS flex specs define how to compute the main axis automatic minimum size of a flex item in order to
provide a more reasonable minimum size (as grid does). So far we've considered "automatic minimum size"
as either min-{width|height}:auto. However the css-sizing-3 specs mention that for the block size
either min-content, max-content or fit-content are (unless otherwise specified) equivalent to the
automatic size (see https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content).
This means that we need to expand our check to consider those intrinsic sizes as automatic whenever the
block axis of the flex item is the flexbible box main size.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::shouldApplyMinSizeAutoForChild const): Consider intrinsic sizes as automatic
in case the child block axis is the flex container main axis.
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Let intrinsic sizes be handled by the code
that computes min-size:auto.
LayoutTests:
* TestExpectations: Unskipped the test that passes now.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (273954 => 273955)
--- trunk/LayoutTests/ChangeLog 2021-03-05 10:07:07 UTC (rev 273954)
+++ trunk/LayoutTests/ChangeLog 2021-03-05 10:14:57 UTC (rev 273955)
@@ -1,3 +1,12 @@
+2021-03-01 Sergio Villar Senin <[email protected]>
+
+ WPT test css/css-flexbox/flex-minimum-height-flex-items-023.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=214292
+
+ Reviewed by Javier Fernandez.
+
+ * TestExpectations: Unskipped the test that passes now.
+
2021-03-05 Rob Buis <[email protected]>
Fix flex-aspect-ratio-009.html
Modified: trunk/LayoutTests/TestExpectations (273954 => 273955)
--- trunk/LayoutTests/TestExpectations 2021-03-05 10:07:07 UTC (rev 273954)
+++ trunk/LayoutTests/TestExpectations 2021-03-05 10:14:57 UTC (rev 273955)
@@ -4126,8 +4126,6 @@
# Artificial web socket delays are only supported on wk2.
http/tests/websocket/tests/hybi/closed-port-delay.html [ Skip ]
-webkit.org/b/214292 imported/w3c/web-platform-tests/css/css-flexbox/flex-minimum-height-flex-items-023.html [ ImageOnlyFailure ]
-
webkit.org/b/214291 imported/w3c/web-platform-tests/css/css-writing-modes/abs-pos-with-replaced-child.html [ ImageOnlyFailure ]
webkit.org/b/214291 imported/w3c/web-platform-tests/css/css-writing-modes/available-size-004.html [ ImageOnlyFailure ]
webkit.org/b/214291 imported/w3c/web-platform-tests/css/css-writing-modes/available-size-018.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (273954 => 273955)
--- trunk/Source/WebCore/ChangeLog 2021-03-05 10:07:07 UTC (rev 273954)
+++ trunk/Source/WebCore/ChangeLog 2021-03-05 10:14:57 UTC (rev 273955)
@@ -1,3 +1,25 @@
+2021-03-01 Sergio Villar Senin <[email protected]>
+
+ WPT test css/css-flexbox/flex-minimum-height-flex-items-023.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=214292
+
+ Reviewed by Javier Fernandez.
+
+ CSS flex specs define how to compute the main axis automatic minimum size of a flex item in order to
+ provide a more reasonable minimum size (as grid does). So far we've considered "automatic minimum size"
+ as either min-{width|height}:auto. However the css-sizing-3 specs mention that for the block size
+ either min-content, max-content or fit-content are (unless otherwise specified) equivalent to the
+ automatic size (see https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content).
+
+ This means that we need to expand our check to consider those intrinsic sizes as automatic whenever the
+ block axis of the flex item is the flexbible box main size.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::shouldApplyMinSizeAutoForChild const): Consider intrinsic sizes as automatic
+ in case the child block axis is the flex container main axis.
+ (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Let intrinsic sizes be handled by the code
+ that computes min-size:auto.
+
2021-03-05 Philippe Normand <[email protected]>
Unreviewed, WPE/GTK build fix after r273953
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (273954 => 273955)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2021-03-05 10:07:07 UTC (rev 273954)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2021-03-05 10:14:57 UTC (rev 273955)
@@ -424,11 +424,14 @@
return style().flexWrap() != FlexWrap::NoWrap;
}
+// https://drafts.csswg.org/css-flexbox/#min-size-auto
bool RenderFlexibleBox::shouldApplyMinSizeAutoForChild(const RenderBox& child) const
{
- // css-flexbox section 4.5
auto minSize = mainSizeLengthForChild(MinSize, child);
- return minSize.isAuto() && mainAxisOverflowForChild(child) == Overflow::Visible;
+ // min, max and fit-content are equivalent to the automatic size for block sizes https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content.
+ bool childBlockSizeIsEquivalentToAutomaticSize = !mainAxisIsChildInlineAxis(child) && (minSize.isMinContent() || minSize.isMaxContent() || minSize.isFitContent());
+
+ return (minSize.isAuto() || childBlockSizeIsEquivalentToAutomaticSize) && (mainAxisOverflowForChild(child) == Overflow::Visible);
}
Length RenderFlexibleBox::flexBasisForChild(const RenderBox& child) const
@@ -1197,7 +1200,8 @@
}
Length min = mainSizeLengthForChild(MinSize, child);
- if (min.isSpecifiedOrIntrinsic())
+ // Intrinsic sizes in child's block axis are handled by the min-size:auto code path.
+ if (min.isSpecified() || (min.isIntrinsic() && mainAxisIsChildInlineAxis(child)))
return std::max(childSize, std::max(0_lu, computeMainAxisExtentForChild(child, MinSize, min).valueOr(childSize)));
if (shouldApplyMinSizeAutoForChild(child)) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes