Bug 16180 - Stroke width on rectangle not equal on all sides
Summary: Stroke width on rectangle not equal on all sides
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-28 17:47 PST by Adam Roben (:aroben)
Modified: 2007-12-15 01:34 PST (History)
2 users (show)

See Also:


Attachments
testcase (327 bytes, image/svg+xml)
2007-11-28 17:48 PST, Adam Roben (:aroben)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2007-11-28 17:47:20 PST
Setting a stroke-width on a rectangle results in a stroke that is not even on all sides of the rectangle.
Comment 1 Adam Roben (:aroben) 2007-11-28 17:48:50 PST
Created attachment 17585 [details]
testcase
Comment 2 Nikolas Zimmermann 2007-11-28 17:55:17 PST
Bug confirmed. It's a clipping problem though. If you pan around you can clearly see the stroke is set correctly - though it's partly clipped aways.
Comment 3 Nikolas Zimmermann 2007-11-28 18:05:29 PST
(In reply to comment #2)
> Bug confirmed. It's a clipping problem though. If you pan around you can
> clearly see the stroke is set correctly - though it's partly clipped aways.
> 

Eek I am too tired - was too quick. The rendering looks correct on Tiger!
So it must be a CG/windows specific bug - as you described it on IRC.

Sorry for the trouble.
Comment 4 Adam Roben (:aroben) 2007-11-28 18:40:46 PST
After talking with Nico more, it seems that there really is a bug here (in his opinion), which is that the clipping of the top/left sides of the stroke should not happen when padding is set on the <svg> element.
Comment 5 Adam Roben (:aroben) 2007-11-28 18:41:05 PST
(In reply to comment #4)
> After talking with Nico more,

Niko, even.

Comment 6 Eric Seidel (no email) 2007-11-29 01:25:58 PST
This behavior is 100% correct, IMO.  I'm not sure if we should be respecting "padding" in an SVG stand-alone document however.

<svg> has an implicit clip:
http://www.w3.org/TR/SVG/masking.html#OverflowAndClipProperties

When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to the bounds of the initial viewport.

So the stroke for the rect is getting clipped off the top and left.  If the SVG were not width/height 100%, but rather only as large as the rect, the bottom and right would also have been clipped.

I suggest this is closed as INVALID.
Comment 7 Eric Seidel (no email) 2007-12-15 01:34:26 PST
Opera agrees with our rendering.  Firefox does too, but ignores padding.  Closing as invalid.