Title: [272049] trunk
Revision
272049
Author
[email protected]
Date
2021-01-29 00:04:55 -0800 (Fri, 29 Jan 2021)

Log Message

Fix logic error in shouldComputeLogicalHeightFromAspectRatio
https://bugs.webkit.org/show_bug.cgi?id=220965

Patch by Rob Buis <[email protected]> on 2021-01-29
Reviewed by Darin Adler.

Source/WebCore:

Logical height that uses percentages should be computed through
aspect-ratio only if it is not resolvable.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/percentage-resolution-005.html

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

LayoutTests:

percentage-resolution-005.html now passes.

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (272048 => 272049)


--- trunk/LayoutTests/ChangeLog	2021-01-29 04:56:23 UTC (rev 272048)
+++ trunk/LayoutTests/ChangeLog	2021-01-29 08:04:55 UTC (rev 272049)
@@ -1,3 +1,14 @@
+2021-01-29  Rob Buis  <[email protected]>
+
+        Fix logic error in shouldComputeLogicalHeightFromAspectRatio
+        https://bugs.webkit.org/show_bug.cgi?id=220965
+
+        Reviewed by Darin Adler.
+
+        percentage-resolution-005.html now passes.
+
+        * TestExpectations:
+
 2021-01-28  Jean-Yves Avenard  <[email protected]>
 
         [ Big Sur ] media/media-source/media-source-webm-init-inside-segment.html is failing

Modified: trunk/LayoutTests/TestExpectations (272048 => 272049)


--- trunk/LayoutTests/TestExpectations	2021-01-29 04:56:23 UTC (rev 272048)
+++ trunk/LayoutTests/TestExpectations	2021-01-29 08:04:55 UTC (rev 272049)
@@ -4449,11 +4449,11 @@
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-004.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-005.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-006.html [ ImageOnlyFailure ]
+webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-007.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-008.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-010.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-011.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html [ ImageOnlyFailure ]
-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/percentage-resolution-005.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-030.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-031.html [ ImageOnlyFailure ]
 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-032.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (272048 => 272049)


--- trunk/Source/WebCore/ChangeLog	2021-01-29 04:56:23 UTC (rev 272048)
+++ trunk/Source/WebCore/ChangeLog	2021-01-29 08:04:55 UTC (rev 272049)
@@ -1,3 +1,18 @@
+2021-01-29  Rob Buis  <[email protected]>
+
+        Fix logic error in shouldComputeLogicalHeightFromAspectRatio
+        https://bugs.webkit.org/show_bug.cgi?id=220965
+
+        Reviewed by Darin Adler.
+
+        Logical height that uses percentages should be computed through
+        aspect-ratio only if it is not resolvable.
+
+        Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/percentage-resolution-005.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::shouldComputeLogicalHeightFromAspectRatio const):
+
 2021-01-28  Myles C. Maxfield  <[email protected]>
 
         Minor cleanup in CSSFontFaceSetClient

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (272048 => 272049)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2021-01-29 04:56:23 UTC (rev 272048)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2021-01-29 08:04:55 UTC (rev 272049)
@@ -5078,7 +5078,7 @@
         return false;
 
     auto h = style().logicalHeight();
-    return h.isAuto() || (!isOutOfFlowPositioned() && h.isPercentOrCalculated() && percentageLogicalHeightIsResolvable());
+    return h.isAuto() || (!isOutOfFlowPositioned() && h.isPercentOrCalculated() && !percentageLogicalHeightIsResolvable());
 }
 
 bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to