Created attachment 673713 [details] clip-path-ref-userSpaceOnUse-003.html User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14 Steps to reproduce: I wrote a simple test where I clip a HTML div box with a clipPath element. The clipPathUnits are in userSpaceOnUse. I would expect that percentage values on clipPath elements would be relative to the viewport of the div box (the html element). Actual results: The viewport is assumed to be the viewport of the SVGSVGElement of the clipPath element, instead of the div box. Since the svg element does not have a size, it falls back to 500x250, the default size of embedded SVG elements. Expected results: The viewport size of the div box should be used.
More information from CSS Masking: "" If clipPathUnits="userSpaceOnUse", the contents of the ‘clipPath’ represent values in the current user coordinate system in place at the time when the ‘clipPath’ element is referenced (i.e., the user coordinate system for the element referencing the ‘clipPath’ element via the ‘clip-path’ property). "" http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#ClipPathElement
Attachment #673713 - Attachment mime type: text/plain → text/html
Created attachment 673721 [details] No sizing on SVG element leads to wrong rendering I would aspect the result to be like in the first attachment. The second example demonstrates the problem.
Attachment #673721 - Attachment mime type: text/plain → text/html
Ugh. Yeah, the clipPath clipping of the div should definitely not affected by the width/height of the clipPath's outer-<svg>.
You need to log in before you can comment on or make changes to this bug.