Bug 81591

Summary: [SVG] viewbox confused by border
Product: WebKit Reporter: Eric U. <ericu>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: krit, schenney, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Repro case none

Description Eric U. 2012-03-19 16:34:04 PDT
Created attachment 132711 [details]
Repro case

I originally logged this as a Chrome bug [http://code.google.com/p/chromium/issues/detail?id=118108], but it affects Safari identically, and likely all other ports.
I've reproduced it in Chrome/Linux, Chrome/Windows, and Safari/Windows.  Firefox does not have the bug.

What steps will reproduce the problem?
1. Load the attached file svg.html.
2. Examine the corners of the two SVG regions.

What is the expected output? What do you see instead?

You should see the same quarter-circles in all corners of each square, plus a whole circle dead center.

Instead, the SVG region with a border offsets the svg drawing region by the width of the border [3px], but doesn't scale it, so the viewbox is more like 0 0 0.97 0.97.  So the quarter-circles in the 3 corners that aren't the origin aren't visible, and the full circle isn't centered.

The other SVG region, with no border, works fine.

See the linked chrome bug for screen shots.
Comment 1 Dirk Schulze 2012-03-19 19:58:17 PDT
Please check nightly builds. Was fixed recently.
Comment 2 Eric U. 2012-03-19 20:01:22 PDT
Awesome; thanks.
Comment 3 Eric U. 2012-03-26 17:08:21 PDT
*** Bug 81981 has been marked as a duplicate of this bug. ***