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.
Created attachment 97864 [details] Test case
Created attachment 97869 [details] Fix incorrect clamping on SVG masks
<rdar://problem/9474534>
Comment on attachment 97869 [details] Fix incorrect clamping on SVG masks Clearing flags on attachment: 97869 Committed r89313: <http://trac.webkit.org/changeset/89313>
All reviewed patches have been landed. Closing bug.