Title: [272193] trunk
Revision
272193
Author
[email protected]
Date
2021-02-02 00:10:30 -0800 (Tue, 02 Feb 2021)

Log Message

Support aspect-ratio on <body> in quirks mode
https://bugs.webkit.org/show_bug.cgi?id=219489

Patch by Rob Buis <[email protected]> on 2021-02-02
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update test expectation.

* web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001-expected.txt:

Source/WebCore:

If the logical height is auto, the actual computed height could still be
non-auto because of aspect-ratio, so add a check for that case.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001.html

* rendering/RenderBox.h:
(WebCore::RenderBox::stretchesToViewport const):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (272192 => 272193)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-02 07:54:28 UTC (rev 272192)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-02 08:10:30 UTC (rev 272193)
@@ -1,3 +1,14 @@
+2021-02-02  Rob Buis  <[email protected]>
+
+        Support aspect-ratio on <body> in quirks mode
+        https://bugs.webkit.org/show_bug.cgi?id=219489
+
+        Reviewed by Simon Fraser.
+
+        Update test expectation.
+
+        * web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001-expected.txt:
+
 2021-01-31  Sam Weinig  <[email protected]>
 
         Add support for color(prophoto-rgb ...) as part of CSS Color 4

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001-expected.txt (272192 => 272193)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001-expected.txt	2021-02-02 07:54:28 UTC (rev 272192)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001-expected.txt	2021-02-02 08:10:30 UTC (rev 272193)
@@ -1,3 +1,3 @@
 
-FAIL body height is 100 assert_equals: expected 100 but got 584
+PASS body height is 100
 

Modified: trunk/Source/WebCore/ChangeLog (272192 => 272193)


--- trunk/Source/WebCore/ChangeLog	2021-02-02 07:54:28 UTC (rev 272192)
+++ trunk/Source/WebCore/ChangeLog	2021-02-02 08:10:30 UTC (rev 272193)
@@ -1,3 +1,18 @@
+2021-02-02  Rob Buis  <[email protected]>
+
+        Support aspect-ratio on <body> in quirks mode
+        https://bugs.webkit.org/show_bug.cgi?id=219489
+
+        Reviewed by Simon Fraser.
+
+        If the logical height is auto, the actual computed height could still be
+        non-auto because of aspect-ratio, so add a check for that case.
+
+        Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/quirks-mode-001.html
+
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::stretchesToViewport const):
+
 2021-02-01  Peng Liu  <[email protected]>
 
         REGRESSION: Fullscreen HTML5 video subtitles/captions are shown twice

Modified: trunk/Source/WebCore/rendering/RenderBox.h (272192 => 272193)


--- trunk/Source/WebCore/rendering/RenderBox.h	2021-02-02 07:54:28 UTC (rev 272192)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2021-02-02 08:10:30 UTC (rev 272193)
@@ -421,7 +421,7 @@
 
     bool stretchesToViewport() const
     {
-        return document().inQuirksMode() && style().logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isDocumentElementRenderer() || isBody()) && !isInline();
+        return document().inQuirksMode() && style().logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isDocumentElementRenderer() || isBody()) && !shouldComputeLogicalHeightFromAspectRatio() && !isInline();
     }
 
     virtual LayoutSize intrinsicSize() const { return LayoutSize(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to