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.
This commit is contained in:
Emilio Cobos Álvarez 2017-07-15 15:44:45 +02:00
parent f9642b36bd
commit bf9369b29d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
17 changed files with 128 additions and 166 deletions

View file

@ -11,11 +11,13 @@ path = "lib.rs"
[dependencies]
app_units = "0.5"
atomic_refcell = "0.1"
euclid = "0.15"
fnv = "1.0"
gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"}
heapsize = "0.4"
html5ever = "0.18"
ipc-channel = "0.8"
layout = {path = "../layout"}
layout_traits = {path = "../layout_traits"}
@ -25,6 +27,7 @@ msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
parking_lot = {version = "0.4", features = ["nightly"]}
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
rayon = "0.8"
script = {path = "../script"}
script_layout_interface = {path = "../script_layout_interface"}

File diff suppressed because it is too large Load diff

View file

@ -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};