style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations.

This commit is contained in:
Emilio Cobos Álvarez 2016-07-09 22:43:52 -07:00
parent 2e68821014
commit 0b67b218d0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
20 changed files with 178 additions and 26 deletions

1
ports/cef/Cargo.lock generated
View file

@ -1074,7 +1074,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() {