diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index 22f9f0c802f..a65b1452a09 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -47,8 +47,8 @@ use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_re use query::{process_node_geometry_request, process_node_layer_id_request, process_node_scroll_area_request}; use query::{process_node_overflow_request, process_resolved_style_request, process_margin_style_query}; use script::layout_wrapper::ServoLayoutNode; -use script::reporter::CSSErrorReporter; use script_layout_interface::message::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType, ScriptReflow}; +use script_layout_interface::reporter::CSSErrorReporter; use script_layout_interface::restyle_damage::{REPAINT, STORE_OVERFLOW, REFLOW_OUT_OF_FLOW, REFLOW}; use script_layout_interface::rpc::{LayoutRPC, MarginStyleResponse, NodeOverflowResponse, OffsetParentResponse}; use script_layout_interface::wrapper_traits::LayoutNode; diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 4abfc8fd58d..cd4a0f5d3ca 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -67,6 +67,7 @@ use offscreen_gl_context::GLLimits; use profile_traits::mem::ProfilerChan as MemProfilerChan; use profile_traits::time::ProfilerChan as TimeProfilerChan; use script_layout_interface::OpaqueStyleAndLayoutData; +use script_layout_interface::reporter::CSSErrorReporter; use script_layout_interface::rpc::LayoutRPC; use script_runtime::ScriptChan; use script_traits::{TimerEventId, TimerSource, TouchpadPressurePhase, UntrustedNodeAddress}; @@ -330,6 +331,7 @@ no_jsmanaged_fields!(ResourceThreads); no_jsmanaged_fields!(SystemTime); no_jsmanaged_fields!(SelectedFileId); no_jsmanaged_fields!(OpaqueStyleAndLayoutData); +no_jsmanaged_fields!(CSSErrorReporter); impl JSTraceable for Box { #[inline] diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index eab2e31c907..58fe8b6ad40 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -55,10 +55,10 @@ use open; use profile_traits::mem; use profile_traits::time::{ProfilerCategory, TimerMetadata, TimerMetadataFrameType}; use profile_traits::time::{ProfilerChan, TimerMetadataReflowType, profile}; -use reporter::CSSErrorReporter; use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64}; use script_layout_interface::TrustedNodeAddress; use script_layout_interface::message::{Msg, Reflow, ReflowQueryType, ScriptReflow}; +use script_layout_interface::reporter::CSSErrorReporter; use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC}; use script_layout_interface::rpc::{MarginStyleResponse, ResolvedStyleResponse}; use script_runtime::{ScriptChan, ScriptPort}; diff --git a/components/script/lib.rs b/components/script/lib.rs index 33467a5dd34..3fe7cb83113 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -99,7 +99,6 @@ mod mem; mod network_listener; pub mod origin; pub mod parse; -pub mod reporter; pub mod script_runtime; #[allow(unsafe_code)] pub mod script_thread; diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index 226df50f386..287c72ee2c0 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -12,12 +12,14 @@ path = "lib.rs" app_units = {version = "0.2.3", features = ["plugins"]} bitflags = "0.7" canvas_traits = {path = "../canvas_traits"} +cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} euclid = {version = "0.6.4", features = ["plugins"]} gfx_traits = {path = "../gfx_traits"} heapsize = "0.3.0" heapsize_plugin = "0.1.2" ipc-channel = {git = "https://github.com/servo/ipc-channel"} libc = "0.2" +log = "0.3.5" msg = {path = "../msg"} net_traits = {path = "../net_traits"} profile_traits = {path = "../profile_traits"} diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs index 929730f3909..c2e06e3dcf7 100644 --- a/components/script_layout_interface/lib.rs +++ b/components/script_layout_interface/lib.rs @@ -7,6 +7,7 @@ //! to depend on script. #![deny(unsafe_code)] +#![feature(box_syntax)] #![feature(custom_attribute)] #![feature(custom_derive)] #![feature(nonzero)] @@ -20,11 +21,14 @@ extern crate app_units; extern crate bitflags; extern crate canvas_traits; extern crate core; +extern crate cssparser; extern crate euclid; extern crate gfx_traits; extern crate heapsize; extern crate ipc_channel; extern crate libc; +#[macro_use] +extern crate log; extern crate msg; extern crate net_traits; extern crate profile_traits; @@ -38,6 +42,7 @@ extern crate url; extern crate util; pub mod message; +pub mod reporter; pub mod restyle_damage; pub mod rpc; pub mod wrapper_traits; diff --git a/components/script/reporter.rs b/components/script_layout_interface/reporter.rs similarity index 98% rename from components/script/reporter.rs rename to components/script_layout_interface/reporter.rs index 39b9e81d333..4561f2d63ca 100644 --- a/components/script/reporter.rs +++ b/components/script_layout_interface/reporter.rs @@ -10,7 +10,7 @@ use script_traits::ConstellationControlMsg; use std::sync::{Mutex, Arc}; use style::error_reporting::ParseErrorReporter; -#[derive(JSTraceable, HeapSizeOf)] +#[derive(HeapSizeOf)] pub struct CSSErrorReporter { pub pipelineid: PipelineId, // Arc+Mutex combo is necessary to make this struct Sync, diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index a495d668266..8b331211227 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -1935,12 +1935,14 @@ dependencies = [ "app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", + "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "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", "net_traits 0.0.1", "plugins 0.0.1", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 62d2223caf4..0c8cfa3ec88 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -1792,12 +1792,14 @@ dependencies = [ "app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "canvas_traits 0.0.1", + "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "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", "net_traits 0.0.1", "plugins 0.0.1",