RESOLVED FIXED 30330
SVG wrong filterRegions for userSpaceOnUse and percentage values
https://bugs.webkit.org/show_bug.cgi?id=30330
Summary SVG wrong filterRegions for userSpaceOnUse and percentage values
Dirk Schulze
Reported 2009-10-13 02:42:53 PDT
Created attachment 41096 [details] Example for fFilerRegions problem, should see red,white,blue rects The calculation of filterRegion and subRegions are wrong when filterUnits or filterPrimitiveUnits use userSpaceOnUse and percentage values for x,y,width,height. It would be the best, but difficult to move the complete region code to SVGFilterElement and SVGFilterPrimitiveStandardAttributes. I think we didn't Move it there from the beginning because we need to wait till the rendered object is drawn before we can calculate the regions. I'll investigate this a bit more.
Attachments
Example for fFilerRegions problem, should see red,white,blue rects (498 bytes, image/svg+xml)
2009-10-13 02:42 PDT, Dirk Schulze
no flags
Filter code clean-up (11.27 KB, patch)
2009-10-13 13:25 PDT, Dirk Schulze
no flags
Fix for effectRect values and userSpaceOnUse (43.73 KB, patch)
2009-10-14 12:44 PDT, Dirk Schulze
no flags
Fix for effectRect values and userSpaceOnUse (37.45 KB, patch)
2009-10-14 12:57 PDT, Dirk Schulze
zimmermann: review+
Dirk Schulze
Comment 1 2009-10-13 03:24:41 PDT
Own tests show, that the filterRegion works like expected. It's just effect subRegion that need improvement.
Dirk Schulze
Comment 2 2009-10-13 13:25:52 PDT
Created attachment 41121 [details] Filter code clean-up This clean-up helps to catch the bug. This patch makes the code more look like Masker and Clipping. Moved complete calculation of filterRegion from SVGResourceFilter to SVGFilterElement. This doesn't change functionality. So ne new test needed.
Dirk Schulze
Comment 3 2009-10-14 01:42:02 PDT
Comment on attachment 41121 [details] Filter code clean-up I'll upload an new patch with further clean-up and a fix of the problem.
Dirk Schulze
Comment 4 2009-10-14 12:44:34 PDT
Created attachment 41180 [details] Fix for effectRect values and userSpaceOnUse
Dirk Schulze
Comment 5 2009-10-14 12:57:56 PDT
Created attachment 41182 [details] Fix for effectRect values and userSpaceOnUse Mixed up some patches. Here the correct one.
Nikolas Zimmermann
Comment 6 2009-10-14 13:23:05 PDT
Comment on attachment 41182 [details] Fix for effectRect values and userSpaceOnUse Looks great, r=me.
Dirk Schulze
Comment 7 2009-10-14 13:34:25 PDT
landed in r49582.
Note You need to log in before you can comment on or make changes to this bug.