Title: [282264] trunk
Revision
282264
Author
commit-qu...@webkit.org
Date
2021-09-10 05:23:15 -0700 (Fri, 10 Sep 2021)

Log Message

Fix aspect-ratio-intrinsic-size-004.html
https://bugs.webkit.org/show_bug.cgi?id=228283

Patch by Rob Buis <rb...@igalia.com> on 2021-09-10
Reviewed by Sergio Villar Senin.

Source/WebCore:

Flex items using aspect-ratio that are stretched
and depend on flex container height also need
to have the preferred widths recalculated.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::needsPreferredWidthsRecalculation const):

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (282263 => 282264)


--- trunk/LayoutTests/ChangeLog	2021-09-10 10:23:31 UTC (rev 282263)
+++ trunk/LayoutTests/ChangeLog	2021-09-10 12:23:15 UTC (rev 282264)
@@ -1,3 +1,12 @@
+2021-09-10  Rob Buis  <rb...@igalia.com>
+
+        Fix aspect-ratio-intrinsic-size-004.html
+        https://bugs.webkit.org/show_bug.cgi?id=228283
+
+        Reviewed by Sergio Villar Senin.
+
+        * TestExpectations:
+
 2021-09-09  Frédéric Wang  <fw...@igalia.com>
 
         Nullptr crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply

Modified: trunk/LayoutTests/TestExpectations (282263 => 282264)


--- trunk/LayoutTests/TestExpectations	2021-09-10 10:23:31 UTC (rev 282263)
+++ trunk/LayoutTests/TestExpectations	2021-09-10 12:23:15 UTC (rev 282264)
@@ -4100,7 +4100,6 @@
 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-column-015.html [ ImageOnlyFailure ]
 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-007.html [ ImageOnlyFailure ]
 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-010.html [ ImageOnlyFailure ]
-webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/aspect-ratio-intrinsic-size-004.html [ ImageOnlyFailure ]
 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/aspect-ratio-intrinsic-size-005.html [ ImageOnlyFailure ]
 
 webkit.org/b/145176 imported/w3c/web-platform-tests/css/css-flexbox/flexbox_align-items-stretch-3.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (282263 => 282264)


--- trunk/Source/WebCore/ChangeLog	2021-09-10 10:23:31 UTC (rev 282263)
+++ trunk/Source/WebCore/ChangeLog	2021-09-10 12:23:15 UTC (rev 282264)
@@ -1,3 +1,17 @@
+2021-09-10  Rob Buis  <rb...@igalia.com>
+
+        Fix aspect-ratio-intrinsic-size-004.html
+        https://bugs.webkit.org/show_bug.cgi?id=228283
+
+        Reviewed by Sergio Villar Senin.
+
+        Flex items using aspect-ratio that are stretched
+        and depend on flex container height also need
+        to have the preferred widths recalculated.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::needsPreferredWidthsRecalculation const):
+
 2021-09-10  Jean-Yves Avenard  <j...@apple.com>
 
         Use of memcpy with overlapping memory pointers

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (282263 => 282264)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2021-09-10 10:23:31 UTC (rev 282263)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2021-09-10 12:23:15 UTC (rev 282264)
@@ -1096,7 +1096,7 @@
 
 bool RenderBox::needsPreferredWidthsRecalculation() const
 {
-    return style().paddingStart().isPercentOrCalculated() || style().paddingEnd().isPercentOrCalculated() || (style().hasAspectRatio() && hasRelativeLogicalHeight());
+    return style().paddingStart().isPercentOrCalculated() || style().paddingEnd().isPercentOrCalculated() || (style().hasAspectRatio() && (hasRelativeLogicalHeight() || (isFlexItem() && hasStretchedLogicalHeight())));
 }
 
 ScrollPosition RenderBox::scrollPosition() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to