Auto merge of #11804 - Ms2ger:layout-thread-crate, r=jdm

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

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11804)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-20 17:00:13 -05:00 committed by GitHub
commit a94d3ee744
10 changed files with 223 additions and 106 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",
@ -1131,7 +1132,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",
@ -1140,11 +1140,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)",
@ -1165,6 +1163,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;
@ -233,7 +233,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.
@ -267,7 +267,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);
}