- Revision
- 94558
- Author
- [email protected]
- Date
- 2011-09-06 01:18:23 -0700 (Tue, 06 Sep 2011)
Log Message
Return to transform multiplication: motion transform * other transforms
https://bugs.webkit.org/show_bug.cgi?id=67601
Source/WebCore:
Reviewed by Nikolas Zimmermann.
Right now we take the current transform of a transformable SVG element, post multiply the animation transform
and post multiply the motion transform to the other both:
transform * animation transform * motion transform
We switched to this behavior with the clean up of AffineTransform.
While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to:
motion transform * transform * animation transform
This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms
on the SVG WG, their is a consense that the current specified behavior is unwanted. See
http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details.
We pass the following tests of the official W3C SVG test suite again now:
- animate-elem-24-t.svg
- animate-elem-30-t.svg
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::animatedLocalTransform):
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::animatedLocalTransform):
LayoutTests:
Reviewed by Nikolas Zimmermann.
Change the expected results of nested transformations to match new behavior
on matrices multiplications.
* svg/animations/animate-path-nested-transforms-expected.txt:
* svg/animations/animate-text-nested-transforms-expected.txt:
* svg/animations/script-tests/animate-path-nested-transforms.js:
(startSample):
(endSample):
* svg/animations/script-tests/animate-text-nested-transforms.js:
(startSample):
(endSample):
* svg/animations/svgtransform-animation-discrete-expected.txt:
* svg/animations/svgtransform-animation-discrete.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (94557 => 94558)
--- trunk/LayoutTests/ChangeLog 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/ChangeLog 2011-09-06 08:18:23 UTC (rev 94558)
@@ -1,3 +1,24 @@
+2011-09-06 Dirk Schulze <[email protected]>
+
+ Return to transform multiplication: motion transform * other transforms
+ https://bugs.webkit.org/show_bug.cgi?id=67601
+
+ Reviewed by Nikolas Zimmermann.
+
+ Change the expected results of nested transformations to match new behavior
+ on matrices multiplications.
+
+ * svg/animations/animate-path-nested-transforms-expected.txt:
+ * svg/animations/animate-text-nested-transforms-expected.txt:
+ * svg/animations/script-tests/animate-path-nested-transforms.js:
+ (startSample):
+ (endSample):
+ * svg/animations/script-tests/animate-text-nested-transforms.js:
+ (startSample):
+ (endSample):
+ * svg/animations/svgtransform-animation-discrete-expected.txt:
+ * svg/animations/svgtransform-animation-discrete.html:
+
2011-09-06 Andras Becsi <[email protected]>
[Qt][WK2] http/tests/history/popstate-fires-with-pending-requests.html breaks ~400 subsequent tests
Modified: trunk/LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt (94557 => 94558)
--- trunk/LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt 2011-09-06 08:18:23 UTC (rev 94558)
@@ -5,10 +5,10 @@
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 rootSVGElement.getBBox().x is almost 132 (within 20)
+PASS rootSVGElement.getBBox().y is almost -90 (within 20)
+PASS rootSVGElement.getBBox().x is almost 332 (within 20)
+PASS rootSVGElement.getBBox().y is almost 550 (within 20)
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/svg/animations/animate-text-nested-transforms-expected.txt (94557 => 94558)
--- trunk/LayoutTests/svg/animations/animate-text-nested-transforms-expected.txt 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/svg/animations/animate-text-nested-transforms-expected.txt 2011-09-06 08:18:23 UTC (rev 94558)
@@ -6,10 +6,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS rootSVGElement.getBBox().x is almost 390 (within 20)
-PASS rootSVGElement.getBBox().y is almost 140 (within 20)
-PASS rootSVGElement.getBBox().x is almost 700 (within 20)
-PASS rootSVGElement.getBBox().y is almost 270 (within 20)
+PASS rootSVGElement.getBBox().x is almost 196 (within 20)
+PASS rootSVGElement.getBBox().y is almost -186 (within 20)
+PASS rootSVGElement.getBBox().x is almost 370 (within 20)
+PASS rootSVGElement.getBBox().y is almost 547 (within 20)
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js (94557 => 94558)
--- trunk/LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js 2011-09-06 08:18:23 UTC (rev 94558)
@@ -35,13 +35,13 @@
}
function startSample() {
- passIfCloseEnough("rootSVGElement.getBBox().x", 400, 20);
- passIfCloseEnough("rootSVGElement.getBBox().y", 240, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().x", 132, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().y", -90, 20);
}
function endSample() {
- passIfCloseEnough("rootSVGElement.getBBox().x", 660, 20);
- passIfCloseEnough("rootSVGElement.getBBox().y", 270, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().x", 332, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().y", 550, 20);
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/script-tests/animate-text-nested-transforms.js (94557 => 94558)
--- trunk/LayoutTests/svg/animations/script-tests/animate-text-nested-transforms.js 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/svg/animations/script-tests/animate-text-nested-transforms.js 2011-09-06 08:18:23 UTC (rev 94558)
@@ -28,13 +28,13 @@
}
function startSample() {
- passIfCloseEnough("rootSVGElement.getBBox().x", 390, 20);
- passIfCloseEnough("rootSVGElement.getBBox().y", 140, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().x", 196, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().y", -186, 20);
}
function endSample() {
- passIfCloseEnough("rootSVGElement.getBBox().x", 700, 20);
- passIfCloseEnough("rootSVGElement.getBBox().y", 270, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().x", 370, 20);
+ passIfCloseEnough("rootSVGElement.getBBox().y", 547, 20);
}
function executeTest() {
Modified: trunk/LayoutTests/svg/animations/svgtransform-animation-discrete-expected.txt (94557 => 94558)
--- trunk/LayoutTests/svg/animations/svgtransform-animation-discrete-expected.txt 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/svg/animations/svgtransform-animation-discrete-expected.txt 2011-09-06 08:18:23 UTC (rev 94558)
@@ -1,4 +1,4 @@
-SVG 1.1 transform animation tests
+SVG 1.1 dynamic animation tests
Test calcMode=discrete animation on SVGAnimateTransform.
Modified: trunk/LayoutTests/svg/animations/svgtransform-animation-discrete.html (94557 => 94558)
--- trunk/LayoutTests/svg/animations/svgtransform-animation-discrete.html 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/LayoutTests/svg/animations/svgtransform-animation-discrete.html 2011-09-06 08:18:23 UTC (rev 94558)
@@ -7,7 +7,7 @@
<script src=""
</head>
<body>
-<h1>SVG 1.1 transform animation tests</h1>
+<h1>SVG 1.1 dynamic animation tests</h1>
<p id="description"></p>
<div id="console"></div>
<script src=""
Modified: trunk/Source/WebCore/ChangeLog (94557 => 94558)
--- trunk/Source/WebCore/ChangeLog 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/Source/WebCore/ChangeLog 2011-09-06 08:18:23 UTC (rev 94558)
@@ -1,3 +1,34 @@
+2011-09-06 Dirk Schulze <[email protected]>
+
+ Return to transform multiplication: motion transform * other transforms
+ https://bugs.webkit.org/show_bug.cgi?id=67601
+
+ Reviewed by Nikolas Zimmermann.
+
+ Right now we take the current transform of a transformable SVG element, post multiply the animation transform
+ and post multiply the motion transform to the other both:
+
+ transform * animation transform * motion transform
+
+ We switched to this behavior with the clean up of AffineTransform.
+ While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to:
+
+ motion transform * transform * animation transform
+
+ This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms
+ on the SVG WG, their is a consense that the current specified behavior is unwanted. See
+ http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details.
+
+ We pass the following tests of the official W3C SVG test suite again now:
+
+ - animate-elem-24-t.svg
+ - animate-elem-30-t.svg
+
+ * svg/SVGStyledTransformableElement.cpp:
+ (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::animatedLocalTransform):
+
2011-09-05 Adam Barth <[email protected]>
window.HTMLSpanElement does not exist
Modified: trunk/Source/WebCore/svg/SVGStyledTransformableElement.cpp (94557 => 94558)
--- trunk/Source/WebCore/svg/SVGStyledTransformableElement.cpp 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/Source/WebCore/svg/SVGStyledTransformableElement.cpp 2011-09-06 08:18:23 UTC (rev 94558)
@@ -65,7 +65,7 @@
AffineTransform matrix;
transform().concatenate(matrix);
if (m_supplementalTransform)
- matrix *= *m_supplementalTransform;
+ return *m_supplementalTransform * matrix;
return matrix;
}
Modified: trunk/Source/WebCore/svg/SVGTextElement.cpp (94557 => 94558)
--- trunk/Source/WebCore/svg/SVGTextElement.cpp 2011-09-06 07:55:11 UTC (rev 94557)
+++ trunk/Source/WebCore/svg/SVGTextElement.cpp 2011-09-06 08:18:23 UTC (rev 94558)
@@ -113,7 +113,7 @@
AffineTransform matrix;
transform().concatenate(matrix);
if (m_supplementalTransform)
- matrix *= *m_supplementalTransform;
+ return *m_supplementalTransform * matrix;
return matrix;
}