Bug 139282

Summary: feConvolveMatrix does not work correctly when it is defined in the <defs> section and referenced by an svg element
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Safari-Rendering
none
FireFox-Rendering none

Description Said Abou-Hallawa 2014-12-04 19:17:23 PST
Open the following svg in WebKit:

<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
     
  <defs>
    <image id="MyImage" width="10" height="10" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAADdJREFUGNNjZGD4/5+BCMDCwMDAwNDQiF9VQz0DEwORgPoKGRkY/v9fe+M5XkXBGpID7kZiFAIAEbULDl5w/68AAAAASUVORK5CYII="/>
    <filter id="noop" x="0%" y="0%" width="100%" height="100%">
      <feConvolveMatrix order="1" kernelMatrix="1"/>
    </filter>
  </defs>

  <g transform="translate(10, 10)">
    <use x="0" y="0" xlink:href="#MyImage" />
    <use x="20" y="0" xlink:href="#MyImage">
      <filter id="noop" x="0%" y="0%" width="100%" height="100%">
        <feConvolveMatrix order="1" kernelMatrix="1"/>
      </filter>
    </use>
    <g filter="url(#noop)">
      <use x="40" y="0" xlink:href="#MyImage" />
    </g>
  </g>
</svg>

Result: The last image looks different from the first two images.
Expected: The three images should look exactly the same. The first image is the row image. The second image has a convolution matrix filter with no-opertaion matrix so the image should not be affected by this filter. The third image has the same filter but it references it from the <defs> section. So It should look the same as the first two but it does not.
Comment 1 Said Abou-Hallawa 2014-12-04 19:17:43 PST
Created attachment 242609 [details]
Safari-Rendering
Comment 2 Said Abou-Hallawa 2014-12-04 19:18:03 PST
Created attachment 242610 [details]
FireFox-Rendering
Comment 3 Radar WebKit Bug Importer 2014-12-04 19:19:02 PST
<rdar://problem/19152706>
Comment 4 Said Abou-Hallawa 2014-12-05 15:35:43 PST

*** This bug has been marked as a duplicate of bug 139281 ***