WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
315483
Refactor container-type into a Style value type
https://bugs.webkit.org/show_bug.cgi?id=315483
Summary
Refactor container-type into a Style value type
klee
Reported
2026-05-24 19:46:53 PDT
The container-type property's computed value is currently represented by the ContainerType enum (normal | size | inline-size), stored as a 2-bit bitfield in StyleNonInheritedRareData and converted to/from CSS via the generated 1:1 keyword <-> CSSValueID mapping. css-conditional-5 redefines the grammar as: container-type = normal | [ [ size | inline-size ] || scroll-state ]
https://drafts.csswg.org/css-conditional-5/#container-type
The `||` combinator means scroll-state can be combined with size or inline-size (e.g. "size scroll-state", "inline-size scroll-state"). A combined value parses to a CSSValuePair of two keywords, and its computed value must serialize back to two keywords. The generated enum storage relies on a single keyword <-> single enum value mapping for both parsing and computed-value serialization, so it cannot represent or round-trip a combined value. container-type can therefore no longer be a plain enum. This bug covers the preparatory, non-functional refactor: migrate container-type to a Style::ContainerType value type (computed-style-storage-kind "reference") with a custom CSSValueConversion and switchOn, matching the sibling properties stored in the same struct (scrollbar-gutter -> Style::ScrollbarGutter, scroll-snap-type -> Style::ScrollSnapType). Only normal, size and inline-size are supported in this change -- there is no behavior change. The scroll-state value itself, including the combined forms and the feature flag, will be added on top in
bug 314082
.
Attachments
Add attachment
proposed patch, testcase, etc.
klee
Comment 1
2026-05-24 19:55:42 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65594
EWS
Comment 2
2026-05-25 23:20:56 PDT
Committed
313869@main
(d9dde2e0b6ed): <
https://commits.webkit.org/313869@main
> Reviewed commits have been landed. Closing PR #65594 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2026-05-25 23:21:13 PDT
<
rdar://problem/177921550
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug