<?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>250387</bug_id>
          
          <creation_ts>2023-01-10 07:37:06 -0800</creation_ts>
          <short_desc>Using `rotate: x` and `transform: rotate(x)` yields different behavior with SVG</short_desc>
          <delta_ts>2023-01-20 08:58:54 -0800</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>Safari 16</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/37933</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>250901</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Cory LaViska">cory</reporter>
          <assigned_to name="Antoine Quint">graouts</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>graouts</cc>
    
    <cc>karlcow</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1924410</commentid>
    <comment_count>0</comment_count>
    <who name="Cory LaViska">cory</who>
    <bug_when>2023-01-10 07:37:06 -0800</bug_when>
    <thetext>This was reported to me in Shoelace (https://github.com/shoelace-style/shoelace/issues/1121) after switching `transform: rotate(x)` to `rotate: x`. The spinner component suddenly started animating strangely, despite the values supposedly being equivalent. I&apos;ve only been able to reproduce this in Safari.

I reduced the problem down to what seems like an issue with SVG elements, possibly limited to animating `stroke-dasharray`. The following CodePen example draws two SVGs. Both are identical, but the one on the left uses `rotate: x` and the one on the right uses `transform: rotate(x)`. The one on the left animates back and forth, whereas the one on the right animates the full circle.

https://codepen.io/claviska/pen/dyjvebY?editors=1100

I haven&apos;t been able to find other reports of this in the bug tracker. It happens in Safari 16 and TP (Release 160).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1924794</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-01-11 07:34:20 -0800</bug_when>
    <thetext>I am able to reproduce this bug in Safari 16.2 and Safari Technology Preview 160 using CodePen from Comment 0, while Chrome Canary 111 &amp; Firefox Nightly 110 match each other and does not exhibit same error as Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925285</commentid>
    <comment_count>2</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-13 03:04:22 -0800</bug_when>
    <thetext>This seems to be specific to animation, static use of `rotate` and `transform: rotate()` yield similar results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925303</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-13 04:20:11 -0800</bug_when>
    <thetext>We fail to create a CSSAnimation for the &quot;rotate&quot; case while we do for the &quot;transform&quot; case. We must maintain a list somewhere of properties that are eligible for animation on SVG elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925312</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-13 04:40:30 -0800</bug_when>
    <thetext>Actually, this was user error :) The problem is that when we get to LegacyRenderSVGShape::layout(), m_needsTransformUpdate is false. We most likely need to make LegacyRenderSVGModelObject::styleDidChange() aware of individual transform properties.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925334</commentid>
    <comment_count>5</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-13 07:11:12 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/8620</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925335</commentid>
    <comment_count>6</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2023-01-13 07:12:37 -0800</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/37933</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925412</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-01-13 11:58:13 -0800</bug_when>
    <thetext>Committed 258882@main (540afd688321): &lt;https://commits.webkit.org/258882@main&gt;

Reviewed commits have been landed. Closing PR #8620 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925413</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-13 11:59:20 -0800</bug_when>
    <thetext>&lt;rdar://problem/104234342&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>