Title: [274267] trunk
- Revision
- 274267
- Author
- commit-qu...@webkit.org
- Date
- 2021-03-10 21:59:44 -0800 (Wed, 10 Mar 2021)
Log Message
Fix intrinsic-size-005.html
https://bugs.webkit.org/show_bug.cgi?id=222970
Patch by Rob Buis <rb...@igalia.com> on 2021-03-10
Reviewed by Simon Fraser.
Source/WebCore:
In orthogonal flow case with aspect-ratio in effect, compute logical height
from logical width provided the logical width is a fixed length.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeChildPreferredLogicalWidths const):
* rendering/RenderBox.h:
LayoutTests:
Enable test that passes now.
* TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (274266 => 274267)
--- trunk/LayoutTests/ChangeLog 2021-03-11 03:48:55 UTC (rev 274266)
+++ trunk/LayoutTests/ChangeLog 2021-03-11 05:59:44 UTC (rev 274267)
@@ -1,3 +1,14 @@
+2021-03-10 Rob Buis <rb...@igalia.com>
+
+ Fix intrinsic-size-005.html
+ https://bugs.webkit.org/show_bug.cgi?id=222970
+
+ Reviewed by Simon Fraser.
+
+ Enable test that passes now.
+
+ * TestExpectations:
+
2021-03-10 Peng Liu <peng.l...@apple.com>
[GPU Process] Assertion under RenderLayerCompositor::computeCompositingRequirements()
Modified: trunk/LayoutTests/TestExpectations (274266 => 274267)
--- trunk/LayoutTests/TestExpectations 2021-03-11 03:48:55 UTC (rev 274266)
+++ trunk/LayoutTests/TestExpectations 2021-03-11 05:59:44 UTC (rev 274267)
@@ -4560,7 +4560,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/intrinsic-size-005.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/table-element-001.html [ ImageOnlyFailure ]
webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-001.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (274266 => 274267)
--- trunk/Source/WebCore/ChangeLog 2021-03-11 03:48:55 UTC (rev 274266)
+++ trunk/Source/WebCore/ChangeLog 2021-03-11 05:59:44 UTC (rev 274267)
@@ -1,3 +1,17 @@
+2021-03-10 Rob Buis <rb...@igalia.com>
+
+ Fix intrinsic-size-005.html
+ https://bugs.webkit.org/show_bug.cgi?id=222970
+
+ Reviewed by Simon Fraser.
+
+ In orthogonal flow case with aspect-ratio in effect, compute logical height
+ from logical width provided the logical width is a fixed length.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::computeChildPreferredLogicalWidths const):
+ * rendering/RenderBox.h:
+
2021-03-10 Peng Liu <peng.l...@apple.com>
[GPU Process] Assertion under RenderLayerCompositor::computeCompositingRequirements()
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (274266 => 274267)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2021-03-11 03:48:55 UTC (rev 274266)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2021-03-11 05:59:44 UTC (rev 274267)
@@ -2403,7 +2403,13 @@
minPreferredLogicalWidth = maxPreferredLogicalWidth = downcast<RenderBox>(child).logicalHeight();
return;
}
- minPreferredLogicalWidth = maxPreferredLogicalWidth = downcast<RenderBox>(child).computeLogicalHeightWithoutLayout();
+ auto& box = downcast<RenderBox>(child);
+ if (box.shouldComputeLogicalHeightFromAspectRatio() && box.style().logicalWidth().isFixed()) {
+ LayoutUnit logicalWidth = LayoutUnit(box.style().logicalWidth().value());
+ minPreferredLogicalWidth = maxPreferredLogicalWidth = blockSizeFromAspectRatio(box.horizontalBorderAndPaddingExtent(), box.verticalBorderAndPaddingExtent(), LayoutUnit(box.style().logicalAspectRatio()), box.style().boxSizingForAspectRatio(), logicalWidth);
+ return;
+ }
+ minPreferredLogicalWidth = maxPreferredLogicalWidth = box.computeLogicalHeightWithoutLayout();
return;
}
Modified: trunk/Source/WebCore/rendering/RenderBox.h (274266 => 274267)
--- trunk/Source/WebCore/rendering/RenderBox.h 2021-03-11 03:48:55 UTC (rev 274266)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2021-03-11 05:59:44 UTC (rev 274267)
@@ -650,6 +650,8 @@
LayoutRect absoluteAnchorRectWithScrollMargin(bool* insideFixed = nullptr) const override;
+ bool shouldComputeLogicalHeightFromAspectRatio() const;
+
protected:
RenderBox(Element&, RenderStyle&&, BaseTypeFlags);
RenderBox(Document&, RenderStyle&&, BaseTypeFlags);
@@ -699,7 +701,6 @@
void incrementVisuallyNonEmptyPixelCountIfNeeded(const IntSize&);
- bool shouldComputeLogicalHeightFromAspectRatio() const;
bool shouldComputeLogicalWidthFromAspectRatio() const;
bool shouldComputeLogicalWidthFromAspectRatioAndInsets() const;
LayoutUnit computeLogicalWidthFromAspectRatio(RenderFragmentContainer* = nullptr) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes