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: ahmad.saleem792, bfulgham, krit, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar, LayerBasedSVGEngine
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Example SVG
none
Screenshot of Safari 7 and Firefox 29 rendering none

kari.pihkala
Reported 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.
Attachments
Example SVG (819 bytes, image/svg+xml)
2014-05-27 01:59 PDT, kari.pihkala
no flags
Screenshot of Safari 7 and Firefox 29 rendering (25.59 KB, image/png)
2014-05-27 02:01 PDT, kari.pihkala
no flags
kari.pihkala
Comment 1 2014-05-27 02:01:51 PDT
Created attachment 232120 [details] Screenshot of Safari 7 and Firefox 29 rendering
Dirk Schulze
Comment 2 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.
Brent Fulgham
Comment 3 2022-07-15 16:54:34 PDT
Chrome and Safari behave the same here. Firefox creates a tighter border.
Radar WebKit Bug Importer
Comment 4 2022-07-15 16:54:55 PDT
Note You need to log in before you can comment on or make changes to this bug.