Auto merge of #12392 - emilio:test-animations, r=SimonSapin

style: Add support to test animations programatically.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12120

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @SimonSapin for the style changes, @Ms2ger or @jdm for the dom and test 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/12392)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-20 13:38:31 -05:00 committed by GitHub
commit 14aeccc33a
22 changed files with 216 additions and 36 deletions

1
ports/cef/Cargo.lock generated
View file

@ -1045,7 +1045,6 @@ dependencies = [
"string_cache 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -31,6 +31,7 @@ use style::properties::{ComputedValues, PropertyDeclarationBlock, parse_one_decl
use style::selector_impl::{SelectorImplExt, PseudoElementCascadeType};
use style::sequential;
use style::stylesheets::{Stylesheet, Origin};
use style::timer::Timer;
use traversal::RecalcStyleOnly;
use url::Url;
use wrapper::{DUMMY_BASE_URL, GeckoDocument, GeckoElement, GeckoNode, NonOpaqueStyleData};
@ -106,6 +107,7 @@ fn restyle_subtree(node: GeckoNode, raw_data: *mut RawServoStyleSet) {
expired_animations: per_doc_data.expired_animations.clone(),
error_reporter: Box::new(StdoutErrorReporter),
local_context_creation_data: Mutex::new(local_context_data),
timer: Timer::new(),
};
if node.is_dirty() || node.has_dirty_descendants() {