[CSS Container Queries] Basic parsing support for container-type property
commit6bc96aa90732bafdd25dcda1c166c114842bea50
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jan 2022 22:02:34 +0000 (24 22:02 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jan 2022 22:02:34 +0000 (24 22:02 +0000)
tree216b7fd1d134b0f0d891d780e5f3336723950e06
parentb2c84b33e53bc21925090507adfb7c0dd2dd8ef2
[CSS Container Queries] Basic parsing support for container-type property
https://bugs.webkit.org/show_bug.cgi?id=235514

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-contain/container-queries/animation-container-size-expected.txt:
* web-platform-tests/css/css-contain/container-queries/animation-container-type-dynamic-expected.txt:
* web-platform-tests/css/css-contain/container-queries/animation-nested-animation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/animation-nested-transition-expected.txt:
* web-platform-tests/css/css-contain/container-queries/aspect-ratio-feature-evaluation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt:
* web-platform-tests/css/css-contain/container-queries/auto-scrollbars-expected.txt:
* web-platform-tests/css/css-contain/container-queries/backdrop-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/conditional-container-status-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-computed-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-for-shadow-dom.tentative-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-inheritance-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-name-computed-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-parsing-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-selection-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-size-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-type-computed-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-type-containment-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-type-layout-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-type-parsing-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-units-animation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-units-basic-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-units-computational-independence-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-units-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-units-selection-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-units-typed-om-expected.txt:
* web-platform-tests/css/css-contain/container-queries/counters-flex-circular-expected.txt:
* web-platform-tests/css/css-contain/container-queries/display-contents-expected.txt:
* web-platform-tests/css/css-contain/container-queries/display-none-expected.txt:
* web-platform-tests/css/css-contain/container-queries/font-relative-units-dynamic-expected.txt:
* web-platform-tests/css/css-contain/container-queries/font-relative-units-expected.txt:
* web-platform-tests/css/css-contain/container-queries/get-animations-expected.txt:
* web-platform-tests/css/css-contain/container-queries/iframe-invalidation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/ineligible-containment-expected.txt:
* web-platform-tests/css/css-contain/container-queries/inline-size-and-min-width-expected.txt:
* web-platform-tests/css/css-contain/container-queries/inline-size-containment-expected.txt:
* web-platform-tests/css/css-contain/container-queries/inline-size-containment-vertical-rl-expected.txt:
* web-platform-tests/css/css-contain/container-queries/orthogonal-wm-container-query-expected.txt:
* web-platform-tests/css/css-contain/container-queries/percentage-padding-orthogonal-expected.txt:
* web-platform-tests/css/css-contain/container-queries/pseudo-elements-001-expected.txt:
* web-platform-tests/css/css-contain/container-queries/pseudo-elements-003.tentative-expected.txt:
* web-platform-tests/css/css-contain/container-queries/query-content-box-expected.txt:
* web-platform-tests/css/css-contain/container-queries/query-evaluation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/reattach-container-with-dirty-child-expected.txt:
* web-platform-tests/css/css-contain/container-queries/size-container-no-principal-box-expected.txt:
* web-platform-tests/css/css-contain/container-queries/size-feature-evaluation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/style-change-in-container-expected.txt:
* web-platform-tests/css/css-contain/container-queries/top-layer-dialog-container-expected.txt:
* web-platform-tests/css/css-contain/container-queries/top-layer-dialog-expected.txt:
* web-platform-tests/css/css-contain/container-queries/top-layer-nested-dialog-expected.txt:
* web-platform-tests/css/css-contain/container-queries/transition-scrollbars-expected.txt:
* web-platform-tests/css/css-contain/container-queries/transition-style-change-event-expected.txt:
* web-platform-tests/css/css-contain/container-queries/unsupported-axis-expected.txt:
* web-platform-tests/css/css-contain/container-queries/viewport-units-dynamic-expected.txt:
* web-platform-tests/css/css-contain/container-queries/viewport-units-expected.txt:

Source/WebCore:

Parse 'container-type' with values 'none', 'size' and 'inline-size.

https://drafts.csswg.org/css-contain-3/#container-type

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ContainerType const):
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::containerType const):
(WebCore::RenderStyle::setContainerType):
(WebCore::RenderStyle::initialContainerType):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* rendering/style/StyleRareNonInheritedData.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@288465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
71 files changed:
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/animation-container-size-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/animation-container-type-dynamic-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/animation-nested-animation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/animation-nested-transition-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/aspect-ratio-feature-evaluation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/auto-scrollbars-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/backdrop-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/conditional-container-status-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-computed-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-shadow-dom.tentative-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-inheritance-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-computed-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-parsing-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-parsing-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-selection-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-size-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-computed-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-containment-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-layout-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-parsing-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-animation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-basic-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-computational-independence-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-selection-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-typed-om-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/counters-flex-circular-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/display-contents-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/display-none-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/font-relative-units-dynamic-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/font-relative-units-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/get-animations-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/iframe-invalidation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/ineligible-containment-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/inline-size-and-min-width-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/inline-size-containment-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/inline-size-containment-vertical-rl-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/orthogonal-wm-container-query-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/percentage-padding-orthogonal-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-001-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-003.tentative-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-content-box-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/reattach-container-with-dirty-child-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/size-container-no-principal-box-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/size-feature-evaluation-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-change-in-container-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/top-layer-dialog-container-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/top-layer-dialog-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/top-layer-nested-dialog-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/transition-scrollbars-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/transition-style-change-event-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/unsupported-axis-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/viewport-units-dynamic-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/viewport-units-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h