Open
Bug 804003
Opened 13 years ago
Updated 4 years ago
SVG clip-path does not take viewport of clipped HTML element
Categories
(Core :: SVG, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: krit, Unassigned)
Details
Attachments
(2 files)
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.
| Reporter | ||
Comment 1•13 years ago
|
||
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
| Reporter | ||
Updated•13 years ago
|
Attachment #673713 -
Attachment mime type: text/plain → text/html
| Reporter | ||
Comment 2•13 years ago
|
||
I would aspect the result to be like in the first attachment. The second example demonstrates the problem.
| Reporter | ||
Updated•13 years ago
|
Attachment #673721 -
Attachment mime type: text/plain → text/html
Comment 3•13 years ago
|
||
Ugh. Yeah, the clipPath clipping of the div should definitely not affected by the width/height of the clipPath's outer-<svg>.
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•