Changeset 63727 in webkit
- Timestamp:
- Jul 20, 2010 12:07:16 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63726 r63727 1 2010-07-20 Matthew Delaney <mdelaney@apple.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Failing 2d.path.stroke.prune.curve philip canvas test 6 https://bugs.webkit.org/show_bug.cgi?id=42190 7 8 * platform/mac/Skipped: Unskipped now passing tests. 9 1 10 2010-07-19 Maciej Stachowiak <mjs@apple.com> 2 11 -
trunk/LayoutTests/platform/mac/Skipped
r63689 r63727 212 212 canvas/philip/tests/2d.path.clip.empty.html 213 213 canvas/philip/tests/2d.path.rect.winding.html 214 canvas/philip/tests/2d.path.stroke.prune.closed.html215 canvas/philip/tests/2d.path.stroke.prune.curve.html216 214 canvas/philip/tests/2d.pattern.image.broken.html 217 215 canvas/philip/tests/2d.pattern.image.incomplete.html -
trunk/WebCore/ChangeLog
r63723 r63727 1 2010-07-20 Matthew Delaney <mdelaney@apple.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Failing 2d.path.stroke.prune.curve philip canvas test 6 https://bugs.webkit.org/show_bug.cgi?id=42190 7 8 * html/canvas/CanvasRenderingContext2D.cpp: 9 (WebCore::CanvasRenderingContext2D::closePath): Added check to make sure there's a non-trivial path to close. Since there is currently no way to check if the current point is the start point, or similarly if there is only 1 point in the current subpath (since these are both sufficient conditions for a trivial subpath), then checking that the bounding rectangle has both zero width and height proves also to be a sufficient condition for a trivial path. 10 (WebCore::CanvasRenderingContext2D::quadraticCurveTo): Added in simple bounds as per the spec. 11 (WebCore::CanvasRenderingContext2D::bezierCurveTo): Added in simple bounds as per the spec. 12 * platform/graphics/cg/PathCG.cpp: 13 (WebCore::Path::closeSubpath): Moved the check for an empty path up on level to make it platform independent and remove redundancy. 14 1 15 2010-07-19 Victoria Kirst <vrk@google.com> 2 16 -
trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r63659 r63727 558 558 void CanvasRenderingContext2D::closePath() 559 559 { 560 m_path.closeSubpath(); 560 if (m_path.isEmpty()) 561 return; 562 563 FloatRect boundRect = m_path.boundingRect(); 564 if (boundRect.width() || boundRect.height()) 565 m_path.closeSubpath(); 561 566 } 562 567 … … 576 581 if (!state().m_invertibleCTM) 577 582 return; 578 583 579 584 FloatPoint p1 = FloatPoint(x, y); 580 585 if (!m_path.hasCurrentPoint()) … … 592 597 if (!m_path.hasCurrentPoint()) 593 598 m_path.moveTo(FloatPoint(cpx, cpy)); 594 m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y)); 599 600 FloatPoint p1 = FloatPoint(x, y); 601 if (p1 != m_path.currentPoint()) 602 m_path.addQuadCurveTo(FloatPoint(cpx, cpy), p1); 595 603 } 596 604 … … 603 611 if (!m_path.hasCurrentPoint()) 604 612 m_path.moveTo(FloatPoint(cp1x, cp1y)); 605 m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y)); 613 614 FloatPoint p1 = FloatPoint(x, y); 615 if (p1 != m_path.currentPoint()) 616 m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), p1); 606 617 } 607 618 -
trunk/WebCore/platform/graphics/cg/PathCG.cpp
r63599 r63727 214 214 void Path::closeSubpath() 215 215 { 216 if (!CGPathIsEmpty(m_path)) // to silence a warning when trying to close an empty path 217 CGPathCloseSubpath(m_path); 216 CGPathCloseSubpath(m_path); 218 217 } 219 218
Note: See TracChangeset
for help on using the changeset viewer.