Bug 30330 - SVG wrong filterRegions for userSpaceOnUse and percentage values
Summary: SVG wrong filterRegions for userSpaceOnUse and percentage values
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dirk Schulze
URL:
Keywords:
Depends on:
Blocks: 68469 26389
  Show dependency treegraph
 
Reported: 2009-10-13 02:42 PDT by Dirk Schulze
Modified: 2014-05-12 05:54 PDT (History)
1 user (show)

See Also:


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 Details
Filter code clean-up (11.27 KB, patch)
2009-10-13 13:25 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
Fix for effectRect values and userSpaceOnUse (43.73 KB, patch)
2009-10-14 12:44 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
Fix for effectRect values and userSpaceOnUse (37.45 KB, patch)
2009-10-14 12:57 PDT, Dirk Schulze
zimmermann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 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.
Comment 1 Dirk Schulze 2009-10-13 03:24:41 PDT
Own tests show, that the filterRegion works like expected. It's just effect subRegion that need improvement.
Comment 2 Dirk Schulze 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.
Comment 3 Dirk Schulze 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.
Comment 4 Dirk Schulze 2009-10-14 12:44:34 PDT
Created attachment 41180 [details]
Fix for effectRect values and userSpaceOnUse
Comment 5 Dirk Schulze 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.
Comment 6 Nikolas Zimmermann 2009-10-14 13:23:05 PDT
Comment on attachment 41182 [details]
Fix for effectRect values and userSpaceOnUse

Looks great, r=me.
Comment 7 Dirk Schulze 2009-10-14 13:34:25 PDT
landed in r49582.