Bug 176992
| Summary: | getBBox() called on a <g> with <path> returns a bounding box that includes control points | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zbynek.stara.internet |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | bfulgham, bruckner.roman, sabouhallawa, zimmermann |
| Priority: | P2 | ||
| Version: | Safari 10 | ||
| Hardware: | All | ||
| OS: | All | ||
zbynek.stara.internet
When getBBox() is called on a <path> element, the correct bounding box is returned (one that does not include path control points).
However, when the same <path> is wrapped in a <g> element, and getBBox() is called on the <g>, the returned bounding box includes the path's control points.
The bounding box for a <g> wrapping a <path> should be the same as the bounding box of the <path> on its own.
This jsfiddle illustrates the problem: http://jsfiddle.net/3t8u9qyb/
Bug is present in Safari 10.1.2, Google Chrome for Mac 61.0.3163.91 and Google Chrome for Windows 62.0.3202.18 .
Also present in Safari for iOS (10.3.3)
Firefox on Windows, IE11 and Edge all show the correct behavior.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Brent Fulgham
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.