Auto merge of #12623 - notriddle:master, r=emilio

Complete animations whether or not cascade needs done

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12554 (github issue number if applicable).
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12623)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-28 14:54:36 -05:00 committed by GitHub
commit 27d8fb3807
5 changed files with 77 additions and 19 deletions

View file

@ -4,6 +4,7 @@
//! Traversing the DOM tree; the bloom filter.
use animation;
use context::{SharedStyleContext, StyleContext};
use dom::{OpaqueNode, TElement, TNode, TRestyleDamage, UnsafeNode};
use matching::{ApplicableDeclarations, ElementMatchMethods, MatchMethods, StyleSharingResult};
@ -11,6 +12,7 @@ use selector_impl::SelectorImplExt;
use selectors::Element;
use selectors::bloom::BloomFilter;
use std::cell::RefCell;
use std::sync::Arc;
use tid::tid;
use util::opts;
use values::HasViewportPercentage;
@ -256,6 +258,13 @@ pub fn recalc_style_at<'a, N, C>(context: &'a C,
node.set_restyle_damage(damage);
}
}
} else {
// Finish any expired transitions.
animation::complete_expired_transitions(
node.opaque(),
node.mutate_data().unwrap().style.as_mut().unwrap(),
context.shared_context()
);
}
let unsafe_layout_node = node.to_unsafe();