Commit d14d5ff7 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2011-06-07 Felician Marton <marton.felician.zoltan@stud.u-szeged.hu>

        Reviewed by Nikolas Zimmermann.

        SVG animation beginElement() does not restart the animation after endElement().
        https://bugs.webkit.org/show_bug.cgi?id=43452

        Added test for animation beginElement. It should restart the animation even if the animation is stopped by endElement() previously.

        * svg/animations/animate-endElement-beginElement-expected.txt: Added.
        * svg/animations/animate-endElement-beginElement.html: Added.
        * svg/animations/script-tests/animate-endElement-beginElement.js: Added.
2011-06-07  Felician Marton  <marton.felician.zoltan@stud.u-szeged.hu>

        Reviewed by Nikolas Zimmermann.

        SVG animation beginElement() does not restart the animation after endElement().
        https://bugs.webkit.org/show_bug.cgi?id=43452

        Test: svg/animations/animate-endElement-beginElement.html

        Calling beginElement() after calling endElement() previously does not restarted the animation when animation
        element's end attribute doesn't contains a bigger value than the current animation time.

        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::findInstanceTime):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ae3f3e10
2011-06-07 Felician Marton <marton.felician.zoltan@stud.u-szeged.hu>
Reviewed by Nikolas Zimmermann.
SVG animation beginElement() does not restart the animation after endElement().
https://bugs.webkit.org/show_bug.cgi?id=43452
Added test for animation beginElement. It should restart the animation even if the animation is stopped by endElement() previously.
* svg/animations/animate-endElement-beginElement-expected.txt: Added.
* svg/animations/animate-endElement-beginElement.html: Added.
* svg/animations/script-tests/animate-endElement-beginElement.js: Added.
2011-06-07 MORITA Hajime <morrita@google.com>
Unreviewed Skipped entry addition following r88225.
......
SVG 1.1 dynamic animation tests
Tests animation beginElement command's restarting capability after endElement.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS rect.x.animVal.value is 50
PASS successfullyParsed is true
TEST COMPLETE
<!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>SVG 1.1 dynamic animation tests</h1>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/animate-endElement-beginElement.js"></script>
</body>
</html>
description("Tests animation beginElement command's restarting capability after endElement.");
createSVGTestCase();
// Setup test document
var rect = createSVGElement("rect");
rect.setAttribute("id", "rect");
rect.setAttribute("width", "50px");
rect.setAttribute("height", "50px");
rect.setAttribute("fill", "green");
var animateX = createSVGElement("animate");
animateX.setAttribute("id", "animateX");
animateX.setAttribute("attributeName", "x");
animateX.setAttribute("from", "0");
animateX.setAttribute("to", "100");
animateX.setAttribute("dur", "2s");
animateX.setAttribute("begin", "indefinite");
animateX.setAttribute("fill", "freeze");
rect.appendChild(animateX);
rootSVGElement.appendChild(rect);
// Setup animation test
function sample1() {
// Check half-time conditions
shouldBe("rect.x.animVal.value", "50");
}
function startRestart() {
animateX.beginElement();
setTimeout(end,0);
}
function end() {
animateX.endElement();
setTimeout(begin,0);
}
function begin() {
animateX.beginElement();
const expectedValues = [
// [animationId, time, elementId, sampleCallback]
["animateX", 1.0, "rect", sample1]
];
runAnimationTest(expectedValues);
}
function executeTest() {
//BeginElement-endElement-beginElement musn't execute in zero time, because in the current
//implemetation of the svg animation will loose the commands order!
startRestart();
}
// Begin test async
rect.setAttribute("onclick", "executeTest()");
window.setTimeout("triggerUpdate(50, 50)", 0);
var successfullyParsed = true;
2011-06-07 Felician Marton <marton.felician.zoltan@stud.u-szeged.hu>
Reviewed by Nikolas Zimmermann.
SVG animation beginElement() does not restart the animation after endElement().
https://bugs.webkit.org/show_bug.cgi?id=43452
Test: svg/animations/animate-endElement-beginElement.html
Calling beginElement() after calling endElement() previously does not restarted the animation when animation
element's end attribute doesn't contains a bigger value than the current animation time.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::findInstanceTime):
2011-06-07 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Kent Tamura.
......
......@@ -634,7 +634,7 @@ SMILTime SVGSMILElement::findInstanceTime(BeginOrEnd beginOrEnd, SMILTime minimu
} else if (time > minimumTime)
return time;
}
return SMILTime::unresolved();
return beginOrEnd == Begin ? SMILTime::unresolved() : SMILTime::indefinite();
}
SMILTime SVGSMILElement::repeatingDuration() const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment