[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:17:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 06eed20a4b05e7bd47b51ed4d8254dfb881e65ab
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jul 17 00:08:38 2010 +0000

    2010-07-16  Matthew Delaney  <mdelaney at apple.com>
    
            Reviewed by Sam Weinig.
    
            Failing 2d.path.stroke.prune.arc philip canvas test
            https://bugs.webkit.org/show_bug.cgi?id=42188
    
            * platform/mac/Skipped: Unskipped now passing tests.
    2010-07-16  Matthew Delaney  <mdelaney at apple.com>
    
            Reviewed by Sam Weinig.
    
            Failing 2d.path.stroke.prune.arc philip canvas test
            https://bugs.webkit.org/show_bug.cgi?id=42188
    
            * html/canvas/CanvasRenderingContext2D.cpp:
            Note, updated parameter names to match spec.
            (WebCore::CanvasRenderingContext2D::lineTo): Pulled bound checking code out of lower code to have checks for all platforms.
            (WebCore::CanvasRenderingContext2D::arcTo): Bound checking per the spec for arcTo parameters. Updated parameter names to match spec.
            * platform/graphics/Path.h: Added in new method to expose the current position.
            * platform/graphics/cairo/PathCairo.cpp:
            (WebCore::Path::currentPoint): Added in likely correct implementation for this call with a FIXME just in case.
            * platform/graphics/cg/PathCG.cpp:
            (WebCore::Path::currentPoint): Added in support for this call.
            * platform/graphics/haiku/PathHaiku.cpp:
            (WebCore::Path::currentPoint): Added in stub for this call.
            * platform/graphics/openvg/PathOpenVG.cpp:
            (WebCore::Path::currentPoint): Added in likely implementation for this call with a FIXME just in case.
            * platform/graphics/qt/PathQt.cpp:
            (WebCore::Path::currentPoint): Added in implementation for this call courtesy of Andrea Kling.
            * platform/graphics/skia/PathSkia.cpp:
            (WebCore::Path::currentPoint): Added in stub for this call.
            * platform/graphics/wince/PathWince.cpp:
            (WebCore::Path::currentPoint): Added in stub for this call.
            * platform/graphics/wx/PathWx.cpp:
            (WebCore::Path::currentPoint): Added in stub for this call.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63599 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2eef563..860a92c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-16  Matthew Delaney  <mdelaney at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Failing 2d.path.stroke.prune.arc philip canvas test
+        https://bugs.webkit.org/show_bug.cgi?id=42188
+
+        * platform/mac/Skipped: Unskipped now passing tests.
+
 2010-07-16  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r63593.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 41d30e9..9e83653 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -213,10 +213,8 @@ 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.arc.html
 canvas/philip/tests/2d.path.stroke.prune.closed.html
 canvas/philip/tests/2d.path.stroke.prune.curve.html
-canvas/philip/tests/2d.path.stroke.prune.line.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 2d2c7a2..bf5a793 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,32 @@
+2010-07-16  Matthew Delaney  <mdelaney at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Failing 2d.path.stroke.prune.arc philip canvas test
+        https://bugs.webkit.org/show_bug.cgi?id=42188
+
+        * html/canvas/CanvasRenderingContext2D.cpp: 
+        Note, updated parameter names to match spec.
+        (WebCore::CanvasRenderingContext2D::lineTo): Pulled bound checking code out of lower code to have checks for all platforms.
+        (WebCore::CanvasRenderingContext2D::arcTo): Bound checking per the spec for arcTo parameters. Updated parameter names to match spec.
+        * platform/graphics/Path.h: Added in new method to expose the current position.
+        * platform/graphics/cairo/PathCairo.cpp:
+        (WebCore::Path::currentPoint): Added in likely correct implementation for this call with a FIXME just in case.
+        * platform/graphics/cg/PathCG.cpp:
+        (WebCore::Path::currentPoint): Added in support for this call.
+        * platform/graphics/haiku/PathHaiku.cpp:
+        (WebCore::Path::currentPoint): Added in stub for this call.
+        * platform/graphics/openvg/PathOpenVG.cpp:
+        (WebCore::Path::currentPoint): Added in likely implementation for this call with a FIXME just in case.
+        * platform/graphics/qt/PathQt.cpp:
+        (WebCore::Path::currentPoint): Added in implementation for this call courtesy of Andrea Kling.
+        * platform/graphics/skia/PathSkia.cpp:
+        (WebCore::Path::currentPoint): Added in stub for this call.
+        * platform/graphics/wince/PathWince.cpp:
+        (WebCore::Path::currentPoint): Added in stub for this call.
+        * platform/graphics/wx/PathWx.cpp:
+        (WebCore::Path::currentPoint): Added in stub for this call.
+
 2010-07-16  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r63593.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index c573dd8..8827678 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -575,9 +575,11 @@ 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(FloatPoint(x, y));
-    else
+        m_path.moveTo(p1);
+    else if (p1 != m_path.currentPoint())
         m_path.addLineTo(FloatPoint(x, y));
 }
 
