Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d9dde2e0b6ed3ddd7106f786f27f7a2caf512129
      
https://github.com/WebKit/WebKit/commit/d9dde2e0b6ed3ddd7106f786f27f7a2caf512129
  Author: Kate Lee <[email protected]>
  Date:   2026-05-25 (Mon, 25 May 2026)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/css/CSSProperties.json
    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/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebCore/style/ContainerQueryEvaluator.cpp
    M Source/WebCore/style/StyleBuilderCustom.h
    M Source/WebCore/style/StyleExtractor.cpp
    M Source/WebCore/style/StyleExtractorCustom.h
    M Source/WebCore/style/StyleScope.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp
    M Source/WebCore/style/computed/StyleComputedStyleBase.h
    M Source/WebCore/style/computed/data/StyleNonInheritedRareData.cpp
    M Source/WebCore/style/computed/data/StyleNonInheritedRareData.h
    A Source/WebCore/style/values/contain/StyleContainerType.cpp
    A Source/WebCore/style/values/contain/StyleContainerType.h
    M Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h

  Log Message:
  -----------
  Refactor container-type into a Style value type
https://bugs.webkit.org/show_bug.cgi?id=315483

Reviewed by Sam Weinig and Tim Nguyen.

Migrate the computed value of the container-type property from the
ContainerType enum (a 2-bit bitfield in NonInheritedRareData) to a
Style::ContainerType value type with computed-style-storage-kind
"reference", matching the sibling properties stored in the same struct
(scrollbar-gutter -> Style::ScrollbarGutter, scroll-snap-type ->
Style::ScrollSnapType).

This is a preparatory, non-functional change: only normal, size and
inline-size are supported, exactly as before. Call sites that compared
against ContainerType::Normal now use the equivalent isNormal() /
hasSize() / hasInlineSize() accessors on Style::ContainerType.

No new tests, as there is no behavior change.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* 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/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::usedContain const):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::selectContainer):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::forwardInheritedValue):
* Source/WebCore/style/StyleExtractor.cpp:
(WebCore::Style::hasValidStyleForProperty):
* Source/WebCore/style/StyleExtractorCustom.h:
(WebCore::Style::ExtractorCustom::extractContainerShorthand):
(WebCore::Style::ExtractorCustom::extractContainerShorthandSerialization):
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::invalidateForContainerDependencies):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::pushParent):
(WebCore::Style::TreeResolver::updateStateForQueryContainer):
* Source/WebCore/style/computed/StyleComputedStyleBase.h:
* Source/WebCore/style/computed/data/StyleNonInheritedRareData.cpp:
(WebCore::Style::NonInheritedRareData::NonInheritedRareData):
(WebCore::Style::NonInheritedRareData::operator== const):
(WebCore::Style::NonInheritedRareData::usedContain const):
(WebCore::Style::NonInheritedRareData::dumpDifferences const):
* Source/WebCore/style/computed/data/StyleNonInheritedRareData.h:
* Source/WebCore/style/values/contain/StyleContainerType.cpp: Added.
(WebCore::Style::CSSValueConversion<ContainerType>::operator):
* Source/WebCore/style/values/contain/StyleContainerType.h: Added.
(WebCore::Style::ContainerType::ContainerType):
(WebCore::Style::ContainerType::isNormal const):
(WebCore::Style::ContainerType::hasSize const):
(WebCore::Style::ContainerType::hasInlineSize const):
(WebCore::Style::ContainerType::hasSizeContainment const):
(WebCore::Style::ContainerType::switchOn const):
* Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h:

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



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

Reply via email to