[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 15:28:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 89d219b5b5bc897b9503374f9872f4da0bd4be33
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 4 08:49:37 2010 +0000

    2010-11-04  Shane Stephens  <shanestephens at google.com>
    
            Reviewed by Tony Chang.
    
            SVGStyledTransformableElement supplemental transforms pre-multiplied
            but should be post-multiplied.
            https://bugs.webkit.org/show_bug.cgi?id=48026
    
            * svg/animations/animate-path-nested-transforms-expected.txt: Added.
            * svg/animations/animate-path-nested-transforms.svg: Added.
    2010-11-04  Shane Stephens  <shanestephens at google.com>
    
            Reviewed by Tony Chang.
    
            SVGStyledTransformableElement supplemental transforms pre-multiplied
            but should be post-multiplied.
            https://bugs.webkit.org/show_bug.cgi?id=48026
    
            Test: svg/animations/animate-path-nested-transforms.svg
    
            * svg/SVGStyledTransformableElement.cpp:
            (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
    
            Switched order of multiplication.  Note that due to a bug in
            AffineTransform's operator* implementation the order of arguments is
            reversed (see http://bugs.webkit.org/show_bug.cgi?id=48031).
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71314 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8221811..b18a4b0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-04  Shane Stephens  <shanestephens at google.com>
+
+        Reviewed by Tony Chang.
+
+        SVGStyledTransformableElement supplemental transforms pre-multiplied 
+        but should be post-multiplied.
+        https://bugs.webkit.org/show_bug.cgi?id=48026
+
+        * svg/animations/animate-path-nested-transforms-expected.txt: Added.
+        * svg/animations/animate-path-nested-transforms.svg: Added.
+
 2010-11-04  James Simonsen  <simonjam at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt b/LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt
new file mode 100644
index 0000000..48ae2c2
--- /dev/null
+++ b/LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt
@@ -0,0 +1,19 @@
+Test nested transforms with animateMotion
+
+test to determine whether auto-rotate animateMotion path animations pre-muliply or post-multiply animation transform matrix
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+    
+  
+
+PASS rootSVGElement.getBBox().x is almost 400 (within 20)
+PASS rootSVGElement.getBBox().y is almost 240 (within 20)
+PASS rootSVGElement.getBBox().x is almost 660 (within 20)
+PASS rootSVGElement.getBBox().y is almost 270 (within 20)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/animations/animate-path-nested-transforms.html b/LayoutTests/svg/animations/animate-path-nested-transforms.html
new file mode 100644
index 0000000..9d03aa3
--- /dev/null
+++ b/LayoutTests/svg/animations/animate-path-nested-transforms.html
@@ -0,0 +1,15 @@
+<!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>
+    <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
+    <script src="resources/SVGAnimationTestCase.js"></script>
+  </head>
+  <body>
+    <h1>Test nested transforms with animateMotion</h1>
+    <p id="description"/>
+    <div id="console"/>
+    <script src="script-tests/animate-path-nested-transforms.js"></script>
+  </body>
+</html>
diff --git a/LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js b/LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js
new file mode 100644
index 0000000..9ca70bf
--- /dev/null
+++ b/LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js
@@ -0,0 +1,57 @@
+description("test to determine whether auto-rotate animateMotion path animations pre-muliply or post-multiply animation transform matrix");
+createSVGTestCase();
+
+rootSVGElement.setAttribute("width", 800)
+
+var g = createSVGElement("g")
+g.setAttribute("transform", "translate(300, 30)")
+
+var rect = createSVGElement("rect")
+rect.setAttribute("id", "rect")
+rect.setAttribute("width", "40")
+rect.setAttribute("height", "40")
+rect.setAttribute("fill", "green")
+rect.setAttribute("onclick", "executeTest()")
+g.appendChild(rect)
+
+var animateMotion = createSVGElement("animateMotion")
+animateMotion.setAttribute("id", "animation")
+animateMotion.setAttribute("dur", "1s")
+animateMotion.setAttribute("repeatCount", "1")
+animateMotion.setAttribute("rotate", "auto")
+animateMotion.setAttribute("path", "M 100,250 C 100,50 400,50 400,250")
+animateMotion.setAttribute("begin", "click")
+g.appendChild(animateMotion)
+rootSVGElement.appendChild(g)
+
+function passIfCloseEnough(name, value, error) {
+    passed = isCloseEnough(eval(name), value, error);
+    if (passed) {
+        testPassed(name + " is almost " + value + " (within " + error + ")");
+    } else {
+        testFailed(name + " is " + eval(name) + " but should be within " + error + " of " + value);  
+    }
+}
+
+function startSample() {
+    passIfCloseEnough("rootSVGElement.getBBox().x", 400, 20);
+    passIfCloseEnough("rootSVGElement.getBBox().y", 240, 20);
+}
+
+function endSample() {
+    passIfCloseEnough("rootSVGElement.getBBox().x", 660, 20);
+    passIfCloseEnough("rootSVGElement.getBBox().y", 270, 20);
+}
+
+function executeTest() {
+    const expectedValues = [
+        ["animation", 0.01, "rect", startSample],
+        ["animation", 0.99, "rect", endSample]
+    ];
+    
+    runAnimationTest(expectedValues);
+}
+
+window.setTimeout("triggerUpdate(310, 40)", 0);
+var successfullyParsed = true;
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2e9288a..87e9806 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-04  Shane Stephens  <shanestephens at google.com>
+
+        Reviewed by Tony Chang.
+
+        SVGStyledTransformableElement supplemental transforms pre-multiplied
+        but should be post-multiplied.
+        https://bugs.webkit.org/show_bug.cgi?id=48026
+
+        Test: svg/animations/animate-path-nested-transforms.svg
+
+        * svg/SVGStyledTransformableElement.cpp:
+        (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
+        
+        Switched order of multiplication.  Note that due to a bug in
+        AffineTransform's operator* implementation the order of arguments is
+        reversed (see http://bugs.webkit.org/show_bug.cgi?id=48031).
+
 2010-11-04  James Simonsen  <simonjam at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index 9b34203..87d812c 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -54,7 +54,7 @@ AffineTransform SVGStyledTransformableElement::getScreenCTM(StyleUpdateStrategy
 
 AffineTransform SVGStyledTransformableElement::animatedLocalTransform() const
 {
-    return m_supplementalTransform ? transform()->concatenate().matrix() * *m_supplementalTransform : transform()->concatenate().matrix();
+    return m_supplementalTransform ? *m_supplementalTransform * transform()->concatenate().matrix() : transform()->concatenate().matrix();
 }
     
 AffineTransform* SVGStyledTransformableElement::supplementalTransform()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list