Commit 9d6320fa authored by fs@opera.com's avatar fs@opera.com

Use monotonic time for SVGImage's serviceScriptedAnimations()

Breakage from r168748 which used the wrong time-source.

BUG=231576

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169645 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8b1c7a80
<!DOCTYPE html>
<div style="width: 100px; height: 100px; background-color: green"></div>
<!DOCTYPE html>
<body>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
var img = new Image();
img.onload = function() {
setTimeout(function() {
if (window.testRunner)
testRunner.notifyDone();
}, 100);
}
img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><rect width='100' height='100' fill='red'><animate attributeName='fill' from='green' to='green' dur='10s'/></rect></svg>";
document.body.appendChild(img);
</script>
...@@ -83,7 +83,7 @@ void SVGImageChromeClient::animationTimerFired(Timer<SVGImageChromeClient>*) ...@@ -83,7 +83,7 @@ void SVGImageChromeClient::animationTimerFired(Timer<SVGImageChromeClient>*)
// In principle, we should call requestAnimationFrame callbacks here, but // In principle, we should call requestAnimationFrame callbacks here, but
// we know there aren't any because script is forbidden inside SVGImages. // we know there aren't any because script is forbidden inside SVGImages.
if (m_image) { if (m_image) {
m_image->frameView()->page()->animator().serviceScriptedAnimations(currentTime()); m_image->frameView()->page()->animator().serviceScriptedAnimations(monotonicallyIncreasingTime());
m_image->frameView()->updateLayoutAndStyleForPainting(); m_image->frameView()->updateLayoutAndStyleForPainting();
} }
} }
......
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