Commit aa2b88d6 authored by fs@opera.com's avatar fs@opera.com

Frozen animations still contribute to the sandwich/animation stack

With (for instance) a to-animation, the frozen element will for instance
provide the 'underlying value' to any following element.

BUG=374793

Review URL: https://codereview.chromium.org/316013003

git-svn-id: svn://svn.chromium.org/blink/trunk@175530 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e687e732
PASS rectWidth is > 100
PASS 200 is >= rectWidth
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<svg width="200" height="200" style="display: block">
<rect width="0" height="100" fill="green">
<animate attributeName="width" begin="0s; 1000s" to="200" dur="25ms" fill="freeze"/>
<animate attributeName="width" begin="50ms" to="100" dur="500s" onbegin="runTest()"/>
</rect>
</svg>
<script>
window.jsTestIsAsync = true;
var rectWidth;
function runTest() {
rect = document.querySelector('rect');
rectWidth = rect.width.animVal.valueInSpecifiedUnits;
// Width expected to be 100 < x <= 200.
shouldBeGreaterThan("rectWidth", "100");
shouldBeGreaterThanOrEqual("200", "rectWidth");
finishJSTest();
}
</script>
...@@ -1154,13 +1154,15 @@ bool SVGSMILElement::progress(SMILTime elapsed, SVGSMILElement* resultElement, b ...@@ -1154,13 +1154,15 @@ bool SVGSMILElement::progress(SMILTime elapsed, SVGSMILElement* resultElement, b
if (elapsed < m_interval.begin) { if (elapsed < m_interval.begin) {
ASSERT(m_activeState != Active); ASSERT(m_activeState != Active);
if (m_activeState == Frozen) { bool isFrozen = (m_activeState == Frozen);
if (isFrozen) {
if (this == resultElement) if (this == resultElement)
resetAnimatedType(); resetAnimatedType();
updateAnimation(m_lastPercent, m_lastRepeat, resultElement); updateAnimation(m_lastPercent, m_lastRepeat, resultElement);
} }
m_nextProgressTime = m_interval.begin; m_nextProgressTime = m_interval.begin;
return false; // If the animation is frozen, it's still contributing.
return isFrozen;
} }
m_previousIntervalBegin = m_interval.begin; m_previousIntervalBegin = m_interval.begin;
......
Markdown is supported
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