Bug 176992 - getBBox() called on a <g> with <path> returns a bounding box that includes control points
Summary: getBBox() called on a <g> with <path> returns a bounding box that includes co...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 10
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-15 02:35 PDT by zbynek.stara.internet
Modified: 2022-07-15 16:27 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zbynek.stara.internet 2017-09-15 02:35:37 PDT
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.
Comment 1 Brent Fulgham 2022-07-15 16:27:12 PDT
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.