Diff
Modified: trunk/LayoutTests/ChangeLog (154048 => 154049)
--- trunk/LayoutTests/ChangeLog 2013-08-14 14:49:21 UTC (rev 154048)
+++ trunk/LayoutTests/ChangeLog 2013-08-14 15:43:19 UTC (rev 154049)
@@ -1,3 +1,26 @@
+2013-08-14 Rob Buis <[email protected]>
+
+ ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
+ https://bugs.webkit.org/show_bug.cgi?id=119748
+
+ Reviewed by Dirk Schulze.
+
+ Test that using animateTransform with attributeType="CSS" will cause no animateTransform animation, and
+ attributeType="auto" will act as "XML".
+
+ * svg/animations/animateTransform-translate-attributetype-auto-expected.txt: Added.
+ * svg/animations/animateTransform-translate-attributetype-auto.html: Added.
+ * svg/animations/animateTransform-translate-invalid-attributetype-expected.txt: Added.
+ * svg/animations/animateTransform-translate-invalid-attributetype.html: Added.
+ * svg/animations/script-tests/animateTransform-translate-attributetype-auto.js: Added.
+ (sample1):
+ (sample2):
+ (sample3):
+ (executeTest):
+ * svg/animations/script-tests/animateTransform-translate-invalid-attributetype.js: Added.
+ (sample):
+ (executeTest):
+
2013-08-14 Gabor Abraham <[email protected]>
[Qt] Unreviewd gardening. Skipping failing tests on x86.
Added: trunk/LayoutTests/svg/animations/animateTransform-translate-attributetype-auto-expected.txt (0 => 154049)
--- trunk/LayoutTests/svg/animations/animateTransform-translate-attributetype-auto-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/animations/animateTransform-translate-attributetype-auto-expected.txt 2013-08-14 15:43:19 UTC (rev 154049)
@@ -0,0 +1,21 @@
+SVG 1.1 dynamic animation tests
+
+Tests that an animateTransform with attributeType "auto" acts as "XML". Should result in a translated 100x100 rect and only PASS messages.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS rootSVGElement.getTransformToElement(rect).e is -100
+PASS rootSVGElement.getTransformToElement(rect).f is -100
+PASS rootSVGElement.getTransformToElement(rect).e is -200
+PASS rootSVGElement.getTransformToElement(rect).f is -200
+PASS rootSVGElement.getTransformToElement(rect).e is -200
+PASS rootSVGElement.getTransformToElement(rect).f is -200
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/svg/animations/animateTransform-translate-attributetype-auto.html (0 => 154049)
--- trunk/LayoutTests/svg/animations/animateTransform-translate-attributetype-auto.html (rev 0)
+++ trunk/LayoutTests/svg/animations/animateTransform-translate-attributetype-auto.html 2013-08-14 15:43:19 UTC (rev 154049)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body _onload_="runSMILTest()">
+<h1>SVG 1.1 dynamic animation tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/svg/animations/animateTransform-translate-invalid-attributetype-expected.txt (0 => 154049)
--- trunk/LayoutTests/svg/animations/animateTransform-translate-invalid-attributetype-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/animations/animateTransform-translate-invalid-attributetype-expected.txt 2013-08-14 15:43:19 UTC (rev 154049)
@@ -0,0 +1,21 @@
+SVG 1.1 dynamic animation tests
+
+Tests that an animateTransform with invalid attributeType does not animate. Should result in a 100x100 rect and only PASS messages.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS rootSVGElement.getTransformToElement(rect).e is 0
+PASS rootSVGElement.getTransformToElement(rect).f is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/svg/animations/animateTransform-translate-invalid-attributetype.html (0 => 154049)
--- trunk/LayoutTests/svg/animations/animateTransform-translate-invalid-attributetype.html (rev 0)
+++ trunk/LayoutTests/svg/animations/animateTransform-translate-invalid-attributetype.html 2013-08-14 15:43:19 UTC (rev 154049)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body _onload_="runSMILTest()">
+<h1>SVG 1.1 dynamic animation tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src=""
+</body>
+</html>
Added: trunk/LayoutTests/svg/animations/script-tests/animateTransform-translate-attributetype-auto.js (0 => 154049)
--- trunk/LayoutTests/svg/animations/script-tests/animateTransform-translate-attributetype-auto.js (rev 0)
+++ trunk/LayoutTests/svg/animations/script-tests/animateTransform-translate-attributetype-auto.js 2013-08-14 15:43:19 UTC (rev 154049)
@@ -0,0 +1,51 @@
+description('Tests that an animateTransform with attributeType "auto" acts as "XML". Should result in a translated 100x100 rect and only PASS messages.');
+createSVGTestCase();
+
+// Setup test document
+
+var rect = createSVGElement("rect");
+rect.setAttribute("id", "rect");
+rect.setAttribute("width", "200");
+rect.setAttribute("height", "200");
+rect.setAttribute("fill", "green");
+rect.setAttribute("onclick", "executeTest()");
+
+var animate = createSVGElement("animateTransform");
+animate.setAttribute("id", "animation");
+animate.setAttribute("attributeName", "transform");
+animate.setAttribute("attributeType", "auto");
+animate.setAttribute("type", "translate");
+animate.setAttribute("from", "0, 0");
+animate.setAttribute("to", "200, 200");
+animate.setAttribute("begin", "rect.click");
+animate.setAttribute("dur", "4s");
+animate.setAttribute("fill", "freeze");
+rect.appendChild(animate);
+
+rootSVGElement.appendChild(rect);
+
+// Setup animation test
+function sample1() {
+ expectTranslationMatrix("rootSVGElement.getTransformToElement(rect)", "0", "0");
+}
+function sample2() {
+ expectTranslationMatrix("rootSVGElement.getTransformToElement(rect)", "-100", "-100");
+}
+function sample3() {
+ expectTranslationMatrix("rootSVGElement.getTransformToElement(rect)", "-200", "-200");
+}
+
+function executeTest() {
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["animation", 0.0, sample1],
+ ["animation", 0.001, sample1],
+ ["animation", 2.0, sample2],
+ ["animation", 3.999, sample3],
+ ["animation", 4.001, sample3]
+ ];
+
+ runAnimationTest(expectedValues);
+}
+
+var successfullyParsed = true;
Added: trunk/LayoutTests/svg/animations/script-tests/animateTransform-translate-invalid-attributetype.js (0 => 154049)
--- trunk/LayoutTests/svg/animations/script-tests/animateTransform-translate-invalid-attributetype.js (rev 0)
+++ trunk/LayoutTests/svg/animations/script-tests/animateTransform-translate-invalid-attributetype.js 2013-08-14 15:43:19 UTC (rev 154049)
@@ -0,0 +1,45 @@
+description("Tests that an animateTransform with invalid attributeType does not animate. Should result in a 100x100 rect and only PASS messages.");
+createSVGTestCase();
+
+// Setup test document
+
+var rect = createSVGElement("rect");
+rect.setAttribute("id", "rect");
+rect.setAttribute("width", "200");
+rect.setAttribute("height", "200");
+rect.setAttribute("fill", "green");
+rect.setAttribute("onclick", "executeTest()");
+
+var animate = createSVGElement("animateTransform");
+animate.setAttribute("id", "animation");
+animate.setAttribute("attributeName", "transform");
+animate.setAttribute("attributeType", "CSS");
+animate.setAttribute("type", "translate");
+animate.setAttribute("from", "0, 0");
+animate.setAttribute("to", "200, 200");
+animate.setAttribute("begin", "rect.click");
+animate.setAttribute("dur", "4s");
+animate.setAttribute("fill", "freeze");
+rect.appendChild(animate);
+
+rootSVGElement.appendChild(rect);
+
+// Setup animation test
+function sample() {
+ expectTranslationMatrix("rootSVGElement.getTransformToElement(rect)", "0", "0");
+}
+
+function executeTest() {
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["animation", 0.0, sample],
+ ["animation", 0.001, sample],
+ ["animation", 2.0, sample],
+ ["animation", 3.999, sample],
+ ["animation", 4.001, sample]
+ ];
+
+ runAnimationTest(expectedValues);
+}
+
+var successfullyParsed = true;
Modified: trunk/Source/WebCore/ChangeLog (154048 => 154049)
--- trunk/Source/WebCore/ChangeLog 2013-08-14 14:49:21 UTC (rev 154048)
+++ trunk/Source/WebCore/ChangeLog 2013-08-14 15:43:19 UTC (rev 154049)
@@ -1,3 +1,18 @@
+2013-08-14 Rob Buis <[email protected]>
+
+ ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
+ https://bugs.webkit.org/show_bug.cgi?id=119748
+
+ Reviewed by Dirk Schulze.
+
+ Avoid animation when attributeType="CSS" is used on an animateTransform.
+
+ Tests: svg/animations/animateTransform-translate-attributetype-auto.html
+ svg/animations/animateTransform-translate-invalid-attributetype.html
+
+ * svg/SVGAnimateTransformElement.cpp:
+ (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
+
2013-08-14 Antti Koivisto <[email protected]>
Try to fix Qt build.
Modified: trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp (154048 => 154049)
--- trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp 2013-08-14 14:49:21 UTC (rev 154048)
+++ trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp 2013-08-14 15:43:19 UTC (rev 154049)
@@ -49,6 +49,9 @@
if (!targetElement)
return false;
+ if (attributeType() == AttributeTypeCSS)
+ return false;
+
return m_animatedPropertyType == AnimatedTransformList;
}