Bug 63019 - Incorrect clamping on SVG masks when root element is not located at (0,0)
Summary: Incorrect clamping on SVG masks when root element is not located at (0,0)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks: 63033
  Show dependency treegraph
 
Reported: 2011-06-20 15:01 PDT by Tim Horton
Modified: 2011-06-20 18:27 PDT (History)
3 users (show)

See Also:


Attachments
Test case (897 bytes, application/xhtml+xml)
2011-06-20 15:02 PDT, Tim Horton
no flags Details
Fix incorrect clamping on SVG masks (18.39 KB, patch)
2011-06-20 15:35 PDT, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2011-06-20 15:01:33 PDT
Currently, when creating the mask image, we clamp its rect by svgRoot->contentBoxRect() (equivalent to bounds). However, the mask image origin is absolute, not relative to the svgRoot. Therefore, when the origin of svgRoot is not at (0,0), the clamping is incorrect. If we instead clamp by svgRoot->frameRect(), the absolute frame of the svgRoot, we get the expected results.

Test case attached (expected: a quarter of a blue circle, actual: nothing!), patch forthcoming.
Comment 1 Tim Horton 2011-06-20 15:02:36 PDT
Created attachment 97864 [details]
Test case
Comment 2 Tim Horton 2011-06-20 15:35:02 PDT
Created attachment 97869 [details]
Fix incorrect clamping on SVG masks
Comment 3 Tim Horton 2011-06-20 16:02:33 PDT
<rdar://problem/9474534>
Comment 4 WebKit Review Bot 2011-06-20 16:44:31 PDT
Comment on attachment 97869 [details]
Fix incorrect clamping on SVG masks

Clearing flags on attachment: 97869

Committed r89313: <http://trac.webkit.org/changeset/89313>
Comment 5 WebKit Review Bot 2011-06-20 16:44:35 PDT
All reviewed patches have been landed.  Closing bug.