Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b7276669eb690bb0effc20c9a3c2daac0f5d53b5
https://github.com/WebKit/WebKit/commit/b7276669eb690bb0effc20c9a3c2daac0f5d53b5
Author: Cathie Chen <[email protected]>
Date: 2022-12-11 (Sun, 11 Dec 2022)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-032-expected.txt
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
M Source/WebCore/style/StyleAdjuster.cpp
M Source/WebCore/style/StyleAdjuster.h
Log Message:
-----------
[css-contain-intrinsic-size] Apply the value of css contain-intrinsic-size to
<select>
https://bugs.webkit.org/show_bug.cgi?id=246338
Reviewed by Alan Baradlay.
Per [1], the intrinsic size is determined as if the element had no content.
When RenderMenuList without content, it should still display the appearance
of theme. So if it is a size containment, it should have size of theme
appearance.
While calculating height, we should keep the height from theme style.
Per [2], contain-intrinsic-* properties specify an explicit intrinsic inner
size.
For RenderMenuList, the explicit intrinsic inner size includes the content size
and
the theme size. So while calculating height, we should override the intrinsic
size.
When adjusting the style for themes, it might set a fixed value to properties,
like width,
height, min-width and min-height. This would make contain-intrinsic-*
properties not
effective. To fix this, the values of these properties need to restore to the
auto value.
[1] https://www.w3.org/TR/css-contain-2/#containment-size
[2] https://www.w3.org/TR/css-sizing-4/#intrinsic-size-override
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-032-expected.txt:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::overrideLogicalHeightForSizeContainment): Override the
height and handle RenderMenuList.
(WebCore::RenderBox::updateLogicalHeight):
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
(WebCore::Style::Adjuster::adjustThemeStyle const): If there is
contain-intrinsic-size and the css size properties are
changed from auto to a fixed value, we should restore them, so that
contain-intrinsic-size would be effective.
* Source/WebCore/style/StyleAdjuster.h:
Canonical link: https://commits.webkit.org/257704@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes