Changeset 62300 in webkit
- Timestamp:
- Jul 1, 2010 2:56:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62299 r62300 1 2010-07-01 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Tor Arne Vestbø. 4 5 Canvas: bezierCurveTo() and quadraticCurveTo() must ensure subpaths 6 https://bugs.webkit.org/show_bug.cgi?id=41192 7 8 Unskipped two tests: 9 - canvas/philip/tests/2d.path.bezierCurveTo.ensuresubpath.2.html 10 - canvas/philip/tests/2d.path.quadraticCurveTo.ensuresubpath.2.html 11 12 fast/canvas/canvas-modify-emptyPath.html was updated to expect the new behavior. 13 14 Spec links: 15 http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-beziercurveto 16 http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-quadraticcurveto 17 18 * canvas/philip/tests/2d.path.bezierCurveTo.ensuresubpath.2-expected.txt: 19 * canvas/philip/tests/2d.path.quadraticCurveTo.ensuresubpath.2-expected.txt: 20 * fast/canvas/canvas-modify-emptyPath-expected.txt: 21 * fast/canvas/script-tests/canvas-modify-emptyPath.js: 22 * platform/mac/Skipped: 23 * platform/qt/Skipped: 24 1 25 2010-07-01 Andreas Kling <andreas.kling@nokia.com> 2 26 -
trunk/LayoutTests/canvas/philip/tests/2d.path.bezierCurveTo.ensuresubpath.2-expected.txt
r60162 r62300 7 7 8 8 Passed 9 -
trunk/LayoutTests/canvas/philip/tests/2d.path.quadraticCurveTo.ensuresubpath.2-expected.txt
r60162 r62300 7 7 8 8 Passed 9 -
trunk/LayoutTests/fast/canvas/canvas-modify-emptyPath-expected.txt
r58381 r62300 12 12 PASS getColor(50,50) is [0,128,0,255] 13 13 Test quadraticCurveTo 14 PASS getColor(50,50) is [255,0,0,255] 14 PASS getColor(10,10) is [255,0,0,255] 15 PASS getColor(50,50) is [0,128,0,255] 15 16 Test quadraticCurveTo endpoint 17 PASS getColor(10,10) is [255,0,0,255] 16 18 PASS getColor(99,51) is [0,128,0,255] 17 PASS getColor(50,50) is [ 255,0,0,255]19 PASS getColor(50,50) is [0,128,0,255] 18 20 Test bezierCurveTo 19 PASS getColor(50,50) is [255,0,0,255] 21 PASS getColor(10,10) is [255,0,0,255] 22 PASS getColor(50,50) is [0,128,0,255] 20 23 Test bezierCurveTo endpoint 24 PASS getColor(10,10) is [255,0,0,255] 21 25 PASS getColor(99,51) is [0,128,0,255] 22 PASS getColor(50,50) is [ 255,0,0,255]26 PASS getColor(50,50) is [0,128,0,255] 23 27 PASS successfullyParsed is true 24 28 -
trunk/LayoutTests/fast/canvas/script-tests/canvas-modify-emptyPath.js
r58381 r62300 53 53 ctx.quadraticCurveTo(0, 50, 100, 50); 54 54 ctx.stroke(); 55 shouldBe("getColor(50,50)", "[255,0,0,255]"); 55 shouldBe("getColor(10,10)", "[255,0,0,255]"); 56 shouldBe("getColor(50,50)", "[0,128,0,255]"); 56 57 ctx.clearRect(0, 0, 300, 300); 57 58 … … 62 63 ctx.lineTo(50, 100); 63 64 ctx.stroke(); 65 shouldBe("getColor(10,10)", "[255,0,0,255]"); 64 66 shouldBe("getColor(99,51)", "[0,128,0,255]"); 65 shouldBe("getColor(50,50)", "[ 255,0,0,255]");67 shouldBe("getColor(50,50)", "[0,128,0,255]"); 66 68 ctx.clearRect(0, 0, 300, 300); 67 69 … … 71 73 ctx.bezierCurveTo(0, 50, 50, 50, 100, 50); 72 74 ctx.stroke(); 73 shouldBe("getColor(50,50)", "[255,0,0,255]"); 75 shouldBe("getColor(10,10)", "[255,0,0,255]"); 76 shouldBe("getColor(50,50)", "[0,128,0,255]"); 74 77 ctx.clearRect(0, 0, 300, 300); 75 78 … … 81 84 ctx.lineTo(50, 100); 82 85 ctx.stroke(); 86 shouldBe("getColor(10,10)", "[255,0,0,255]"); 83 87 shouldBe("getColor(99,51)", "[0,128,0,255]"); 84 shouldBe("getColor(50,50)", "[ 255,0,0,255]");88 shouldBe("getColor(50,50)", "[0,128,0,255]"); 85 89 ctx.clearRect(0, 0, 300, 300); 86 90 -
trunk/LayoutTests/platform/mac/Skipped
r62299 r62300 231 231 canvas/philip/tests/2d.missingargs.html 232 232 canvas/philip/tests/2d.path.arcTo.ensuresubpath.2.html 233 canvas/philip/tests/2d.path.bezierCurveTo.ensuresubpath.2.html234 233 canvas/philip/tests/2d.path.clip.empty.html 235 canvas/philip/tests/2d.path.quadraticCurveTo.ensuresubpath.2.html236 234 canvas/philip/tests/2d.path.rect.winding.html 237 235 canvas/philip/tests/2d.path.rect.zero.4.html -
trunk/LayoutTests/platform/qt/Skipped
r62299 r62300 5270 5270 canvas/philip/tests/2d.path.arcTo.collinear.2.html 5271 5271 canvas/philip/tests/2d.path.arcTo.collinear.3.html 5272 canvas/philip/tests/2d.path.bezierCurveTo.ensuresubpath.2.html5273 canvas/philip/tests/2d.path.quadraticCurveTo.ensuresubpath.2.html5274 5272 canvas/philip/tests/2d.path.quadraticCurveTo.scaled.html 5275 5273 canvas/philip/tests/2d.path.quadraticCurveTo.shape.html -
trunk/WebCore/ChangeLog
r62299 r62300 1 2010-07-01 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Tor Arne Vestbø. 4 5 Canvas: bezierCurveTo() and quadraticCurveTo() must ensure subpaths 6 https://bugs.webkit.org/show_bug.cgi?id=41192 7 8 If the current path is empty, bezierCurveTo() and quadraticCurveTo() will now 9 move to the (first) control point before adding the curve. 10 11 Spec links: 12 http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-beziercurveto 13 http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-quadraticcurveto 14 15 * html/canvas/CanvasRenderingContext2D.cpp: 16 (WebCore::CanvasRenderingContext2D::quadraticCurveTo): 17 (WebCore::CanvasRenderingContext2D::bezierCurveTo): 18 1 19 2010-07-01 Andreas Kling <andreas.kling@nokia.com> 2 20 -
trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r62277 r62300 575 575 return; 576 576 if (!m_path.hasCurrentPoint()) 577 m_path.moveTo(FloatPoint(x, y)); 578 else 579 m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y)); 577 m_path.moveTo(FloatPoint(cpx, cpy)); 578 m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y)); 580 579 } 581 580 … … 587 586 return; 588 587 if (!m_path.hasCurrentPoint()) 589 m_path.moveTo(FloatPoint(x, y)); 590 else 591 m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y)); 588 m_path.moveTo(FloatPoint(cp1x, cp1y)); 589 m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y)); 592 590 } 593 591
Note: See TracChangeset
for help on using the changeset viewer.