Introduce a layout_thread crate; drop the dependency of layout on script.

This commit is contained in:
Ms2ger 2016-06-17 13:40:50 +01:00
parent 7414edab05
commit 6528bee84f
8 changed files with 169 additions and 52 deletions

View file

@ -21,6 +21,7 @@ dependencies = [
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout 0.0.1",
"layout_tests 0.0.1",
"layout_thread 0.0.1",
"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)",
"msg 0.0.1",
@ -1148,7 +1149,6 @@ dependencies = [
"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)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout_traits 0.0.1",
"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)",
"msg 0.0.1",
@ -1157,11 +1157,9 @@ dependencies = [
"profile_traits 0.0.1",
"range 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"script 0.0.1",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
"selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1182,6 +1180,37 @@ dependencies = [
"layout 0.0.1",
]
[[package]]
name = "layout_thread"
version = "0.0.1"
dependencies = [
"app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.5 (git+https://github.com/servo/rust-azure)",
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gfx_traits 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)",
"ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)",
"layout 0.0.1",
"layout_traits 0.0.1",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"net_traits 0.0.1",
"plugins 0.0.1",
"profile_traits 0.0.1",
"script 0.0.1",
"script_layout_interface 0.0.1",
"script_traits 0.0.1",
"serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
]
[[package]]
name = "layout_traits"
version = "0.0.1"

View file

@ -57,6 +57,7 @@ util = {path = "../util"}
script = {path = "../script"}
script_traits = {path = "../script_traits"}
layout = {path = "../layout"}
layout_thread = {path = "../layout_thread"}
gfx = {path = "../gfx"}
style = {path = "../style"}
canvas = {path = "../canvas"}

View file

@ -31,7 +31,7 @@ pub extern crate devtools_traits;
pub extern crate euclid;
pub extern crate gfx;
pub extern crate ipc_channel;
pub extern crate layout;
pub extern crate layout_thread;
pub extern crate msg;
pub extern crate net;
pub extern crate net_traits;
@ -231,7 +231,7 @@ fn create_constellation(opts: opts::Opts,
};
let constellation_chan =
Constellation::<script_layout_interface::message::Msg,
layout::layout_thread::LayoutThread,
layout_thread::LayoutThread,
script::script_thread::ScriptThread>::start(initial_state);
// Send the URL command to the constellation.
@ -265,7 +265,7 @@ pub fn run_content_process(token: String) {
script::init();
unprivileged_content.start_all::<script_layout_interface::message::Msg,
layout::layout_thread::LayoutThread,
layout_thread::LayoutThread,
script::script_thread::ScriptThread>(true);
}