[webkit-changes] [WebKit/WebKit] 43b73e: [contain-intrinsic-size] failures related to repla...
cathiechen
noreply at github.com
Fri Mar 3 19:51:11 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 43b73e296e5003e669fcb0ba76304837e90cbaa9
https://github.com/WebKit/WebKit/commit/43b73e296e5003e669fcb0ba76304837e90cbaa9
Author: Cathie Chen <cathiechen at igalia.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-028-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-logical-003-expected.txt
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderReplaced.cpp
M Source/WebCore/rendering/RenderReplaced.h
M Source/WebCore/rendering/RenderVideo.cpp
M Source/WebCore/rendering/RenderVideo.h
Log Message:
-----------
[contain-intrinsic-size] failures related to replaced elements
https://bugs.webkit.org/show_bug.cgi?id=253013
Reviewed by Alan Baradlay.
This patch makes intrinsicSize() considering both contain: size and inline-size,
so that there is no need to handle contain: inline-size specially.
In computeReplacedLogicalWidth/Height, hasIntrinsicWidth/Height is determined by width/height > 0,
for contain: size/inline-size, hasIntrinsicWidth/Height should be true regardless of the value.
For RenderVideo, in calculateIntrinsicSize(), the intrinsic size should consider contain: inline-size,
so this patch adjustSizeForInlineSizeContainment before return.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-028-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-logical-003-expected.txt:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::intrinsicLogicalWidth const):
* Source/WebCore/rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox const):
(WebCore::RenderReplaced::computeIntrinsicRatioInformation const):
(WebCore::RenderReplaced::computeReplacedLogicalWidth const):
(WebCore::RenderReplaced::computeReplacedLogicalHeight const):
* Source/WebCore/rendering/RenderReplaced.h:
* Source/WebCore/rendering/RenderVideo.cpp:
(WebCore::RenderVideo::calculateIntrinsicSizeInternal):
(WebCore::RenderVideo::calculateIntrinsicSize):
(WebCore::RenderVideo::hasPosterFrameSize const):
* Source/WebCore/rendering/RenderVideo.h:
Canonical link: https://commits.webkit.org/261205@main
More information about the webkit-changes
mailing list