Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3866f2f70936658606dee96b20f9613b97f77248
      
https://github.com/WebKit/WebKit/commit/3866f2f70936658606dee96b20f9613b97f77248
  Author: Kate Lee <[email protected]>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/scroll-state/container-type-scroll-state-computed-expected.txt
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderElement.cpp
    M Source/WebCore/style/StyleExtractor.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/style/values/contain/StyleContainerType.cpp
    M Source/WebCore/style/values/contain/StyleContainerType.h
    M Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h

  Log Message:
  -----------
  Compute the scroll-state value of container-type
https://bugs.webkit.org/show_bug.cgi?id=316214

Reviewed by Tim Nguyen.

Parsing of `container-type: scroll-state` already landed, but the value was
dropped at computed-value time and serialized back as `normal`, because
Style::ContainerType could only represent normal/size/inline-size.

Re-model Style::ContainerType as a flag set (mirroring Style::Contain), so
that `scroll-state` and the `size scroll-state` / `inline-size scroll-state`
combinations are representable and round-trip through getComputedStyle.

This is a value-representation change only. Since `isNormal()` now means
"empty set", the size-containment call sites that previously used
`!isNormal()` are switched to the explicit `hasSizeContainment()` predicate.
This is behavior-neutral for normal/size/inline-size, and keeps `scroll-state`
behaving exactly like `normal` for now; making scroll-state establish a query
container is left to a follow-up.

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/scroll-state/container-type-scroll-state-computed-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::resolveComputedStyle):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::establishesIndependentFormattingContextIgnoringDisplayType
 const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleWillChange):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::hasEligibleContainmentForSizeQuery const):
* Source/WebCore/style/StyleExtractor.cpp:
(WebCore::Style::hasValidStyleForProperty):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::pushParent):
(WebCore::Style::TreeResolver::updateStateForQueryContainer):
* Source/WebCore/style/values/contain/StyleContainerType.cpp:
(WebCore::Style::CSSValueConversion<ContainerType>::operator):
* Source/WebCore/style/values/contain/StyleContainerType.h:
(WebCore::Style::ContainerType::ContainerType):
(WebCore::Style::ContainerType::isNormal const):
(WebCore::Style::ContainerType::hasSize const):
(WebCore::Style::ContainerType::hasInlineSize const):
(WebCore::Style::ContainerType::hasScrollState const):
(WebCore::Style::ContainerType::switchOn const):
(): Deleted.
* Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h:

Canonical link: https://commits.webkit.org/314551@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to