[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 13:10:20 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b01a1e700ca5ce6007d509f5da5055294958dd51
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 8 04:02:55 2010 +0000

    2010-09-07  Jan E Hanssen  <jhanssen at sencha.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] Added test case for Path::length()
            https://bugs.webkit.org/show_bug.cgi?id=45331
    
            Also removed test case for Path::pointAtLength() that is now passing
    
            * platform/qt/svg/dom/path-pointAtLength-expected.txt: Removed.
            * svg/dom/path-totalLength-expected.txt: Added.
            * svg/dom/path-totalLength.html: Added.
            * svg/dom/script-tests/path-totalLength.js: Added.
            (getTotalLength):
    2010-09-07  Jan E Hanssen  <jhanssen at sencha.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] Add a separate Path::closeCanvasSubpath() function for canvas paths
            https://bugs.webkit.org/show_bug.cgi?id=45331
    
            This is needed due to an adverse effect of the fix in 44061 that causes
            certain paths not to be closed. This is not important for canvas paths
            but it is for SVG paths, so splitting up the code in a generic (SVG)
            case and one specialized for canvas.
    
            Test: svg/dom/path-totalLength.html
    
            * html/canvas/CanvasRenderingContext2D.cpp:
            (WebCore::CanvasRenderingContext2D::closePath):
            * platform/graphics/Path.h:
            (WebCore::Path::closeCanvasSubpath):
            * platform/graphics/qt/PathQt.cpp:
            (WebCore::Path::closeSubpath):
            (WebCore::Path::closeCanvasSubpath):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index daedb7c..64880e0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-07  Jan E Hanssen  <jhanssen at sencha.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Added test case for Path::length()
+        https://bugs.webkit.org/show_bug.cgi?id=45331
+
+        Also removed test case for Path::pointAtLength() that is now passing
+
+        * platform/qt/svg/dom/path-pointAtLength-expected.txt: Removed.
+        * svg/dom/path-totalLength-expected.txt: Added.
+        * svg/dom/path-totalLength.html: Added.
+        * svg/dom/script-tests/path-totalLength.js: Added.
+        (getTotalLength):
+
 2010-09-07  Ojan Vafai  <ojan at chromium.org>
 
         Reviewed by Kent Tamura.
diff --git a/LayoutTests/platform/qt/svg/dom/path-pointAtLength-expected.txt b/LayoutTests/platform/qt/svg/dom/path-pointAtLength-expected.txt
deleted file mode 100644
index 2d0a5f3..0000000
--- a/LayoutTests/platform/qt/svg/dom/path-pointAtLength-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-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)'
-FAIL pointAtLengthOfPath('M0,20 L400,20 z M 320,20 L640,20') should be (100, 20). Was (620, 20).
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/svg/dom/path-totalLength-expected.txt b/LayoutTests/svg/dom/path-totalLength-expected.txt
new file mode 100644
index 0000000..46f3426
--- /dev/null
+++ b/LayoutTests/svg/dom/path-totalLength-expected.txt
@@ -0,0 +1,12 @@
+This tests getTotalLength of SVG path.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getTotalLength('M0,20 L400,20 L640,20') is 640
+PASS getTotalLength('M0,20 L400,20 L640,20 z') is 1280
+PASS getTotalLength('M0,20 L400,20 z M 320,20 L640,20') is 1120
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/path-totalLength.html b/LayoutTests/svg/dom/path-totalLength.html
new file mode 100644
index 0000000..e6a7fd6
--- /dev/null
+++ b/LayoutTests/svg/dom/path-totalLength.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-totalLength.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/script-tests/path-totalLength.js b/LayoutTests/svg/dom/script-tests/path-totalLength.js
new file mode 100644
index 0000000..ad46239
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/path-totalLength.js
@@ -0,0 +1,16 @@
+description("This tests getTotalLength of SVG path.");
+
+var pathElement = document.createElementNS("http://www.w3.org/2000/svg", "path");
+
+function getTotalLength(string) {
+    pathElement.setAttributeNS(null, "d", string);
+
+    var point = pathElement.getTotalLength();
+    return point;
+}
+
+shouldBe("getTotalLength('M0,20 L400,20 L640,20')", "640");
+shouldBe("getTotalLength('M0,20 L400,20 L640,20 z')", "1280");
+shouldBe("getTotalLength('M0,20 L400,20 z M 320,20 L640,20')", "1120");
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1f74a91..5074903 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-09-07  Jan E Hanssen  <jhanssen at sencha.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Add a separate Path::closeCanvasSubpath() function for canvas paths
+        https://bugs.webkit.org/show_bug.cgi?id=45331
+
+        This is needed due to an adverse effect of the fix in 44061 that causes
+        certain paths not to be closed. This is not important for canvas paths
+        but it is for SVG paths, so splitting up the code in a generic (SVG)
+        case and one specialized for canvas.
+
+        Test: svg/dom/path-totalLength.html
+
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::closePath):
+        * platform/graphics/Path.h:
+        (WebCore::Path::closeCanvasSubpath):
+        * platform/graphics/qt/PathQt.cpp:
+        (WebCore::Path::closeSubpath):
+        (WebCore::Path::closeCanvasSubpath):
+
 2010-09-07  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Chris Marrin.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 49f54fb..5100950 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -659,7 +659,7 @@ void CanvasRenderingContext2D::closePath()
 
     FloatRect boundRect = m_path.boundingRect();
     if (boundRect.width() || boundRect.height())
-        m_path.closeSubpath();
+        m_path.closeCanvasSubpath();
 }
 
 void CanvasRenderingContext2D::moveTo(float x, float y)
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index 61ea328..9896713 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -133,6 +133,11 @@ namespace WebCore {
         void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& controlPoint2, const FloatPoint& endPoint);
         void addArcTo(const FloatPoint&, const FloatPoint&, float radius);
         void closeSubpath();
+#if PLATFORM(QT)
+        void closeCanvasSubpath();
+#else
+        void closeCanvasSubpath() { closeSubpath(); }
+#endif
 
         void addArc(const FloatPoint&, float radius, float startAngle, float endAngle, bool anticlockwise);
         void addRect(const FloatRect&);
diff --git a/WebCore/platform/graphics/qt/PathQt.cpp b/WebCore/platform/graphics/qt/PathQt.cpp
index ce5da2e..35edd0e 100644
--- a/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/WebCore/platform/graphics/qt/PathQt.cpp
@@ -264,6 +264,11 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
 
 void Path::closeSubpath()
 {
+    m_path.closeSubpath();
+}
+
+void Path::closeCanvasSubpath()
+{
     const int elementCount = m_path.elementCount();
 
     if (!elementCount)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list