[Webkit-unassigned] [Bug 108763] New: Canvas GraphicsContext miterLimit initializes to 4 (SVG) instead of 10

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 3 00:43:01 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=108763

           Summary: Canvas GraphicsContext miterLimit initializes to 4
                    (SVG) instead of 10
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Canvas
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: olsonsjc at gmail.com


Created an attachment (id=186249)
 --> (https://bugs.webkit.org/attachment.cgi?id=186249&action=review)
HTML for reproduction of the miterLimit issue, explained in comments

Creating and drawing with a CanvasRenderingContext2D uses an incorrect intial miterLimit of 4 for stroking paths.

Steps to reproduce:
1) View http://phet.colorado.edu/files/phet-scene/tests/browsers/chrome-miter-limit.html or the attached chrome-miter-limit.html in Chrome / Chromium (24.x, 26.x, trunk)

Actual Results:
The first 2 drawn line joins are cut off with a bevel instead of being mitered.

Expected Results:
All 3 line joins should have the mitered join visible.

Build Date & Platform:
Chromium build 180186 with WebKit 141577. Also confirmed as buggy in Chrome across platforms (24.x, Win, Mac, Linux, Android) and Canary (26.x, Win, Linux)
Doesn't occur on iOS 6.1 Safari or latest Lion Safari (may be PlatformContextSkia specific)

Additional Information:
I'll attempt to attach my patches for the code and a test case soon. At least when using Skia on my build setup, it appears that CanvasRenderingContext2D.cpp has its state initialized with
a miterLimit of 10, but its GraphicsContext (PlatformContextSkia) has its miterLimit initialized as 4, and they do not seem to synchronize this value. Thus while
canvas.miterLimit === 10 in JS, shapes are initially stroked with a miterLimit of 4 until canvas.miterLimit is given a value different from 10.

Of note, the layout test fast/canvas/canvas-incremental-repaint-diffs.html shows the buggy behavior for all of the Chromium platforms, while for qt, efl, efl-wk1 and mac
platforms the expected png correctly renders the miter. This layout test will fail with the above patch when testing Chromium due to the pixel comparison, and the
beveled PNG examples should ideally be removed.

The attached chrome-miter-limit.html (for the reproduction steps) explains in comments the specific sources of the buggy behavior.

This is my first bug report for WebKit, so my apologies if the code needs to be patched completely differently or if there are other problems with this bug submission.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list