aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorGauriGNaik <gaurinaik.145@gmail.com>2015-10-26 11:31:28 -0400
committerJosh Matthews <josh@joshmatthews.net>2015-11-25 18:28:30 -0500
commit996e9e06b2b57cfc7549eaba71cf1abbd746ca24 (patch)
tree892d7bde46bac071356c7a195c460c931e88cd1f /components/layout/layout_task.rs
parent8efc954531d2c7491ea01b6e22c89e35c5cf434a (diff)
downloadservo-996e9e06b2b57cfc7549eaba71cf1abbd746ca24.tar.gz
servo-996e9e06b2b57cfc7549eaba71cf1abbd746ca24.zip
Defined new trait ParseErrorReporter and added error_reporter member to ParserContext
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 411611d6a0a..9aac21f7a88 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -49,6 +49,7 @@ use script::layout_interface::Animation;
use script::layout_interface::{LayoutRPC, OffsetParentResponse};
use script::layout_interface::{Msg, NewLayoutTaskInfo, Reflow, ReflowGoal, ReflowQueryType};
use script::layout_interface::{ScriptLayoutChan, ScriptReflow};
+use script::reporter::CSSErrorReporter;
use script_traits::{ConstellationControlMsg, LayoutControlMsg, OpaqueScriptLayoutChannel};
use sequential;
use serde_json;
@@ -64,6 +65,7 @@ use style::computed_values::{filter, mix_blend_mode};
use style::media_queries::{Device, MediaType};
use style::selector_matching::{Stylist, USER_OR_USER_AGENT_STYLESHEETS};
use style::stylesheets::{CSSRuleIteratorExt, Stylesheet};
+use style_traits::ParseErrorReporter;
use url::Url;
use util::geometry::MAX_RECT;
use util::ipc::OptionalIpcSender;
@@ -211,6 +213,10 @@ pub struct LayoutTask {
///
/// All the other elements of this struct are read-only.
rw_data: Arc<Mutex<LayoutTaskData>>,
+
+ /// The CSS error reporter for all CSS loaded in this layout thread
+ error_reporter: CSSErrorReporter,
+
}
impl LayoutTaskFactory for LayoutTask {
@@ -438,6 +444,7 @@ impl LayoutTask {
resolved_style_response: None,
offset_parent_response: OffsetParentResponse::empty(),
})),
+ error_reporter: CSSErrorReporter,
}
}
@@ -476,6 +483,7 @@ impl LayoutTask {
goal: goal,
running_animations: self.running_animations.clone(),
expired_animations: self.expired_animations.clone(),
+ error_reporter: self.error_reporter.clone(),
}
}
@@ -557,7 +565,6 @@ impl LayoutTask {
goal: ReflowGoal::ForDisplay,
page_clip_rect: MAX_RECT,
};
-
let mut layout_context = self.build_shared_layout_context(&*rw_data,
false,
&self.url,