Title: [273952] trunk
Revision
273952
Author
[email protected]
Date
2021-03-05 01:50:26 -0800 (Fri, 05 Mar 2021)

Log Message

Fix flex-aspect-ratio-009.html
https://bugs.webkit.org/show_bug.cgi?id=222780

Patch by Rob Buis <[email protected]> on 2021-03-05
Reviewed by Sergio Villar Senin.

Source/WebCore:

Since CSS aspect-ratio does not rely on intrinsic size for
calculating the ratio, the check for intrinsic height should
not apply to it.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::childCrossSizeShouldUseContainerCrossSize const):

LayoutTests:

Enable test that passes now.

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (273951 => 273952)


--- trunk/LayoutTests/ChangeLog	2021-03-05 09:38:00 UTC (rev 273951)
+++ trunk/LayoutTests/ChangeLog	2021-03-05 09:50:26 UTC (rev 273952)
@@ -1,3 +1,14 @@
+2021-03-05  Rob Buis  <[email protected]>
+
+        Fix flex-aspect-ratio-009.html
+        https://bugs.webkit.org/show_bug.cgi?id=222780
+
+        Reviewed by Sergio Villar Senin.
+
+        Enable test that passes now.
+
+        * TestExpectations:
+
 2021-03-05  Philippe Normand  <[email protected]>
 
         REGRESSION(r273309) [GStreamer] webrtc/captureCanvas-webrtc-software-h264-baseline.html is flaky crashing inside libwebrtc

Modified: trunk/LayoutTests/TestExpectations (273951 => 273952)


--- trunk/LayoutTests/TestExpectations	2021-03-05 09:38:00 UTC (rev 273951)
+++ trunk/LayoutTests/TestExpectations	2021-03-05 09:50:26 UTC (rev 273952)
@@ -4554,7 +4554,6 @@
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/abspos-014.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-024.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-028.html [ ImageOnlyFailure ]
-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-009.html [ ImageOnlyFailure ]
 # flex-basis:content
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-021.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-022.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (273951 => 273952)


--- trunk/Source/WebCore/ChangeLog	2021-03-05 09:38:00 UTC (rev 273951)
+++ trunk/Source/WebCore/ChangeLog	2021-03-05 09:50:26 UTC (rev 273952)
@@ -1,3 +1,17 @@
+2021-03-05  Rob Buis  <[email protected]>
+
+        Fix flex-aspect-ratio-009.html
+        https://bugs.webkit.org/show_bug.cgi?id=222780
+
+        Reviewed by Sergio Villar Senin.
+
+        Since CSS aspect-ratio does not rely on intrinsic size for
+        calculating the ratio, the check for intrinsic height should
+        not apply to it.
+
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::childCrossSizeShouldUseContainerCrossSize const):
+
 2021-03-05  Philippe Normand  <[email protected]>
 
         REGRESSION(r273309) [GStreamer] webrtc/captureCanvas-webrtc-software-h264-baseline.html is flaky crashing inside libwebrtc

Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (273951 => 273952)


--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2021-03-05 09:38:00 UTC (rev 273951)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2021-03-05 09:50:26 UTC (rev 273952)
@@ -863,8 +863,12 @@
 
 bool RenderFlexibleBox::childCrossSizeShouldUseContainerCrossSize(const RenderBox& child) const
 {
-    if (!childHasAspectRatio(child) || !child.intrinsicSize().height())
+    if (!childHasAspectRatio(child))
         return false;
+    if (!child.intrinsicSize().height() && !child.style().hasAspectRatio()) {
+        // We can't compute a ratio in this case.
+        return false;
+    }
 
     // 9.8 https://drafts.csswg.org/css-flexbox/#definite-sizes
     // 1. If a single-line flex container has a definite cross size, the automatic preferred outer cross size of any
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to