[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:41:26 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7ea6040b148420af36cef55aac491a0723e22653
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 27 08:20:10 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@66188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 110f5b5..9d43009 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>
 
         Reviewed by Dirk Schulze.
diff --git a/LayoutTests/svg/dom/path-pointAtLength-expected.txt b/LayoutTests/svg/dom/path-pointAtLength-expected.txt
new file mode 100644
index 0000000..7ad7f83
--- /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, 19.99991226196289)'
+PASS pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20') is '(100, 19.999984741210938)'
+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..fd3247e
--- /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 "(" + point.x + ", " + point.y + ")";
+}
+
+shouldBe("pointAtLengthOfPath('M0,20 L400,20 L640,20')", "'(640, 20)'");
+shouldBe("pointAtLengthOfPath('M0,20 L400,20 L640,20 z')", "'(580, 19.99991226196289)'");
+shouldBe("pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20')", "'(100, 19.999984741210938)'");
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 88adc74..b155f17 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+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  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Dirk Schulze.
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