[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

krit at webkit.org krit at webkit.org
Wed Dec 22 12:42:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 0fea72bde5e7d0a8f51e4bd94a626f546699ffd5
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 27 12:09:21 2010 +0000

    2010-08-27  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            getPointAtLength returns incorrect values for paths closed with the closepath command
            https://bugs.webkit.org/show_bug.cgi?id=44197
    
            The closepath segment was traversed by the wrong direction. Swap starting point and
            end point for closeSubpath.
    
            Test: svg/dom/path-pointAtLength.html
    
            * platform/graphics/PathTraversalState.cpp:
            (WebCore::PathTraversalState::closeSubpath):
    2010-08-27  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            getPointAtLength returns incorrect values for paths closed with the closepath command
            https://bugs.webkit.org/show_bug.cgi?id=44197
    
            Test that path gives back the correct point on a given length for the closepath segment.
    
            * svg/dom/path-pointAtLength-expected.txt: Added.
            * svg/dom/path-pointAtLength.html: Added.
            * svg/dom/script-tests/path-pointAtLength.js: Added.
            (pointAtLengthOfPath):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66208 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1a0e09d..c7fc47c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-27  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        getPointAtLength returns incorrect values for paths closed with the closepath command
+        https://bugs.webkit.org/show_bug.cgi?id=44197
+        
+        Test that path gives back the correct point on a given length for the closepath segment.
+
+        * svg/dom/path-pointAtLength-expected.txt: Added.
+        * svg/dom/path-pointAtLength.html: Added.
+        * svg/dom/script-tests/path-pointAtLength.js: Added.
+        (pointAtLengthOfPath):
+
 2010-08-27  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Not reviewed. Turn leopard bot green again (skip more media tests :/)
diff --git a/LayoutTests/svg/dom/path-pointAtLength-expected.txt b/LayoutTests/svg/dom/path-pointAtLength-expected.txt
new file mode 100644
index 0000000..612b1f2
--- /dev/null
+++ b/LayoutTests/svg/dom/path-pointAtLength-expected.txt
@@ -0,0 +1,12 @@
+This tests getPointAtLength of SVG path.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS pointAtLengthOfPath('M0,20 L400,20 L640,20') is '(640, 20)'
+PASS pointAtLengthOfPath('M0,20 L400,20 L640,20 z') is '(580, 20)'
+PASS pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20') is '(100, 20)'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/path-pointAtLength.html b/LayoutTests/svg/dom/path-pointAtLength.html
new file mode 100644
index 0000000..c319404
--- /dev/null
+++ b/LayoutTests/svg/dom/path-pointAtLength.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/path-pointAtLength.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/script-tests/path-pointAtLength.js b/LayoutTests/svg/dom/script-tests/path-pointAtLength.js
new file mode 100644
index 0000000..751bf2a
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/path-pointAtLength.js
@@ -0,0 +1,16 @@
+description("This tests getPointAtLength of SVG path.");
+
+var pathElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
+
+function pointAtLengthOfPath(string) {
+    pathElement.setAttributeNS(null, "d", string);
+
+    var point = pathElement.getPointAtLength(700);
+    return "(" + Math.round(point.x) + ", " + Math.round(point.y) + ")";
+}
+
+shouldBe("pointAtLengthOfPath('M0,20 L400,20 L640,20')", "'(640, 20)'");
+shouldBe("pointAtLengthOfPath('M0,20 L400,20 L640,20 z')", "'(580, 20)'");
+shouldBe("pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20')", "'(100, 20)'");
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a68d36c..c46e523 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,21 @@
 
         Reviewed by Nikolas Zimmermann.
 
+        getPointAtLength returns incorrect values for paths closed with the closepath command
+        https://bugs.webkit.org/show_bug.cgi?id=44197
+        
+        The closepath segment was traversed by the wrong direction. Swap starting point and
+        end point for closeSubpath.
+
+        Test: svg/dom/path-pointAtLength.html
+
+        * platform/graphics/PathTraversalState.cpp:
+        (WebCore::PathTraversalState::closeSubpath):
+
+2010-08-27  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
         SVG Filter with wrong results on repaint for non-CG platforms
         https://bugs.webkit.org/show_bug.cgi?id=44706
         
diff --git a/WebCore/platform/graphics/PathTraversalState.cpp b/WebCore/platform/graphics/PathTraversalState.cpp
index d202649..ecdcb1b 100644
--- a/WebCore/platform/graphics/PathTraversalState.cpp
+++ b/WebCore/platform/graphics/PathTraversalState.cpp
@@ -160,7 +160,7 @@ PathTraversalState::PathTraversalState(PathTraversalAction action)
 float PathTraversalState::closeSubpath()
 {
     float distance = distanceLine(m_current, m_start);
-    m_start = m_control1 = m_control2 = m_current;
+    m_current = m_control1 = m_control2 = m_start;
     return distance;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list