<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>315483</bug_id>
          
          <creation_ts>2026-05-24 19:46:53 -0700</creation_ts>
          <short_desc>Refactor container-type into a Style value type</short_desc>
          <delta_ts>2026-05-25 23:21:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>klee</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2213736</commentid>
    <comment_count>0</comment_count>
    <who name="">klee</who>
    <bug_when>2026-05-24 19:46:53 -0700</bug_when>
    <thetext>The container-type property&apos;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 &lt;-&gt; 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. &quot;size scroll-state&quot;, &quot;inline-size scroll-state&quot;). 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 &lt;-&gt; 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 &quot;reference&quot;) with a custom CSSValueConversion
and switchOn, matching the sibling properties stored in the same struct
(scrollbar-gutter -&gt; Style::ScrollbarGutter, scroll-snap-type -&gt; 
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213737</commentid>
    <comment_count>1</comment_count>
    <who name="">klee</who>
    <bug_when>2026-05-24 19:55:42 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/65594</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2214022</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-25 23:20:56 -0700</bug_when>
    <thetext>Committed 313869@main (d9dde2e0b6ed): &lt;https://commits.webkit.org/313869@main&gt;

Reviewed commits have been landed. Closing PR #65594 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2214023</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-05-25 23:21:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/177921550&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>