@@ -603,19 +605,27 @@ void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x,
     m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y));
 }
 
-void CanvasRenderingContext2D::arcTo(float x0, float y0, float x1, float y1, float r, ExceptionCode& ec)
+void CanvasRenderingContext2D::arcTo(float x1, float y1, float x2, float y2, float r, ExceptionCode& ec)
 {
     ec = 0;
-    if (!isfinite(x0) | !isfinite(y0) | !isfinite(x1) | !isfinite(y1) | !isfinite(r))
+    if (!isfinite(x1) | !isfinite(y1) | !isfinite(x2) | !isfinite(y2) | !isfinite(r))
         return;
     
     if (r < 0) {
         ec = INDEX_SIZE_ERR;
         return;
     }
+    
     if (!state().m_invertibleCTM)
         return;
-    m_path.addArcTo(FloatPoint(x0, y0), FloatPoint(x1, y1), r);
+    
+    FloatPoint p1 = FloatPoint(x1, y1);
+    FloatPoint p2 = FloatPoint(x2, y2);
+    
+    if (p1 == m_path.currentPoint() || p1 == p2 || !r)
+        lineTo(x1, y1);
+    else
+        m_path.addArcTo(p1, p2, r);
 }
 
 void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea, bool anticlockwise, ExceptionCode& ec)
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index b69670f..f2ae2df 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -124,6 +124,7 @@ namespace WebCore {
         // Gets the current point of the current path, which is conceptually the final point reached by the path so far.
         // Note the Path can be empty (isEmpty() == true) and still have a current point.
         bool hasCurrentPoint() const;
+        FloatPoint currentPoint() const;
 
         void moveTo(const FloatPoint&);
         void addLineTo(const FloatPoint&);
diff --git a/WebCore/platform/graphics/cairo/PathCairo.cpp b/WebCore/platform/graphics/cairo/PathCairo.cpp
index 91cecd3..d880626 100644
--- a/WebCore/platform/graphics/cairo/PathCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PathCairo.cpp
@@ -86,6 +86,15 @@ bool Path::hasCurrentPoint() const
     return !isEmpty();
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    // FIXME: Is this the correct way?
+    double x;
+    double y;
+    cairo_get_current_point(platformPath()->m_cr, &x, &y);
+    return FloatPoint(x, y);
+}
+
 void Path::translate(const FloatSize& p)
 {
     cairo_t* cr = platformPath()->m_cr;
diff --git a/WebCore/platform/graphics/cg/PathCG.cpp b/WebCore/platform/graphics/cg/PathCG.cpp
index eb196d9..7ebb9ea 100644
--- a/WebCore/platform/graphics/cg/PathCG.cpp
+++ b/WebCore/platform/graphics/cg/PathCG.cpp
@@ -249,6 +249,11 @@ bool Path::hasCurrentPoint() const
 {
     return !isEmpty();
 }
+    
+FloatPoint Path::currentPoint() const 
+{
+    return CGPathGetCurrentPoint(m_path);
+}
 
 static void CGPathToCFStringApplierFunction(void* info, const CGPathElement *element)
 {
diff --git a/WebCore/platform/graphics/haiku/PathHaiku.cpp b/WebCore/platform/graphics/haiku/PathHaiku.cpp
index d8b6932..c5b8c98 100644
--- a/WebCore/platform/graphics/haiku/PathHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/PathHaiku.cpp
@@ -65,6 +65,14 @@ bool Path::hasCurrentPoint() const
     return !isEmpty();
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    // FIXME: implement safe way to return current point of subpath.
+    notImplemented();
+    float quietNaN = std::numeric_limits<float>::quiet_NaN();
+    return FloatPoint(quietNaN, quietNaN);
+}
+
 bool Path::contains(const FloatPoint& point, WindRule rule) const
 {
     return m_path->Contains(point);
diff --git a/WebCore/platform/graphics/openvg/PathOpenVG.cpp b/WebCore/platform/graphics/openvg/PathOpenVG.cpp
index 7e67036..e74ea57 100644
--- a/WebCore/platform/graphics/openvg/PathOpenVG.cpp
+++ b/WebCore/platform/graphics/openvg/PathOpenVG.cpp
@@ -123,6 +123,13 @@ Path& Path::operator=(const Path& other)
     return *this;
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    // FIXME: is this the way to return the current point of the subpath?
+    return m_currentPoint;
+}
+
+
 bool Path::contains(const FloatPoint& point, WindRule rule) const
 {
     notImplemented();
diff --git a/WebCore/platform/graphics/qt/PathQt.cpp b/WebCore/platform/graphics/qt/PathQt.cpp
index d296e29..d2e7c00 100644
--- a/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/WebCore/platform/graphics/qt/PathQt.cpp
@@ -362,6 +362,11 @@ bool Path::hasCurrentPoint() const
     return !isEmpty();
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    return m_path.currentPosition();
+}
+
 String Path::debugString() const
 {
     QString ret;
diff --git a/WebCore/platform/graphics/skia/PathSkia.cpp b/WebCore/platform/graphics/skia/PathSkia.cpp
index a0d4c79..12241f8 100644
--- a/WebCore/platform/graphics/skia/PathSkia.cpp
+++ b/WebCore/platform/graphics/skia/PathSkia.cpp
@@ -74,6 +74,13 @@ bool Path::hasCurrentPoint() const
     return m_path->getPoints(NULL, 0) != 0;
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    // FIXME: return current point of subpath.
+    float quietNaN = std::numeric_limits<float>::quiet_NaN();
+    return FloatPoint(quietNaN, quietNaN);
+}
+
 bool Path::contains(const FloatPoint& point, WindRule rule) const
 {
     return SkPathContainsPoint(m_path, point,
diff --git a/WebCore/platform/graphics/wince/PathWince.cpp b/WebCore/platform/graphics/wince/PathWince.cpp
index 00d03b1..747e650 100644
--- a/WebCore/platform/graphics/wince/PathWince.cpp
+++ b/WebCore/platform/graphics/wince/PathWince.cpp
@@ -160,4 +160,11 @@ bool Path::hasCurrentPoint() const
     return !isEmpty();
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    // FIXME: return current point of subpath.
+    float quietNaN = std::numeric_limits<float>::quiet_NaN();
+    return FloatPoint(quietNaN, quietNaN);
+}
+
 }
diff --git a/WebCore/platform/graphics/wx/PathWx.cpp b/WebCore/platform/graphics/wx/PathWx.cpp
index 2305be0..3006e27 100644
--- a/WebCore/platform/graphics/wx/PathWx.cpp
+++ b/WebCore/platform/graphics/wx/PathWx.cpp
@@ -245,4 +245,11 @@ bool Path::hasCurrentPoint() const
     return !isEmpty();
 }
 
+FloatPoint Path::currentPoint() const 
+{
+    // FIXME: return current point of subpath.
+    float quietNaN = std::numeric_limits<float>::quiet_NaN();
+    return FloatPoint(quietNaN, quietNaN);
+}
+
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list