RESOLVED FIXED Bug 41420
Canvas: arc() with startAngle == endAngle shouldn't add to the path
https://bugs.webkit.org/show_bug.cgi?id=41420
Summary Canvas: arc() with startAngle == endAngle shouldn't add to the path
Andreas Kling
Reported 2010-06-30 10:34:11 PDT
Quoth HTML5: "Zero-length line segments must be pruned before stroking a path. Empty subpaths must be ignored." This would fix one in-tree test: * canvas/philip/tests/2d.path.stroke.prune.arc.html Spec link: http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-stroke
Attachments
Proposed patch (3.34 KB, patch)
2010-06-30 10:38 PDT, Andreas Kling
no flags
Proposed patch v2 (2.52 KB, patch)
2010-06-30 11:50 PDT, Andreas Kling
no flags
Andreas Kling
Comment 1 2010-06-30 10:38:34 PDT
Created attachment 60131 [details] Proposed patch
WebKit Commit Bot
Comment 2 2010-06-30 11:34:43 PDT
Comment on attachment 60131 [details] Proposed patch Rejecting patch 60131 from commit-queue. Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1 Last 500 characters of output: iling Java tests make: Nothing to be done for `default'. Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests Skipped list contained 'compositing/iframes/composited-iframe.html', but no file of that name could be found Testing 19237 test cases. canvas/philip/tests/2d.path.stroke.prune.arc.html -> failed Exiting early after 1 failures. 551 tests run. 31.37s total testing time 550 test cases (99%) succeeded 1 test case (<1%) had incorrect layout 1 test case (<1%) had stderr output Full output: http://webkit-commit-queue.appspot.com/results/3354269
Andreas Kling
Comment 3 2010-06-30 11:50:52 PDT
Created attachment 60139 [details] Proposed patch v2 Only unskip test on Qt, test also uses arcTo() which isn't up-to-spec on Mac I guess. Unfortunately I can't verify that since I don't have a Mac dev env handy. The missing logic as implemented in Qt's Path::addArcTo(): FloatPoint p0(m_path.currentPosition()); if ((p1.x() == p0.x() && p1.y() == p0.y()) || (p1.x() == p2.x() && p1.y() == p2.y()) || radius == 0.f) { m_path.lineTo(p1); return; }
Eric Seidel (no email)
Comment 4 2010-07-01 03:17:10 PDT
Comment on attachment 60131 [details] Proposed patch Cleared Darin Adler's review+ from obsolete attachment 60131 [details] so that this bug does not appear in http://webkit.org/pending-commit.
WebKit Commit Bot
Comment 5 2010-07-12 05:17:50 PDT
Comment on attachment 60139 [details] Proposed patch v2 Clearing flags on attachment: 60139 Committed r63073: <http://trac.webkit.org/changeset/63073>
WebKit Commit Bot
Comment 6 2010-07-12 05:17:55 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.