<?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>139412</bug_id>
          
          <creation_ts>2014-12-08 13:36:09 -0800</creation_ts>
          <short_desc>SVG chained filter effects clip out-of-region drawing incorrectly</short_desc>
          <delta_ts>2026-02-14 14:50:53 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>krit</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1053499</commentid>
    <comment_count>0</comment_count>
      <attachid>242844</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2014-12-08 13:36:09 -0800</bug_when>
    <thetext>Created attachment 242844
Test case

Open the following SVG in WebKit:

&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
    &lt;filter id=&quot;f1&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; filterUnits=&quot;userSpaceOnUse&quot;&gt;
      &lt;!-- Create a green square at x=0. --&gt;
      &lt;feFlood result=&quot;red&quot; x=&quot;100&quot; y=&quot;0&quot; flood-color=&quot;red&quot;/&gt;
      &lt;feFlood result=&quot;green&quot; flood-color=&quot;green&quot;/&gt;
      &lt;!--
          Attempt to offset the red square left to cover up the green square.
          However, this filter&apos;s filter region should clip away the red square,
          and only transparent pixels should be offset left, leaving the green
          square intact.
      --&gt;
      &lt;feOffset result=&quot;red&quot; in=&quot;SourceGraphic&quot; dx=&quot;-100&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;200&quot; height=&quot;100&quot;/&gt;
      &lt;feMerge&gt;
          &lt;feMergeNode in=&quot;green&quot;/&gt;
          &lt;feMergeNode in=&quot;red&quot;/&gt;
      &lt;/feMerge&gt;
    &lt;/filter&gt;
    &lt;rect x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; filter=&quot;url(#f1)&quot;/&gt;
&lt;/svg&gt;

Result: Nothing is drawn.
Expected: A 100 x 100 green rectangle. A black rectangle is drawn at (0,0). The filter f1 has a red rectangle drawn at (100,0). This rectangle should be completely clipped since it outside the rectangle area of the target element. When offsetting this rectangle with dx=-1, this should not have any effect because it clipped when it was first drawn. Merging this empty rectangle with a green rectangle should result in a green rectangle at (0,0)

NOTE: FireFox and Chrome both render this SVG as expected.
NOTE: This test is an imported test from Mozilla SVG test suite but is modified a little to narrow down the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053501</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-12-08 13:36:54 -0800</bug_when>
    <thetext>&lt;rdar://problem/19180719&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053502</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2014-12-08 13:37:20 -0800</bug_when>
    <thetext>IIRC there is a dupe for this one already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213927</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-07-23 11:00:23 -0700</bug_when>
    <thetext>These tests are flaky (sometimes pass) on GTK, passing more often now that we&apos;ve enabled threaded compositor. Updating expectations accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1905953</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-10-16 04:43:42 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari Technology Preview 155 as well, where nothing is draw while both Chrome Canary 108 and Firefox Nightly 107 have &quot;green&quot; square. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953617</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-08 02:28:09 -0700</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #4)
&gt; I am able to reproduce this bug in Safari Technology Preview 155 as well,
&gt; where nothing is draw while both Chrome Canary 108 and Firefox Nightly 107
&gt; have &quot;green&quot; square. Thanks!

With LBSE turned on using WebKit ToT (minibrowser), it does show &apos;black&apos; rectangle compared to &apos;green&apos; of other browsers. So LBSE slightly progresses this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>242844</attachid>
            <date>2014-12-08 13:36:09 -0800</date>
            <delta_ts>2014-12-08 13:36:09 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>clip-input.svg</filename>
            <type>image/svg+xml</type>
            <size>858</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGZpbHRlciBpZD0i
ZjEiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWx0ZXJVbml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