<?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>279012</bug_id>
          
          <creation_ts>2024-09-02 03:51:04 -0700</creation_ts>
          <short_desc>Transitioning Unregistered Custom Properties cause a transition loop</short_desc>
          <delta_ts>2024-09-04 00:04:54 -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>Animations</component>
          <version>Other</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/47939</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="Bramus">bramus</reporter>
          <assigned_to name="Antoine Quint">graouts</assigned_to>
          <cc>graouts</cc>
    
    <cc>graouts</cc>
    
    <cc>jaffathecake</cc>
    
    <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2056975</commentid>
    <comment_count>0</comment_count>
    <who name="Bramus">bramus</who>
    <bug_when>2024-09-02 03:51:04 -0700</bug_when>
    <thetext>(This bug was discovered while building `@bramus/style-observer`, a library that responds to changes in computed styles. For this it relies on CSS Transitions and `transition-behavior: allow-discrete`. See https://brm.us/style-observer for details about this library.)

Transitioning Unregistered Custom Properties cause a transition loop

- Demo: https://allow-discrete-bugs.netlify.app/safari/unregistered-loop/ – the custom properties `--variable1` and `--variable2` are not registered.
- Expected behavior: When clicking the `--variable1` or `--variable2` buttons, the output should change and the transition should have triggered only once.
- Actual Behavior: While the output does change, the transition is repeatedly triggered. You can verify this by checking the console, which logs `&quot;_handleUpdate&quot;` on `transitionstart`

Tested in Safari Technology Preview 202</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057013</commentid>
    <comment_count>1</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-02 07:06:37 -0700</bug_when>
    <thetext>Hi Bramus, thanks for the report. I&apos;ll probably get to it myself eventually, but could you perhaps make a reduction that does not involve any third-party script? It could help reduce the complexity and help identifying the source of the bug. Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057015</commentid>
    <comment_count>2</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2024-09-02 07:20:25 -0700</bug_when>
    <thetext>Here&apos;s a reduction https://output.jsbin.com/pejadit/3/quiet</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057016</commentid>
    <comment_count>3</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2024-09-02 07:21:35 -0700</bug_when>
    <thetext>Expected: A single transitionstart event for the single style change.
Actual: transitionstart appears to fire every frame thereafter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057043</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-02 10:11:52 -0700</bug_when>
    <thetext>That&apos;s excellent, thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057049</commentid>
    <comment_count>5</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-02 10:21:18 -0700</bug_when>
    <thetext>We enter this clause in `updateCSSTransitionsForStyleableAndProperty` for each style resolution: 

// 4. Otherwise, implementations must cancel the running transition and start a new transition whose:

I haven&apos;t worked out what is failing to take us here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057051</commentid>
    <comment_count>6</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-02 10:26:23 -0700</bug_when>
    <thetext>Presumably it&apos;s the propertyInStyleMatchesValueForTransitionInMap() call which returns false but it should return true.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057053</commentid>
    <comment_count>7</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-02 10:30:08 -0700</bug_when>
    <thetext>CSSPropertyAnimation::propertiesEqual() returns falses with none of the if statements in the custom property variant being hit. I assume this is because this is an unregistered property and we don&apos;t know how to compare values.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057055</commentid>
    <comment_count>8</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2024-09-02 10:36:33 -0700</bug_when>
    <thetext>I believe the bug also happens if the property is registered as &quot;*&quot;. Maybe even &lt;custom-ident&gt; too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057056</commentid>
    <comment_count>9</comment_count>
    <who name="Bramus">bramus</who>
    <bug_when>2024-09-02 10:40:11 -0700</bug_when>
    <thetext>(In reply to Jake Archibald from comment #8)
&gt; I believe the bug also happens if the property is registered as &quot;*&quot;. Maybe
&gt; even &lt;custom-ident&gt; too.

Yes, that would be https://bugs.webkit.org/show_bug.cgi?id=279013

It happens for `&quot;*&quot;` but not for `&quot;&lt;custom-ident&gt;&quot;`, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057191</commentid>
    <comment_count>10</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-03 02:30:05 -0700</bug_when>
    <thetext>*** Bug 279013 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057212</commentid>
    <comment_count>11</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-03 06:00:12 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/33061</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057213</commentid>
    <comment_count>12</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-03 06:03:24 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/47939</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057284</commentid>
    <comment_count>13</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-03 10:10:38 -0700</bug_when>
    <thetext>Committed 283099@main (7f45cbdcfbf5): &lt;https://commits.webkit.org/283099@main&gt;

Reviewed commits have been landed. Closing PR #33061 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057285</commentid>
    <comment_count>14</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-03 10:11:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/135205514&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057317</commentid>
    <comment_count>15</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2024-09-03 11:16:05 -0700</bug_when>
    <thetext>Thank you for fixing this so quickly!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057492</commentid>
    <comment_count>16</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-04 00:04:54 -0700</bug_when>
    <thetext>Thanks for filing with a simple test case, that&apos;s a lot of the work towards a fix already done :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>