mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
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:
parent
f9642b36bd
commit
bf9369b29d
17 changed files with 128 additions and 166 deletions
|
@ -27,7 +27,6 @@ tinyfiledialogs = "2.5.9"
|
|||
angle = {git = "https://github.com/servo/angle", branch = "servo"}
|
||||
app_units = "0.5"
|
||||
audio-video-metadata = "0.1.2"
|
||||
atomic_refcell = "0.1"
|
||||
base64 = "0.5.2"
|
||||
bitflags = "0.7"
|
||||
bluetooth_traits = {path = "../bluetooth_traits"}
|
||||
|
@ -44,7 +43,6 @@ encoding = "0.2"
|
|||
euclid = "0.15"
|
||||
fnv = "1.0"
|
||||
gleam = "0.4"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
half = "1.0"
|
||||
heapsize = "0.4"
|
||||
heapsize_derive = "0.1"
|
||||
|
@ -68,7 +66,6 @@ open = "1.1.1"
|
|||
parking_lot = "0.4"
|
||||
phf = "0.7.18"
|
||||
profile_traits = {path = "../profile_traits"}
|
||||
range = {path = "../range"}
|
||||
ref_filter_map = "1.0.1"
|
||||
ref_slice = "1.0"
|
||||
regex = "0.2"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -26,7 +26,6 @@
|
|||
|
||||
extern crate angle;
|
||||
extern crate app_units;
|
||||
extern crate atomic_refcell;
|
||||
extern crate audio_video_metadata;
|
||||
extern crate base64;
|
||||
#[macro_use]
|
||||
|
@ -46,7 +45,6 @@ extern crate domobject_derive;
|
|||
extern crate encoding;
|
||||
extern crate euclid;
|
||||
extern crate fnv;
|
||||
extern crate gfx_traits;
|
||||
extern crate gleam;
|
||||
extern crate half;
|
||||
#[macro_use] extern crate heapsize;
|
||||
|
@ -78,7 +76,6 @@ extern crate parking_lot;
|
|||
extern crate phf;
|
||||
#[macro_use]
|
||||
extern crate profile_traits;
|
||||
extern crate range;
|
||||
extern crate ref_filter_map;
|
||||
extern crate ref_slice;
|
||||
extern crate regex;
|
||||
|
@ -115,7 +112,6 @@ pub mod document_loader;
|
|||
mod dom;
|
||||
pub mod fetch;
|
||||
mod layout_image;
|
||||
pub mod layout_wrapper;
|
||||
mod mem;
|
||||
mod microtask;
|
||||
mod network_listener;
|
||||
|
@ -132,6 +128,24 @@ mod timers;
|
|||
mod unpremultiplytable;
|
||||
mod webdriver_handlers;
|
||||
|
||||
/// A module with everything layout can use from script.
|
||||
///
|
||||
/// Try to keep this small!
|
||||
///
|
||||
/// TODO(emilio): A few of the FooHelpers can go away, presumably...
|
||||
pub mod layout_exports {
|
||||
pub use dom::bindings::inheritance::{CharacterDataTypeId, ElementTypeId};
|
||||
pub use dom::bindings::inheritance::{HTMLElementTypeId, NodeTypeId};
|
||||
pub use dom::bindings::js::LayoutJS;
|
||||
pub use dom::characterdata::LayoutCharacterDataHelpers;
|
||||
pub use dom::document::{Document, LayoutDocumentHelpers, PendingRestyle};
|
||||
pub use dom::element::{Element, LayoutElementHelpers, RawLayoutElementHelpers};
|
||||
pub use dom::node::{CAN_BE_FRAGMENTED, DIRTY_ON_VIEWPORT_SIZE_CHANGE, HAS_DIRTY_DESCENDANTS, IS_IN_DOC};
|
||||
pub use dom::node::{HANDLED_SNAPSHOT, HAS_SNAPSHOT};
|
||||
pub use dom::node::{LayoutNodeHelpers, Node};
|
||||
pub use dom::text::Text;
|
||||
}
|
||||
|
||||
use dom::bindings::codegen::RegisterBindings;
|
||||
use dom::bindings::proxyhandler;
|
||||
use script_traits::SWManagerSenders;
|
||||
|
|
|
@ -24,7 +24,6 @@ pub mod size_of {
|
|||
use dom::htmlspanelement::HTMLSpanElement;
|
||||
use dom::node::Node;
|
||||
use dom::text::Text;
|
||||
use layout_wrapper::{ServoLayoutElement, ServoLayoutNode, ServoThreadSafeLayoutNode};
|
||||
use std::mem::size_of;
|
||||
|
||||
pub fn CharacterData() -> usize {
|
||||
|
@ -55,18 +54,6 @@ pub mod size_of {
|
|||
size_of::<Node>()
|
||||
}
|
||||
|
||||
pub fn SendElement() -> usize {
|
||||
size_of::<::style::dom::SendElement<ServoLayoutElement>>()
|
||||
}
|
||||
|
||||
pub fn SendNode() -> usize {
|
||||
size_of::<::style::dom::SendNode<ServoLayoutNode>>()
|
||||
}
|
||||
|
||||
pub fn ServoThreadSafeLayoutNode() -> usize {
|
||||
size_of::<ServoThreadSafeLayoutNode>()
|
||||
}
|
||||
|
||||
pub fn Text() -> usize {
|
||||
size_of::<Text>()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue