Stop ticking animations on non-dirty nodes during traversal.

This commit is contained in:
Bobby Holley 2016-10-20 09:47:18 -07:00
parent 99ad3678fa
commit b493565cc1
3 changed files with 5 additions and 12 deletions

View file

@ -1536,6 +1536,9 @@ impl ScriptThread {
let node = unsafe { node.get_jsmanaged().get_for_script() };
let window = window_from_node(node);
// Not quite the right thing - see #13865.
node.dirty(NodeDamage::NodeStyleDamaged);
if let Some(el) = node.downcast::<Element>() {
if &*window.GetComputedStyle(el, None).Display() == "none" {
return;