<?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>288819</bug_id>
          
          <creation_ts>2025-02-28 02:34:56 -0800</creation_ts>
          <short_desc>[css-grid] `ASSERT(!isCalculated())` in `Length::value()` is hit under `RenderGrid::computeAutoRepeatTracksCount()` when loading https://kizu.dev/position-driven-styles/</short_desc>
          <delta_ts>2025-05-01 07:34:57 -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>Layout and Rendering</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/52275</see_also>
          <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 name="Antoine Quint">graouts</reporter>
          <assigned_to name="Sammy Gill">sgill26</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>koivisto</cc>
    
    <cc>sgill26</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zsun</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2099163</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-02-28 02:34:56 -0800</bug_when>
    <thetext>If you load https://kizu.dev/position-driven-styles/ with a ToT (291310@main) debug build, you hit `ASSERT(!isCalculated())` in `Length::value()` under a line `RenderGrid::computeAutoRepeatTracksCount()`. This occurs as the `transform` computed style is requested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2099164</commentid>
    <comment_count>1</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-02-28 02:38:07 -0800</bug_when>
    <thetext>This page uses Scroll-driven Animations and that assertion is not hit if that flag is disabled. However the stack trace does not involve the animation code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2101328</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-03-07 02:35:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/146466356&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2114309</commentid>
    <comment_count>3</comment_count>
      <attachid>475098</attachid>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2025-04-30 14:28:28 -0700</bug_when>
    <thetext>Created attachment 475098
Reduced test case

Attaching reduced test case. It seems like this code is attempting to apply the following logic from the spec when it comes to determine the count of the auto repeat rows:

&quot;For this purpose, each track is treated as its max track sizing function if that is definite or else its min track sizing function if that is definite. If both are definite, floor the max track sizing function by the min track sizing function. If neither are definite, the number of repetitions is one.&quot;

https://drafts.csswg.org/css-grid-2/#auto-repeat

We seem to fail to consider calc values here and presumably we should be using valueForLength in order to compute a proper value</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2114320</commentid>
    <comment_count>4</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2025-04-30 14:50:28 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/44764</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2114359</commentid>
    <comment_count>5</comment_count>
    <who name="Sammy Gill">sgill26</who>
    <bug_when>2025-04-30 20:36:34 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/52275</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2114410</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-05-01 07:34:54 -0700</bug_when>
    <thetext>Committed 294374@main (417c5cd1cddf): &lt;https://commits.webkit.org/294374@main&gt;

Reviewed commits have been landed. Closing PR #44764 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>475098</attachid>
            <date>2025-04-30 14:28:28 -0700</date>
            <delta_ts>2025-04-30 14:28:28 -0700</delta_ts>
            <desc>Reduced test case</desc>
            <filename>reduced.html</filename>
            <type>text/html</type>
            <size>449</size>
            <attacher name="Sammy Gill">sgill26</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+IA0KPGh0bWw+DQo8aGVhZD4NCjxzdHlsZT4NCiAgLmdyaWQgew0KICAg
IGRpc3BsYXk6IGdyaWQ7DQogICAgd2lkdGg6IDEwMHB4Ow0KICAgIGdyaWQtdGVtcGxhdGUtY29s
dW1uczogcmVwZWF0KGF1dG8tZml0LCBtaW5tYXgoY2FsYygxMDAlIC0gMTBweCksIGNhbGMoMTAw
JSAtIDEwMHB4KSkpOw0KICAgIGJhY2tncm91bmQtY29sb3I6IGdyZWVuOw0KICB9DQo8L3N0eWxl
Pg0KPC9oZWFkPg0KICA8Ym9keT4NCiAgICA8cD5UZXN0IHBhc3NlcyBpZiB0aGVyZSBpcyBhIGZp
bGxlZCBncmVlbiBzcXVhcmUuPC9wPg0KICAgIDxkaXYgY2xhc3M9ImdyaWQiPg0KICAgICAgPGRp
diBzdHlsZT0iaGVpZ2h0OiA1MHB4OyI+PC9kaXY+DQogICAgICA8ZGl2IHN0eWxlPSJoZWlnaHQ6
IDUwcHg7Ij48L2Rpdj4NCiAgICA8L2Rpdj4NCiAgPC9ib2R5Pg0KPC9odG1sPg0KDQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>