Bug 140545 - SVG zero-length subpath does not render as a square
Summary: SVG zero-length subpath does not render as a square
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified OS X 10.10
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-16 06:59 PST by kari.pihkala
Modified: 2022-07-15 17:05 PDT (History)
3 users (show)

See Also:


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 Details

Note You need to log in before you can comment on or make changes to this bug.
Description kari.pihkala 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
Comment 1 kari.pihkala 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.
Comment 2 Nikos Andronikos 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.
Comment 3 Brent Fulgham 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.