aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/Cargo.toml4
-rw-r--r--components/layout/animation.rs8
-rw-r--r--components/layout/lib.rs2
-rw-r--r--components/servo/Cargo.lock10
-rw-r--r--ports/cef/Cargo.lock10
-rw-r--r--ports/gonk/Cargo.lock10
6 files changed, 9 insertions, 35 deletions
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 0a54158144c..87433b41cd6 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -53,9 +53,6 @@ path = "../profile_traits"
[dependencies.util]
path = "../util"
-[dependencies.clock_ticks]
-git = "https://github.com/tomaka/clock_ticks"
-
[dependencies.ipc-channel]
git = "https://github.com/servo/ipc-channel"
@@ -75,6 +72,7 @@ euclid = {version = "0.4", features = ["plugins"]}
serde = "0.6"
serde_macros = "0.6"
serde_json = "0.5"
+time = "0.1"
unicode-bidi = "0.2"
unicode-script = { version = "0.1", features = ["harfbuzz"] }
url = "0.5"
diff --git a/components/layout/animation.rs b/components/layout/animation.rs
index b214910c4f6..fc8c9aa7002 100644
--- a/components/layout/animation.rs
+++ b/components/layout/animation.rs
@@ -4,7 +4,6 @@
//! CSS transitions and animations.
-use clock_ticks;
use flow::{self, Flow};
use gfx::display_list::OpaqueNode;
use incremental::{self, RestyleDamage};
@@ -17,6 +16,7 @@ use std::sync::mpsc::{Sender, Receiver};
use std::sync::{Arc, Mutex};
use style::animation::{GetMod, PropertyAnimation};
use style::properties::ComputedValues;
+use time;
/// Inserts transitions into the queue of running animations as applicable for the given style
/// difference. This is called from the layout worker threads. Returns true if any animations were
@@ -35,7 +35,7 @@ pub fn start_transitions_if_applicable(new_animations_sender: &Mutex<Sender<Anim
property_animation.update(new_style, 0.0);
// Kick off the animation.
- let now = clock_ticks::precise_time_s();
+ let now = time::precise_time_s();
let animation_style = new_style.get_animation();
let start_time =
now + (animation_style.transition_delay.0.get_mod(i).seconds() as f64);
@@ -73,7 +73,7 @@ pub fn update_animation_state(constellation_chan: &ConstellationChan<Constellati
}
// Expire old running animations.
- let now = clock_ticks::precise_time_s();
+ let now = time::precise_time_s();
let mut keys_to_remove = Vec::new();
for (key, running_animations) in running_animations.iter_mut() {
let mut animations_still_running = vec![];
@@ -145,7 +145,7 @@ pub fn recalc_style_for_animations(flow: &mut Flow,
pub fn update_style_for_animation(animation: &Animation,
style: &mut Arc<ComputedValues>,
damage: Option<&mut RestyleDamage>) {
- let now = clock_ticks::precise_time_s();
+ let now = time::precise_time_s();
let mut progress = (now - animation.start_time) / animation.duration();
if progress > 1.0 {
progress = 1.0
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index c4aec9bdd76..8185f771308 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -23,7 +23,6 @@ extern crate azure;
#[macro_use]
extern crate bitflags;
extern crate canvas_traits;
-extern crate clock_ticks;
extern crate cssparser;
extern crate encoding;
extern crate euclid;
@@ -52,6 +51,7 @@ extern crate smallvec;
#[macro_use(atom, ns)] extern crate string_cache;
extern crate style;
extern crate style_traits;
+extern crate time;
extern crate unicode_bidi;
extern crate unicode_script;
extern crate url;
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 5f53920b288..51d117f6198 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -228,14 +228,6 @@ dependencies = [
]
[[package]]
-name = "clock_ticks"
-version = "0.1.0"
-source = "git+https://github.com/tomaka/clock_ticks#d4b7f5d53d400ae47f20487ebbbf071c351ea40e"
-dependencies = [
- "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "cocoa"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -949,7 +941,6 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "clock_ticks 0.1.0 (git+https://github.com/tomaka/clock_ticks)",
"cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -975,6 +966,7 @@ dependencies = [
"string_cache 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
+ "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index 96292317cd4..78cfdebe04c 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -217,14 +217,6 @@ dependencies = [
]
[[package]]
-name = "clock_ticks"
-version = "0.1.0"
-source = "git+https://github.com/tomaka/clock_ticks#d4b7f5d53d400ae47f20487ebbbf071c351ea40e"
-dependencies = [
- "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "cocoa"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -909,7 +901,6 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "clock_ticks 0.1.0 (git+https://github.com/tomaka/clock_ticks)",
"cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -935,6 +926,7 @@ dependencies = [
"string_cache 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
+ "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock
index f3f7829ca9c..dbcefc3705e 100644
--- a/ports/gonk/Cargo.lock
+++ b/ports/gonk/Cargo.lock
@@ -208,14 +208,6 @@ dependencies = [
]
[[package]]
-name = "clock_ticks"
-version = "0.1.0"
-source = "git+https://github.com/tomaka/clock_ticks#d4b7f5d53d400ae47f20487ebbbf071c351ea40e"
-dependencies = [
- "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "cocoa"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -885,7 +877,6 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "clock_ticks 0.1.0 (git+https://github.com/tomaka/clock_ticks)",
"cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -911,6 +902,7 @@ dependencies = [
"string_cache 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
+ "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",