aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r--components/layout/layout_thread.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs
index fbc1cd26daf..e1e163acb39 100644
--- a/components/layout/layout_thread.rs
+++ b/components/layout/layout_thread.rs
@@ -42,9 +42,10 @@ use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
use profile_traits::time::{self, TimerMetadata, profile};
use query::{LayoutRPCImpl, process_content_box_request, process_content_boxes_request};
-use query::{process_node_geometry_request, process_offset_parent_query, process_resolved_style_request};
+use query::{process_node_geometry_request, process_offset_parent_query};
+use query::{process_resolved_style_request, process_margin_style_query};
use script::dom::node::OpaqueStyleAndLayoutData;
-use script::layout_interface::{LayoutRPC, OffsetParentResponse};
+use script::layout_interface::{LayoutRPC, OffsetParentResponse, MarginStyleResponse};
use script::layout_interface::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType};
use script::layout_interface::{ScriptLayoutChan, ScriptReflow};
use script::reporter::CSSErrorReporter;
@@ -117,6 +118,9 @@ pub struct LayoutThreadData {
/// A queued response for the offset parent/rect of a node.
pub offset_parent_response: OffsetParentResponse,
+
+ /// A queued response for the offset parent/rect of a node.
+ pub margin_style_response: MarginStyleResponse,
}
/// Information needed by the layout thread.
@@ -455,6 +459,7 @@ impl LayoutThread {
client_rect_response: Rect::zero(),
resolved_style_response: None,
offset_parent_response: OffsetParentResponse::empty(),
+ margin_style_response: MarginStyleResponse::empty(),
})),
error_reporter: CSSErrorReporter {
pipelineid: id,
@@ -986,6 +991,9 @@ impl LayoutThread {
ReflowQueryType::OffsetParentQuery(_) => {
rw_data.offset_parent_response = OffsetParentResponse::empty();
},
+ ReflowQueryType::MarginStyleQuery(_) => {
+ rw_data.margin_style_response = MarginStyleResponse::empty();
+ },
ReflowQueryType::NoQuery => {}
}
return;
@@ -1129,6 +1137,10 @@ impl LayoutThread {
let node = unsafe { ServoLayoutNode::new(&node) };
rw_data.offset_parent_response = process_offset_parent_query(node, &mut root_flow);
},
+ ReflowQueryType::MarginStyleQuery(node) => {
+ let node = unsafe { ServoLayoutNode::new(&node) };
+ rw_data.margin_style_response = process_margin_style_query(node);
+ },
ReflowQueryType::NoQuery => {}
}
}