Bug 41192 - Canvas: bezierCurveTo() and quadraticCurveTo() must ensure subpaths
Summary: Canvas: bezierCurveTo() and quadraticCurveTo() must ensure subpaths
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HTML5
Depends on:
Blocks:
 
Reported: 2010-06-24 22:09 PDT by Andreas Kling
Modified: 2010-07-01 14:57 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (4.23 KB, patch)
2010-06-24 22:12 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch (8.83 KB, patch)
2010-06-24 22:14 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch v2 (style fixed) (8.68 KB, patch)
2010-06-24 22:20 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2010-06-24 22:09:24 PDT
CanvasRenderingContext2D's bezierCurveTo() and quadraticCurveTo() should implicitly moveTo() the (first) control point if the current path is empty.

This test (on IE Test Center) fails:
http://samples.msdn.microsoft.com/ietestcenter/html5/canvas/canvas-complexShapes-bezierCurveTo-001.htm

This is also covered by (skipped) in-tree tests:
canvas/philip/tests/2d.path.bezierCurveTo.ensuresubpath.2.html
canvas/philip/tests/2d.path.quadraticCurveTo.ensuresubpath.2.html

Spec links:
http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-beziercurveto
http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-quadraticcurveto
Comment 1 Andreas Kling 2010-06-24 22:12:55 PDT
Created attachment 59733 [details]
Proposed patch
Comment 2 Andreas Kling 2010-06-24 22:14:07 PDT
Created attachment 59734 [details]
Proposed patch

The proposed patch for *this* bug ;-)
Comment 3 WebKit Review Bot 2010-06-24 22:15:58 PDT
Attachment 59734 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/html/canvas/CanvasRenderingContext2D.cpp:579:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Andreas Kling 2010-06-24 22:20:53 PDT
Created attachment 59735 [details]
Proposed patch v2 (style fixed)
Comment 5 Tor Arne Vestbø 2010-07-01 10:42:34 PDT
Comment on attachment 59735 [details]
Proposed patch v2 (style fixed)

LGTM
Comment 6 WebKit Commit Bot 2010-07-01 11:14:08 PDT
Comment on attachment 59735 [details]
Proposed patch v2 (style fixed)

Rejecting patch 59735 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:
ng 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 19263 test cases.
fast/loader/recursive-before-unload-crash.html -> failed

Exiting early after 1 failures. 14177 tests run.
261.24s total testing time

14176 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
4 test cases (<1%) had stderr output

Full output: http://webkit-commit-queue.appspot.com/results/3372119
Comment 7 Andreas Kling 2010-07-01 11:33:06 PDT
Comment on attachment 59735 [details]
Proposed patch v2 (style fixed)

Re-cq?ing, suspecting flaky test.
Comment 8 Tor Arne Vestbø 2010-07-01 11:34:10 PDT
Comment on attachment 59735 [details]
Proposed patch v2 (style fixed)

Let's try again
Comment 9 WebKit Commit Bot 2010-07-01 14:56:57 PDT
Comment on attachment 59735 [details]
Proposed patch v2 (style fixed)

Clearing flags on attachment: 59735

Committed r62300: <http://trac.webkit.org/changeset/62300>
Comment 10 WebKit Commit Bot 2010-07-01 14:57:02 PDT
All reviewed patches have been landed.  Closing bug.