[webkit-reviews] review requested: [Bug 63516] Some canvas arc tests fail because the arc implementaion does not match the HTML5 canvas specification. : [Attachment 98872] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 28 00:41:03 PDT 2011


Hwang <luxtella at company100.net> has asked  for review:
Bug 63516: Some canvas arc tests fail because the arc implementaion does not
match the HTML5 canvas specification.
https://bugs.webkit.org/show_bug.cgi?id=63516

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

------- Additional Comments from Hwang <luxtella at company100.net>
Following tests are failed in Chromium port.
* LayoutTests/canvas/philip/tests/2d.path.arc.angle.3.html
* LayoutTests/canvas/philip/tests/2d.path.arc.angle.5.html

It is not because of skia bug.
Other ports pass above test because their graphics backends are familiar with
HTML5 Canvas arc specification by chance.

This patch makes CanvasRenderingContext2D::arc match following paragraph in
HTML5 Canvas spec.
http://dev.w3.org/html5/2dcontext/#dom-context-2d-createpattern

"Otherwise, the arc is the path along the circumference of this circle
from the start point to the end point, going anti-clockwise if the
anticlockwise argument is true, and clockwise otherwise. Since the
points are on the circle, as opposed to being simply angles from zero,
the arc can never cover an angle greater than 2π radians. If the two
points are the same, or if the radius is zero, then the arc is defined
as being of zero length in both directions."


More information about the webkit-reviews mailing list