[Webkit-unassigned] [Bug 26187] New: Canvas initial lineWidth not in sync with graphics backends.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 4 08:22:04 PDT 2009


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

           Summary: Canvas initial lineWidth not in sync with graphics
                    backends.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: deanm at chromium.org
                CC: eric at webkit.org, oliver at apple.com


The canvas rendering context has two pieces of state, the drawing context /
graphics backend.  Canvas always defaults to a thickness of 1.  It happens that
the CG backend also defaults to 1.  However, the Skia backend defaults to 0,
and the Cairo backend defaults to 2.

This means that the follow line changes the style in both the Skia and Cairo
backends:

ctx.lineWidth = ctx.lineWidth;

This is because ctx.lineWidth reports the <canvas> state, which is initially 1.
 However, this is not actually querying the graphics backend.  Then setting it
to 1 actually keeps them in sync.

My fix is simple, to set 1 to the graphics backend on creation of the canvas
rendering context.

It might be something bigger / for the future to consider whether the Skia and
Cairo backends should also default to a thickness of 1.


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



More information about the webkit-unassigned mailing list