[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 11:21:01 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 950ec263aebc5a1921347a4883ebce5c04a44864
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 20 07:07:16 2010 +0000
2010-07-20 Matthew Delaney <mdelaney at apple.com>
Reviewed by Kenneth Rohde Christiansen.
Failing 2d.path.stroke.prune.curve philip canvas test
https://bugs.webkit.org/show_bug.cgi?id=42190
* platform/mac/Skipped: Unskipped now passing tests.
2010-07-20 Matthew Delaney <mdelaney at apple.com>
Reviewed by Kenneth Rohde Christiansen.
Failing 2d.path.stroke.prune.curve philip canvas test
https://bugs.webkit.org/show_bug.cgi?id=42190
* html/canvas/CanvasRenderingContext2D.cpp:
(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.
(WebCore::CanvasRenderingContext2D::quadraticCurveTo): Added in simple bounds as per the spec.
(WebCore::CanvasRenderingContext2D::bezierCurveTo): Added in simple bounds as per the spec.
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::closeSubpath): Moved the check for an empty path up on level to make it platform independent and remove redundancy.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a272e21..5255f8f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-20 Matthew Delaney <mdelaney at apple.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Failing 2d.path.stroke.prune.curve philip canvas test
+ https://bugs.webkit.org/show_bug.cgi?id=42190
+
+ * platform/mac/Skipped: Unskipped now passing tests.
+
2010-07-19 Maciej Stachowiak <mjs at apple.com>
Reviewed by Anders Carlsson.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index cfc9c48..d0c6fd7 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -211,8 +211,6 @@ canvas/philip/tests/2d.missingargs.html
canvas/philip/tests/2d.path.arcTo.ensuresubpath.2.html
canvas/philip/tests/2d.path.clip.empty.html
canvas/philip/tests/2d.path.rect.winding.html
-canvas/philip/tests/2d.path.stroke.prune.closed.html
-canvas/philip/tests/2d.path.stroke.prune.curve.html
canvas/philip/tests/2d.pattern.image.broken.html
canvas/philip/tests/2d.pattern.image.incomplete.html
canvas/philip/tests/2d.pattern.image.null.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 34aeeb6..7935bb0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-20 Matthew Delaney <mdelaney at apple.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Failing 2d.path.stroke.prune.curve philip canvas test
+ https://bugs.webkit.org/show_bug.cgi?id=42190
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (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.
+ (WebCore::CanvasRenderingContext2D::quadraticCurveTo): Added in simple bounds as per the spec.
+ (WebCore::CanvasRenderingContext2D::bezierCurveTo): Added in simple bounds as per the spec.
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::Path::closeSubpath): Moved the check for an empty path up on level to make it platform independent and remove redundancy.
+
2010-07-19 Victoria Kirst <vrk at google.com>
Reviewed by David Levin.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 5082c1d..acd15d2 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -557,7 +557,12 @@ void CanvasRenderingContext2D::beginPath()
void CanvasRenderingContext2D::closePath()
{
- m_path.closeSubpath();
+ if (m_path.isEmpty())
+ return;
+
+ FloatRect boundRect = m_path.boundingRect();
+ if (boundRect.width() || boundRect.height())
+ m_path.closeSubpath();
}
void CanvasRenderingContext2D::moveTo(float x, float y)
@@ -575,7 +580,7 @@ void CanvasRenderingContext2D::lineTo(float x, float y)
return;
if (!state().m_invertibleCTM)
return;
-
+
FloatPoint p1 = FloatPoint(x, y);
if (!m_path.hasCurrentPoint())
m_path.moveTo(p1);
@@ -591,7 +596,10 @@ void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, f
return;
if (!m_path.hasCurrentPoint())
m_path.moveTo(FloatPoint(cpx, cpy));
- m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y));
+
+ FloatPoint p1 = FloatPoint(x, y);
+ if (p1 != m_path.currentPoint())
+ m_path.addQuadCurveTo(FloatPoint(cpx, cpy), p1);
}
void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)
@@ -602,7 +610,10 @@ void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x,
return;
if (!m_path.hasCurrentPoint())
m_path.moveTo(FloatPoint(cp1x, cp1y));
- m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y));
+
+ FloatPoint p1 = FloatPoint(x, y);
+ if (p1 != m_path.currentPoint())
+ m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), p1);
}
void CanvasRenderingContext2D::arcTo(float x1, float y1, float x2, float y2, float r, ExceptionCode& ec)
diff --git a/WebCore/platform/graphics/cg/PathCG.cpp b/WebCore/platform/graphics/cg/PathCG.cpp
index 7ebb9ea..90d4b8a 100644
--- a/WebCore/platform/graphics/cg/PathCG.cpp
+++ b/WebCore/platform/graphics/cg/PathCG.cpp
@@ -213,8 +213,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
void Path::closeSubpath()
{
- if (!CGPathIsEmpty(m_path)) // to silence a warning when trying to close an empty path
- CGPathCloseSubpath(m_path);
+ CGPathCloseSubpath(m_path);
}
void Path::addArc(const FloatPoint& p, float r, float sa, float ea, bool clockwise)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list