If p0, p1 and p2 are all points on a single straight line, arcTo() should draw a straight line from p0 to p1. Spec link: http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arcto This fixes two in-tree tests: * canvas/philip/tests/2d.path.arcTo.collinear.2.html * canvas/philip/tests/2d.path.arcTo.collinear.3.html
Created attachment 60126 [details] Proposed patch
Attachment 60126 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/platform/graphics/qt/PathQt.cpp:209: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Relevant part of HTML5 spec: "... if the points (x0, y0), (x1, y1), and (x2, y2) all lie on a single straight line, then the method must add the point (x1, y1) to the subpath, and connect that point to the previous point (x0, y0) by a straight line." Note that p0 (or (x0, x0)) here refers to the last point in the current subpath.
Comment on attachment 60126 [details] Proposed patch LGTM
Comment on attachment 60126 [details] Proposed patch r- for now until we can verify the collinar()
Fix for this is coming, preparing patch
Landed in http://trac.webkit.org/changeset/62383
<cherry-pick-for-backport: r62383>
Revision r62383 cherry-picked into qtwebkit-2.0 with commit 13b5b7048431a554e48c4b28235cf206c6a08bf5