Bug 140545

Summary: SVG zero-length subpath does not render as a square
Product: WebKit Reporter: kari.pihkala
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: bfulgham, nikos.andronikos, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: OS X 10.10   
Attachments:
Description Flags
Zero-length subpath as a star in Webkit nightly none

kari.pihkala
Reported 2015-01-16 06:59:42 PST
Created attachment 244765 [details] Zero-length subpath as a star in Webkit nightly A zero-length subpath should render as a square, but it renders as a star. Here's a W3C test case: http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlSVGWeb/painting-stroke-10-t.html The attached screenshot shows how Webkit nightly renders it. Here's another example: http://mcc.id.au/temp/2008/zero-path.svg This is most likely related to bug 18356
Attachments
Zero-length subpath as a star in Webkit nightly (26.69 KB, image/png)
2015-01-16 06:59 PST, kari.pihkala
no flags
kari.pihkala
Comment 1 2015-01-16 07:04:18 PST
Oops, looks like I attached an old screenshot. Only the lower one renders as a star in nightly.
Nikos Andronikos
Comment 2 2015-01-26 17:44:04 PST
I created a standalone test case on OS X using core graphics for http://mcc.id.au/temp/2008/zero-path.svg with the following code: CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, 0, 100, 100); CGPathCloseSubpath(path); CGContextBeginPath(context); CGContextAddPath(context, path); CGContextStrokePath(context); It looks like Core Graphics is rendering the path at a 45 degree angle and a square is being created by another workaround in the WebKit code - therefore causing a star to be rendered.
Brent Fulgham
Comment 3 2022-07-15 17:05:25 PDT
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.
Note You need to log in before you can comment on or make changes to this bug.