[webkit-reviews] review granted: [Bug 67054] Investigate removing lineWidth() from CanvasRenderingContext2D.cpp's ctor : [Attachment 109540] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 3 15:33:05 PDT 2011


Darin Adler <darin at apple.com> has granted Matthew Delaney
<mdelaney at apple.com>'s request for review:
Bug 67054: Investigate removing lineWidth() from CanvasRenderingContext2D.cpp's
ctor
https://bugs.webkit.org/show_bug.cgi?id=67054

Attachment 109540: Patch
https://bugs.webkit.org/attachment.cgi?id=109540&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=109540&action=review


r=me on this; it’s OK to land this as is, but I think the fix isn’t quite right


> Source/WebCore/ChangeLog:3
> +	   Investigate removing lineWidth() from CanvasRenderingContext2D.cpp's
ctor

This is a really confusing name for the patch!

The patch itself seems clearly like a good idea.

> Source/WebCore/html/HTMLCanvasElement.cpp:461
> +    m_imageBuffer->context()->setStrokeThickness(1);

It seems to me that it’s a bug that the a GraphicsContext starts with a stroke
thickness that is platform-dependent. I understand that the different graphics
libraries have different defaults, but the point of the platform layer is to
abstract away such differences. The code that sets the thickness to 1 should be
in the platform directory instead of here in the canvas code.


More information about the webkit-reviews mailing list