Issue metadata
Sign in to add a comment
|
SVG objectBoundingBox units incorrectly include path control points
Reported by
amelia.b...@gmail.com,
Jun 2 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Example URL: https://codepen.io/AmeliaBR/pen/dRyPJE/?editors=1111 Steps to reproduce the problem: 1. Create an SVG path where the control points of Bezier curves extend outside the bounding box (the tight rectangle that encloses all points on the path itself). 2. Apply a gradient or pattern that is scaled to use `objectBoundingBox` units to this path What is the expected behavior? The graphical effect that is scaled to use `objectBoundingBox` units should be scaled to the fill-region bounding box; it should not be affected by control points. In the linked demo, this means that all the gradients should have the same scale. What went wrong? The gradient is scaled too large (based on a rectangle that includes the control points). The bounding box returned by the getBBox() DOM method is correct. Does it occur on multiple sites: Yes Is it a problem with a plugin? N/A Did this work before? N/A Does this work in other browsers? Yes Chrome version: 58.0.3029.110 Channel: stable OS Version: 10.0 Flash Version: The linked CodePen demo uses clipping paths to trim the underlying shapes to the same outline, so the scale is easier to compare. Remove the clip-path property to see the actual paths used to scale each copy of the gradient. I haven't tested with other objectBoundingBox graphical effects yet (clipPath, mask, filter). I'm expecting to find the same problem.
,
Jun 2 2017
Correction: works as spec'd in Edge/IE and in Firefox on Windows or Linux. Firefox on MacOS and Android uses the same too-big scale as WebKit and Blink.
,
Jun 2 2017
,
Jun 2 2017
I believe we've kept issue 230599 open for cases like this one, so duping to that.
,
Jun 2 2017
Should the title of that issue be changed, then? The getBBox() results are correct, it's the graphical effects that are using the wrong dimensions. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by amelia.b...@gmail.com
, Jun 2 2017