Bug 139237 - SVG filter effect does not respect its region when its ancestor filter is referenced in the svg
Summary: SVG filter effect does not respect its region when its ancestor filter is ref...
Status: RESOLVED DUPLICATE of bug 137856
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-12-03 15:47 PST by Said Abou-Hallawa
Modified: 2015-06-08 13:07 PDT (History)
2 users (show)

See Also:


Attachments
Safari-Rendering (14.34 KB, image/png)
2014-12-03 15:47 PST, Said Abou-Hallawa
no flags Details
FireFox Rendering (42.86 KB, image/png)
2014-12-03 15:47 PST, Said Abou-Hallawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2014-12-03 15:47:26 PST
Created attachment 242533 [details]
Safari-Rendering

Open the following svg in WebKit:

<svg xmlns="http://www.w3.org/2000/svg">

  <filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
    <feFlood flood-color="#ff0000" result="flood"/>
    <feComposite x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
         in="flood" operator="in" in2="SourceGraphic"/>
  </filter>
  <g filter="url(#f2)">
    <rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
  </g>

</svg>

Result: The region applied on the filter effect <feComposite> is ignored. The red rectangle is displayed at position = (0,0) with size = (100,100).
Expected: The red rectangle should be displayed at position = (10,10) with size (80,80). See the attached screen-shots for how Safari and FireFox are displaying the above svg.

NOTE: Chrome and FireFox respect the filter effect region and they behave exactly the same.
Comment 1 Said Abou-Hallawa 2014-12-03 15:47:44 PST
Created attachment 242534 [details]
FireFox Rendering
Comment 2 Radar WebKit Bug Importer 2014-12-03 15:49:07 PST
<rdar://problem/19135823>
Comment 3 Said Abou-Hallawa 2015-06-08 13:07:14 PDT
This is caused because of the bug in calculating the absolutePaintRect of the feComposite filter when the operator is 'in'. This issue is already covered by https://bugs.webkit.org/show_bug.cgi?id=137856. So closing this is a d dupe.

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