Bug 133301

Summary: SVG getBBox() does not work for transformed children
Product: WebKit Reporter: kari.pihkala
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, krit, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Example SVG
none
Screenshot of Safari 7 and Firefox 29 rendering none

Description kari.pihkala 2014-05-27 01:59:48 PDT
Created attachment 232119 [details]
Example SVG

SVG getBBox() for a group element does not return the correct bounding box if its child element is rotated.

The attached example displays the bounding box as a blue rectangle for a rotated ellipse. There is a large gap between the bbox and the ellipse.

The result should be a blue rectangle tightly around the ellipse without any gaps.

Firefox 29 displays the correct behaviour.
Comment 1 kari.pihkala 2014-05-27 02:01:51 PDT
Created attachment 232120 [details]
Screenshot of Safari 7 and Firefox 29 rendering
Comment 2 Dirk Schulze 2014-07-12 23:09:46 PDT
This is due to our rectangular box calculation optimization for SVGRect, SVGCircle and SVGEllipse .... rects with rounded corners are likely affected as well.
Comment 3 Brent Fulgham 2022-07-15 16:54:34 PDT
Chrome and Safari behave the same here. Firefox creates a tighter border.
Comment 4 Radar WebKit Bug Importer 2022-07-15 16:54:55 PDT
<rdar://problem/97101259>