Web Animations: Don't suppress graphics layer properties when cancelling animations

CompositedDeprecatedPaintLayerMapping contains logic to suppress
redundant changes to layers while composited animations are running. The
order of operations (composted animations are updated after layers)
meant that a compositing update that resulted in the cancelling of compositor
animations would still suppress these values.

BUG=501297

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201214 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f51fc6c7
<!DOCTYPE html>
<style>
#target {
width: 50px;
height: 50px;
background-color: green;
transform: translateX(500px);
}
</style>
<div id=target></div>
<!DOCTYPE html>
<style>
#target {
width: 50px;
height: 50px;
background-color: green;
}
</style>
<div id=target></div>
<script>
testRunner.waitUntilDone();
var anim;
requestAnimationFrame(function() {
anim = target.animate([
{transform: 'translateX(0px)'},
{transform: 'translateX(1000px)'},
], 1000);
setTimeout(function() {
eventSender.mouseMoveTo(1, 1);
eventSender.mouseMoveTo(1, 2);
anim.pause();
anim.currentTime = 500;
testRunner.notifyDone();
});
});
</script>
......@@ -73,8 +73,9 @@ AnimationStack::AnimationStack()
bool AnimationStack::hasActiveAnimationsOnCompositor(CSSPropertyID property) const
{
for (const auto& effect : m_effects) {
if (effect->effect() && effect->effect()->hasActiveAnimationsOnCompositor(property))
for (const auto& sampledEffect : m_effects) {
// TODO(dstockwell): move the playing check into AnimationEffect and expose both hasAnimations and hasActiveAnimations
if (sampledEffect->effect() && sampledEffect->effect()->animation()->playing() && sampledEffect->effect()->hasActiveAnimationsOnCompositor(property))
return true;
}
return false;
......
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