<?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>221788</bug_id>
          
          <creation_ts>2021-02-11 17:20:19 -0800</creation_ts>
          <short_desc>clip-path does not update dynamically when svg path changes if using GPU rendering</short_desc>
          <delta_ts>2026-01-04 18:37:45 -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>SVG</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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 name="Jonathan Deutsch">jonathan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>jonathan</cc>
    
    <cc>karlcow</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1728379</commentid>
    <comment_count>0</comment_count>
      <attachid>420072</attachid>
    <who name="Jonathan Deutsch">jonathan</who>
    <bug_when>2021-02-11 17:20:19 -0800</bug_when>
    <thetext>Created attachment 420072
Reproduction document

If a CSS clip-path is set to an element that uses a SVG id, changing the &quot;d&quot; component does not update the clip path immediately when the element uses GPU acceleration (via transform:rotateY(0deg).

If you resize the window or do something to force redrawing, it will show up correctly.  Not using GPU rendering also will make this work.  It is not a problem on Chrome/Firefox.

I&apos;ve attached a reproduction case. Click the shape to get the clip path to change. After clicking, do something like resize the window and you&apos;ll see it change then.

This affects content made with Tumult Hype [https://tumult.com/hype/].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1728424</commentid>
    <comment_count>1</comment_count>
      <attachid>420082</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2021-02-11 19:48:31 -0800</bug_when>
    <thetext>Created attachment 420082
reduced test case

I think the problem is not related to GPU acceleration or the compositing. I am attaching a reduced test case which does not include any compositing.

I think the problem is when the CSS of an element references an SVG &quot;clip-path&quot;, the renderer of this element is not registered as client of the RenderSVGResourceContainer of SVG &quot;clip-path&quot;. This is already done for any SVG element which references the same SVG &quot;clip-path&quot; but it is not done for any other non SVG element.

When the SVG &quot;clip-path&quot; changes, its renderer &apos;RenderSVGResourceContainer&apos; invalidates all the clients in RenderSVGResourceContainer::markAllClientsForInvalidation().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1728437</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Deutsch">jonathan</who>
    <bug_when>2021-02-11 20:33:39 -0800</bug_when>
    <thetext>Yes - it looks like you are correct.  Removal of the rotateY(0deg) from my example leads to different behavior that lead me to think it was the culprit, but with some additional testing I can see there are ways it still is wrong with that. Your example easily repros it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1731113</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-02-18 17:21:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/74501548&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168836</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-01 17:14:07 -0800</bug_when>
    <thetext>Is this bug reproducible? I am unable to reproduce it on Safari Technology Preview 234 + ToT.

@Karl - is it reproducing for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2169183</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-01-04 18:37:45 -0800</bug_when>
    <thetext>The bug doesn&apos;t reproduce after clicking on the change path. It changes it from a square to a triangle.
Tested in:
Safari Technology Preview  234          21624.1.6
Firefox Nightly            148.0a1       14826.1.4
Google Chrome Canary       145.0.7598.0  7598.0</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>420072</attachid>
            <date>2021-02-11 17:20:19 -0800</date>
            <delta_ts>2021-02-11 17:20:19 -0800</delta_ts>
            <desc>Reproduction document</desc>
            <filename>clippathbug.html</filename>
            <type>text/html</type>
            <size>936</size>
            <attacher name="Jonathan Deutsch">jonathan</attacher>
            
              <data encoding="base64">CjxkaXYgc3R5bGU9InBvc2l0aW9uOiBhYnNvbHV0ZTsgd2lkdGg6IDEwMCU7IGhlaWdodDogMTAw
JTsgei1pbmRleDogNjsiIG9ubW91c2Vkb3duPSJjaGFuZ2VwYXRoKCkiPgoJPHN2ZyB3aWR0aD0i
MTAwJSIgaGVpZ2h0PSIxMDAlIiBzdHlsZT0icG9zaXRpb246YWJzb2x1dGU7IiBwcmVzZXJ2ZUFz
cGVjdFJhdGlvPSJub25lIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8y
MDAwL3N2ZyIgdmlld0JveD0iMCAwIDY2NCA0MDQiPgoJCTxkZWZzPgoJCQk8Y2xpcFBhdGggaWQ9
ImNsaXBwYXRoIj4KCQkJCTxwYXRoIGlkPSJ0aGVQYXRoIiBkPSJNMTAwIDEwMCBMIDEwMCAzMDAg
TCAxMDAgNDAwIEwgMTAwIDQwMCBMIDMwMCAzMDAgWiI+PC9wYXRoPgoJCQk8L2NsaXBQYXRoPgoJ
CTwvZGVmcz4KCTwvc3ZnPgo8L2Rpdj4KPGRpdiBzdHlsZT0icG9zaXRpb246IGFic29sdXRlOyB0
b3A6IDBweDsgbGVmdDogMHB4OyB3aWR0aDogMTAwJTsgaGVpZ2h0OiAxMDAlOyBjbGlwLXBhdGg6
IHVybCgmcXVvdDsjY2xpcHBhdGgmcXVvdDspOyI+Cgk8ZGl2IHN0eWxlPSJ0cmFuc2Zvcm06IHJv
dGF0ZVkoMGRlZyk7IHdpZHRoOiA2MDBweDsgaGVpZ2h0OiA0MDBweDsgcG9zaXRpb246IGFic29s
dXRlOyBiYWNrZ3JvdW5kLWNvbG9yOiB3aGVhdDsiPjwvZGl2Pgo8L2Rpdj4KCgo8c2NyaXB0PgoK
ZnVuY3Rpb24gY2hhbmdlcGF0aCgpIHsKCXRoZVBhdGguc2V0QXR0cmlidXRlKCJkIiwgIk0zMDAg
MzAwIEwgNDAwIDMwMCBMIDQwMCA0MDAgTCAzMDAgNDAwIEwgMzAwIDMwMCBaIik7CgkKfQoKPC9z
Y3JpcHQ+CgpjbGljayBvbiB0aGUgc2hhcGUuIHRoZSBjbGlwIHBhdGggc2hvdWxkIGNoYW5nZSBp
bW1lZGlhdGVseSwgYnV0IGl0IGRvZXMgbm90LiBJdCBzZWVtcyB0aGlzIGlzIGR1ZSB0byB0aGUg
dHJhbnNmb3JtOnJvdGF0ZVkoMGRlZyku
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>420082</attachid>
            <date>2021-02-11 19:48:31 -0800</date>
            <delta_ts>2021-02-11 19:48:31 -0800</delta_ts>
            <desc>reduced test case</desc>
            <filename>test021.html</filename>
            <type>text/html</type>
            <size>878</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PHN0eWxlPgogICAgLmNvbnRhaW5lciB7CiAgICAgICAgd2lkdGg6IDEwMHB4OwogICAgICAgIGhl
aWdodDogMTAwcHg7CiAgICAgICAgYm9yZGVyOiAxcHggc29saWQgcmVkOwogICAgfQogICAgLmJv
eCB7CiAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgIGJh
Y2tncm91bmQtY29sb3I6IGdyZWVuOwogICAgICAgIGNsaXAtcGF0aDogdXJsKCIjY2xpcHBhdGgi
KTsKICAgIH0KPC9zdHlsZT4KPGJvZHk+CiAgICA8ZGl2IGNsYXNzPSJjb250YWluZXIiPgogICAg
ICAgIDxkaXYgY2xhc3M9ImJveCI+PC9kaXY+CiAgICA8L2Rpdj4KICAgIDxidXR0b24gb25jbGlj
az0iY2hhbmdlcGF0aCgpIj5DaGFuZ2UgUGF0aDwvYnV0dG9uPgogICAgPHN2ZyB2aWV3Qm94PSIw
IDAgMTAwIDEwMCI+CiAgICAgICAgPGRlZnM+CiAgICAgICAgICAgIDxjbGlwUGF0aCBpZD0iY2xp
cHBhdGgiPgogICAgICAgICAgICAgICAgPHBhdGggaWQ9InRoZVBhdGgiIGQ9Ik01MCwwIEwxMDAs
MTAwIEwwLDEwMCBaIj48L3BhdGg+CiAgICAgICAgICAgIDwvY2xpcFBhdGg+CiAgICAgICAgPC9k
ZWZzPgogICAgPC9zdmc+CiAgICA8c2NyaXB0PgogICAgICAgIHZhciBjb3VudCA9IDA7CiAgICAg
ICAgZnVuY3Rpb24gY2hhbmdlcGF0aCgpIHsKICAgICAgICAgICAgaWYgKCsrY291bnQgJSAyKQog
ICAgICAgICAgICAgICAgdGhlUGF0aC5zZXRBdHRyaWJ1dGUoImQiLCAiTTI1LDI1IEw3NSwyNSBM
NzUsNzUgTDI1LDc1IFoiKTsKICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgdGhlUGF0
aC5zZXRBdHRyaWJ1dGUoImQiLCAiTTUwLDAgTDEwMCwxMDAgTDAsMTAwIFoiKTsKICAgICAgICB9
CiAgICA8L3NjcmlwdD4KPC9ib2R5Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>