Bug 81591 - [SVG] viewbox confused by border
Summary: [SVG] viewbox confused by border
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 81981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-19 16:34 PDT by Eric U.
Modified: 2012-03-26 17:08 PDT (History)
3 users (show)

See Also:


Attachments
Repro case (1022 bytes, text/html)
2012-03-19 16:34 PDT, Eric U.
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***