aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/parallel.rs2
-rw-r--r--components/layout_thread/lib.rs2
-rw-r--r--components/servo/Cargo.lock7
-rw-r--r--components/style/Cargo.toml6
-rw-r--r--components/style/lib.rs4
-rw-r--r--components/style/parallel.rs2
-rw-r--r--components/style/workqueue.rs (renamed from components/util/workqueue.rs)6
-rw-r--r--components/util/Cargo.toml5
-rw-r--r--components/util/lib.rs3
-rw-r--r--ports/cef/Cargo.lock7
-rw-r--r--ports/geckolib/Cargo.lock7
-rw-r--r--ports/geckolib/data.rs2
12 files changed, 30 insertions, 23 deletions
diff --git a/components/layout/parallel.rs b/components/layout/parallel.rs
index ba23c0d7061..9e1009ce835 100644
--- a/components/layout/parallel.rs
+++ b/components/layout/parallel.rs
@@ -17,10 +17,10 @@ use std::sync::atomic::{AtomicIsize, Ordering};
use style::dom::UnsafeNode;
use style::parallel::run_queue_with_custom_work_data_type;
use style::parallel::{CHUNK_SIZE, WorkQueueData};
+use style::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
use traversal::AssignBSizes;
use traversal::{AssignISizes, BubbleISizes};
use util::opts;
-use util::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
pub use style::parallel::traverse_dom;
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index bcb0373ab20..fe1f82f533b 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -110,13 +110,13 @@ use style::refcell::RefCell;
use style::selector_matching::USER_OR_USER_AGENT_STYLESHEETS;
use style::servo::{Animation, LocalStyleContextCreationInfo, SharedStyleContext, Stylesheet, Stylist};
use style::stylesheets::CSSRuleIteratorExt;
+use style::workqueue::WorkQueue;
use url::Url;
use util::geometry::MAX_RECT;
use util::ipc::OptionalIpcSender;
use util::opts;
use util::thread;
use util::thread_state;
-use util::workqueue::WorkQueue;
/// The number of screens we have to traverse before we decide to generate new display lists.
const DISPLAY_PORT_THRESHOLD_SIZE_FACTOR: i32 = 4;
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 4c68a576fe3..ca5a18ce63e 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -2230,15 +2230,19 @@ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2456,14 +2460,11 @@ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
- "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index 37a4bf6bb01..a90673b9e40 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -22,6 +22,7 @@ servo = ["serde", "serde/nightly", "serde_macros", "heapsize", "heapsize_plugin"
app_units = "0.2.5"
bitflags = "0.7"
cssparser = "0.5.5"
+deque = "0.3.1"
encoding = "0.2"
euclid = "0.7.1"
fnv = "1.0"
@@ -29,9 +30,11 @@ gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true}
heapsize = {version = "0.3.0", optional = true}
heapsize_plugin = {version = "0.1.2", optional = true}
lazy_static = "0.2"
+libc = "0.2"
log = "0.3.5"
matches = "0.1"
num-traits = "0.1.32"
+rand = "0.3"
rustc-serialize = "0.3"
selectors = "0.6"
serde = {version = "0.7.11", optional = true}
@@ -43,5 +46,8 @@ time = "0.1"
url = "1.0.0"
util = {path = "../util"}
+[target.'cfg(windows)'.dependencies]
+kernel32-sys = "0.2"
+
[build-dependencies]
walkdir = "0.1"
diff --git a/components/style/lib.rs b/components/style/lib.rs
index 54510250eda..325c89fdd46 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -40,6 +40,7 @@ extern crate bitflags;
extern crate core;
#[macro_use]
extern crate cssparser;
+extern crate deque;
extern crate encoding;
extern crate euclid;
extern crate fnv;
@@ -49,12 +50,14 @@ extern crate gecko_bindings;
#[allow(unused_extern_crates)]
#[macro_use]
extern crate lazy_static;
+extern crate libc;
#[macro_use]
extern crate log;
#[allow(unused_extern_crates)]
#[macro_use]
extern crate matches;
extern crate num_traits;
+extern crate rand;
extern crate rustc_serialize;
extern crate selectors;
#[cfg(feature = "servo")] extern crate serde;
@@ -95,6 +98,7 @@ pub mod traversal;
#[allow(non_camel_case_types)]
pub mod values;
pub mod viewport;
+pub mod workqueue;
/// The CSS properties supported by the style system.
// Generated from the properties.mako.rs template by build.rs
diff --git a/components/style/parallel.rs b/components/style/parallel.rs
index d7cb95ecac2..0bc840f7492 100644
--- a/components/style/parallel.rs
+++ b/components/style/parallel.rs
@@ -12,7 +12,7 @@ use dom::{OpaqueNode, TNode, UnsafeNode};
use std::mem;
use std::sync::atomic::Ordering;
use traversal::DomTraversalContext;
-use util::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
+use workqueue::{WorkQueue, WorkUnit, WorkerProxy};
#[allow(dead_code)]
fn static_assertion(node: UnsafeNode) {
diff --git a/components/util/workqueue.rs b/components/style/workqueue.rs
index ebc85df466f..acee9faf5f8 100644
--- a/components/util/workqueue.rs
+++ b/components/style/workqueue.rs
@@ -7,6 +7,8 @@
//! Data associated with queues is simply a pair of unsigned integers. It is expected that a
//! higher-level API on top of this could allow safe fork-join parallelism.
+#![allow(unsafe_code)]
+
#[cfg(windows)]
extern crate kernel32;
@@ -16,8 +18,8 @@ use libc::usleep;
use rand::{Rng, XorShiftRng, weak_rng};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::mpsc::{Receiver, Sender, channel};
-use thread::spawn_named;
-use thread_state;
+use util::thread::spawn_named;
+use util::thread_state;
/// A unit of work.
///
diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml
index b693a0f8c5b..8f8b26bcae2 100644
--- a/components/util/Cargo.toml
+++ b/components/util/Cargo.toml
@@ -17,13 +17,11 @@ servo = ["serde", "serde_macros", "backtrace", "ipc-channel", "app_units/plugins
app_units = "0.2.5"
backtrace = {version = "0.2.1", optional = true}
bitflags = "0.7"
-deque = "0.3.1"
euclid = "0.7.1"
getopts = "0.2.11"
heapsize = "0.3.0"
ipc-channel = {git = "https://github.com/servo/ipc-channel", optional = true}
lazy_static = "0.2"
-libc = "0.2"
log = "0.3.5"
num_cpus = "0.2.2"
num-traits = "0.1.32"
@@ -35,6 +33,3 @@ url = "1.0.0"
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))'.dependencies]
xdg = "2.0"
-
-[target.'cfg(windows)'.dependencies]
-kernel32-sys = "0.2"
diff --git a/components/util/lib.rs b/components/util/lib.rs
index 7cc4983bc42..fed8c9b0178 100644
--- a/components/util/lib.rs
+++ b/components/util/lib.rs
@@ -14,13 +14,11 @@
extern crate app_units;
#[cfg(feature = "servo")] extern crate backtrace;
#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags;
-extern crate deque;
extern crate euclid;
extern crate getopts;
#[macro_use] extern crate heapsize;
#[cfg(feature = "servo")] extern crate ipc_channel;
#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static;
-extern crate libc;
#[macro_use] extern crate log;
extern crate num_cpus;
extern crate num_traits;
@@ -45,7 +43,6 @@ pub mod str;
pub mod thread;
pub mod thread_state;
pub mod tid;
-#[allow(unsafe_code)] pub mod workqueue;
#[cfg(feature = "servo")]
#[allow(unsafe_code)]
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index dc0b6af49f6..357e3853cda 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -2115,15 +2115,19 @@ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2325,14 +2329,11 @@ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
- "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock
index ddd1c911aab..c3a78c1ecca 100644
--- a/ports/geckolib/Cargo.lock
+++ b/ports/geckolib/Cargo.lock
@@ -450,16 +450,20 @@ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -562,14 +566,11 @@ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.4 (git+https://github.com/servo/ipc-channel)",
- "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/ports/geckolib/data.rs b/ports/geckolib/data.rs
index 9b2698409c9..1962243a310 100644
--- a/ports/geckolib/data.rs
+++ b/ports/geckolib/data.rs
@@ -14,9 +14,9 @@ use std::sync::{Arc, RwLock};
use style::dom::OpaqueNode;
use style::media_queries::{Device, MediaType};
use style::parallel::WorkQueueData;
+use style::workqueue::WorkQueue;
use util::geometry::ViewportPx;
use util::thread_state;
-use util::workqueue::WorkQueue;
pub struct PerDocumentStyleData {
/// Rule processor.