aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-07-15 07:44:08 -0700
committerGitHub <noreply@github.com>2017-07-15 07:44:08 -0700
commit3497bbbf1d092dd8ab274e21b33b6394afa61d8a (patch)
tree0dc23013790dcb77ac4a0c3bbfe4170876cbc352 /components/layout_thread/lib.rs
parent5c5c5147eae4159f94dbad9012e04ab9480063fd (diff)
parentbf9369b29d42255ea52b172e3ddd9b44db922d44 (diff)
downloadservo-3497bbbf1d092dd8ab274e21b33b6394afa61d8a.tar.gz
servo-3497bbbf1d092dd8ab274e21b33b6394afa61d8a.zip
Auto merge of #17744 - emilio:ensure-data, r=nox
script: Move the layout_wrapper outside of script. This allows us to have ensure_data() and clear_data() functions on the TElement trait, instead of hacking around it adding methods in random traits. This also allows us to do some further cleanup, which I'd rather do in a followup. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17744) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r--components/layout_thread/lib.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index b6f520ff2ee..fea91c164b7 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -7,13 +7,18 @@
#![feature(box_syntax)]
#![feature(mpsc_select)]
+#![feature(nonzero)]
extern crate app_units;
+extern crate atomic_refcell;
+extern crate core;
extern crate euclid;
extern crate fnv;
extern crate gfx;
extern crate gfx_traits;
extern crate heapsize;
+#[macro_use]
+extern crate html5ever;
extern crate ipc_channel;
#[macro_use]
extern crate layout;
@@ -27,6 +32,7 @@ extern crate net_traits;
extern crate parking_lot;
#[macro_use]
extern crate profile_traits;
+extern crate range;
extern crate rayon;
extern crate script;
extern crate script_layout_interface;
@@ -40,7 +46,11 @@ extern crate servo_url;
extern crate style;
extern crate webrender_api;
+mod dom_wrapper;
+
use app_units::Au;
+use dom_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode};
+use dom_wrapper::drop_style_and_layout_data;
use euclid::{Point2D, Rect, Size2D, ScaleFactor};
use fnv::FnvHashMap;
use gfx::display_list::{OpaqueNode, WebRenderImageInfo};
@@ -71,7 +81,6 @@ use layout::sequential;
use layout::traversal::{ComputeAbsolutePositions, RecalcStyleAndConstructFlows};
use layout::webrender_helpers::WebRenderDisplayListConverter;
use layout::wrapper::LayoutNodeLayoutData;
-use layout::wrapper::drop_style_and_layout_data;
use layout_traits::LayoutThreadFactory;
use msg::constellation_msg::PipelineId;
use msg::constellation_msg::TopLevelBrowsingContextId;
@@ -80,7 +89,6 @@ use parking_lot::RwLock;
use profile_traits::mem::{self, Report, ReportKind, ReportsChan};
use profile_traits::time::{self, TimerMetadata, profile};
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
-use script::layout_wrapper::{ServoLayoutElement, ServoLayoutDocument, ServoLayoutNode};
use script_layout_interface::message::{Msg, NewLayoutThreadInfo, Reflow, ReflowQueryType};
use script_layout_interface::message::{ScriptReflow, ReflowComplete};
use script_layout_interface::rpc::{LayoutRPC, MarginStyleResponse, NodeOverflowResponse, OffsetParentResponse};