[AspectRatio] Fix replaced-element-034.html
https://bugs.webkit.org/show_bug.cgi?id=228223
Patch by Rob Buis <rbuis@igalia.com> on 2021-07-30
Reviewed by Manuel Rego Casasnovas.
Source/WebCore:
Fix replaced-element-034.html by making hasReplacedLogicalHeight
return false for *-content when aspect-ratio is provided and relying
on computeReplacedLogicalHeight to take aspect-ratio into account.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::hasReplacedLogicalHeight const):
LayoutTests:
* TestExpectations:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@280471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f796341..3b80143 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2021-07-30 Rob Buis <rbuis@igalia.com>
+
+ [AspectRatio] Fix replaced-element-034.html
+ https://bugs.webkit.org/show_bug.cgi?id=228223
+
+ Reviewed by Manuel Rego Casasnovas.
+
+ * TestExpectations:
+
2021-07-29 Tomoki Imai <Tomoki.Imai@sony.com>
Missing playing events when the ready state becomes HAVE_FUTURE_DATA/HAVE_ENOUGH_DATA from HAVE_METADATA state
diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations
index 80ab8ff..f3422bb 100644
--- a/LayoutTests/TestExpectations
+++ b/LayoutTests/TestExpectations
@@ -4713,7 +4713,6 @@
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-022.html [ ImageOnlyFailure ]
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-025.html [ ImageOnlyFailure ]
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-026.html [ ImageOnlyFailure ]
-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-034.html [ ImageOnlyFailure ]
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-001.html [ ImageOnlyFailure ]
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-002.html [ ImageOnlyFailure ]
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-003.html [ ImageOnlyFailure ]
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 328f277..b615d66 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2021-07-30 Rob Buis <rbuis@igalia.com>
+
+ [AspectRatio] Fix replaced-element-034.html
+ https://bugs.webkit.org/show_bug.cgi?id=228223
+
+ Reviewed by Manuel Rego Casasnovas.
+
+ Fix replaced-element-034.html by making hasReplacedLogicalHeight
+ return false for *-content when aspect-ratio is provided and relying
+ on computeReplacedLogicalHeight to take aspect-ratio into account.
+
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::hasReplacedLogicalHeight const):
+
2021-07-29 Tomoki Imai <Tomoki.Imai@sony.com>
Missing playing events when the ready state becomes HAVE_FUTURE_DATA/HAVE_ENOUGH_DATA from HAVE_METADATA state
diff --git a/Source/WebCore/rendering/RenderReplaced.cpp b/Source/WebCore/rendering/RenderReplaced.cpp
index 3b61a73..8ec0d28f 100644
--- a/Source/WebCore/rendering/RenderReplaced.cpp
+++ b/Source/WebCore/rendering/RenderReplaced.cpp
@@ -363,7 +363,7 @@
return !hasAutoHeightOrContainingBlockWithAutoHeight();
if (style().logicalHeight().isIntrinsic())
- return true;
+ return !style().hasAspectRatio();
return false;
}