2010-07-12 Andreas Kling <andreas.kling@nokia.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2010 12:17:40 +0000 (12:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jul 2010 12:17:40 +0000 (12:17 +0000)
        Reviewed by Antti Koivisto.

        Canvas: arc() with startAngle == endAngle shouldn't add to the path
        https://bugs.webkit.org/show_bug.cgi?id=41420

        Unskip (for Qt) test that now passes:
        - canvas/philip/tests/2d.path.stroke.prune.arc.html

        Spec link:
        http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-stroke

        * platform/qt/Skipped:
2010-07-12  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Antti Koivisto.

        Canvas: arc() with startAngle == endAngle shouldn't add to the path
        https://bugs.webkit.org/show_bug.cgi?id=41420

        Spec link:
        http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-stroke

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::arc):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/qt/Skipped
WebCore/ChangeLog
WebCore/html/canvas/CanvasRenderingContext2D.cpp

index c7e003d..1dc13e0 100644 (file)
@@ -1,3 +1,18 @@
+2010-07-12  Andreas Kling  <andreas.kling@nokia.com>
+
+        Reviewed by Antti Koivisto.
+
+        Canvas: arc() with startAngle == endAngle shouldn't add to the path
+        https://bugs.webkit.org/show_bug.cgi?id=41420
+
+        Unskip (for Qt) test that now passes:
+        - canvas/philip/tests/2d.path.stroke.prune.arc.html
+
+        Spec link:
+        http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-stroke
+
+        * platform/qt/Skipped:
+
 2010-07-12  Jeremy Orlow  <jorlow@chromium.org>
 
         Somehow the updated expectations got dropped form the original patch.  Added.
index 1c6e1ac..04ca673 100644 (file)
@@ -5298,7 +5298,6 @@ canvas/philip/tests/2d.path.quadraticCurveTo.shape.html
 canvas/philip/tests/2d.path.rect.winding.html
 canvas/philip/tests/2d.path.rect.zero.4.html
 canvas/philip/tests/2d.path.rect.zero.6.html
-canvas/philip/tests/2d.path.stroke.prune.arc.html
 canvas/philip/tests/2d.path.stroke.scale2.html
 canvas/philip/tests/2d.pattern.image.broken.html
 canvas/philip/tests/2d.pattern.image.incomplete.html
index 64f3139..027d7be 100644 (file)
@@ -1,3 +1,16 @@
+2010-07-12  Andreas Kling  <andreas.kling@nokia.com>
+
+        Reviewed by Antti Koivisto.
+
+        Canvas: arc() with startAngle == endAngle shouldn't add to the path
+        https://bugs.webkit.org/show_bug.cgi?id=41420
+
+        Spec link:
+        http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-stroke
+
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::arc):
+
 2010-07-12  Shinichiro Hamaji  <hamaji@chromium.org>
 
         Reviewed by Ojan Vafai.
index 2ac2ca3..bfe391d 100644 (file)
@@ -614,6 +614,10 @@ void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea
         ec = INDEX_SIZE_ERR;
         return;
     }
+
+    if (sa == ea)
+        return;
+
     if (!state().m_invertibleCTM)
         return;
     m_path.addArc(FloatPoint(x, y), r, sa, ea, anticlockwise);