<?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>234298</bug_id>
          
          <creation_ts>2021-12-14 08:23:33 -0800</creation_ts>
          <short_desc>Implement SVG filter interface for Canvas2D</short_desc>
          <delta_ts>2022-05-02 07:44:19 -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>Canvas</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Aaron Krajeski">aaronhk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annevk</cc>
    
    <cc>ben.browitt</cc>
    
    <cc>dino</cc>
    
    <cc>philip</cc>
    
    <cc>tomac</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1824004</commentid>
    <comment_count>0</comment_count>
    <who name="Aaron Krajeski">aaronhk</who>
    <bug_when>2021-12-14 08:23:33 -0800</bug_when>
    <thetext>SVG filters are currently useable in canvas2D but there is no javascript interface for them. WHATWG has recently approved spec changes to this effect:
https://github.com/whatwg/html/issues/5621

Tests are written and can be reviewed and commented upon at:
https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/manual/filters
https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/filters
https://github.com/web-platform-tests/wpt/tree/master/html/canvas/offscreen/filters

Chromium implementation bug: crbug.com/1169216</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1826008</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-12-21 08:24:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/86770008&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1828865</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philip</who>
    <bug_when>2022-01-07 03:47:48 -0800</bug_when>
    <thetext>See also bug 198416, which is about the basic support (string) for the filter attribute. Or at least it was filed before CanvasFilter was added to the spec, so that&apos;s a reasonable interpretation of it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842235</commentid>
    <comment_count>3</comment_count>
    <who name="Thomas Steiner">tomac</who>
    <bug_when>2022-02-16 04:29:38 -0800</bug_when>
    <thetext>I would love to use this in my app SVGcode (https://svgco.de/), since the alternative is to work with dynamically built SVG filter strings (https://github.com/tomayac/SVGcode/blob/ae0a3fbf616afee2accdbfaae1c2d79713f631c7/src/js/preprocess.js#L151-L205), which works if I force this execution path in Chrome, but which fails in Safari (tracked as https://bugs.webkit.org/show_bug.cgi?id=198416#c6). So despite being clumsy, it&apos;s not even a working work-around.

Long story short, having the new `CanvasFilter` would make my code a lot easier (https://github.com/tomayac/SVGcode/blob/main/src/js/preprocessworker.js#L89-L113).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842386</commentid>
    <comment_count>4</comment_count>
    <who name="Aaron Krajeski">aaronhk</who>
    <bug_when>2022-02-16 10:47:19 -0800</bug_when>
    <thetext>@Thomas Steiner

Have you tried in Chrome Canary? The feature is launched there!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842416</commentid>
    <comment_count>5</comment_count>
    <who name="Aaron Krajeski">aaronhk</who>
    <bug_when>2022-02-16 11:41:27 -0800</bug_when>
    <thetext>(In reply to Aaron Krajeski from comment #4)
&gt; @Thomas Steiner
&gt; 
&gt; Have you tried in Chrome Canary? The feature is launched there!

Never mind! I just re-read your comment. Glad you&apos;re using the new feature in Chrome!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1842491</commentid>
    <comment_count>6</comment_count>
    <who name="Thomas Steiner">tomac</who>
    <bug_when>2022-02-16 13:27:25 -0800</bug_when>
    <thetext>&gt; Never mind! I just re-read your comment. Glad you&apos;re using the new feature in Chrome!

Yeah, I use the new code path by default in Chrome, but what I meant with “forcing” the other code path in Chrome was to artificially fail my feature detection so Chrome takes the Safari/Firefox code path just to verify the approach works in theory (it doesn’t in Safari/Firefox in practice).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865817</commentid>
    <comment_count>7</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2022-05-02 07:44:19 -0700</bug_when>
    <thetext>Resolving this as INVALID per https://github.com/whatwg/html/pull/7874.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>