aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_interface.rs
diff options
context:
space:
mode:
authorKeegan McAllister <kmcallister@mozilla.com>2014-09-19 14:02:22 -0700
committerKeegan McAllister <kmcallister@mozilla.com>2014-10-16 13:06:34 -0700
commit9da7679367eba53d0f86bff30bc8b005940f044e (patch)
treeac2dadb2f3f98939c3245b5ed58c6beba1730c8c /components/script/layout_interface.rs
parent3fbb25cc430c9dcf3ed06b6e86b8a64738493e86 (diff)
downloadservo-9da7679367eba53d0f86bff30bc8b005940f044e.tar.gz
servo-9da7679367eba53d0f86bff30bc8b005940f044e.zip
Use html5ever for HTML parsing
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r--components/script/layout_interface.rs22
1 files changed, 3 insertions, 19 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs
index a3c8de5a66a..735893f497a 100644
--- a/components/script/layout_interface.rs
+++ b/components/script/layout_interface.rs
@@ -6,14 +6,10 @@
/// coupling between these two components, and enables the DOM to be placed in a separate crate
/// from layout.
-use dom::bindings::js::JS;
-use dom::bindings::trace::JSTraceable;
-use dom::node::{Node, LayoutDataRef};
+use dom::node::LayoutDataRef;
use geom::point::Point2D;
use geom::rect::Rect;
-use js::jsapi::JSTracer;
-use libc::c_void;
use script_traits::{ScriptControlChan, OpaqueScriptLayoutChannel, UntrustedNodeAddress};
use servo_msg::constellation_msg::WindowSizeData;
use servo_util::geometry::Au;
@@ -23,6 +19,8 @@ use std::owned::BoxAny;
use style::Stylesheet;
use url::Url;
+pub use dom::node::TrustedNodeAddress;
+
/// Asynchronous messages that script can send to layout.
pub enum Msg {
/// Adds the given stylesheet to the document.
@@ -70,20 +68,6 @@ pub trait LayoutRPC {
fn mouse_over(&self, node: TrustedNodeAddress, point: Point2D<f32>) -> Result<MouseOverResponse, ()>;
}
-/// The address of a node known to be valid. These must only be sent from content -> layout,
-/// because we do not trust layout.
-pub struct TrustedNodeAddress(pub *const c_void);
-
-impl JSTraceable for TrustedNodeAddress {
- fn trace(&self, s: *mut JSTracer) {
- let TrustedNodeAddress(addr) = *self;
- let node = addr as *const Node;
- unsafe {
- JS::from_raw(node).trace(s)
- }
- }
-}
-
pub struct ContentBoxResponse(pub Rect<Au>);
pub struct ContentBoxesResponse(pub Vec<Rect<Au>>);
pub struct HitTestResponse(pub UntrustedNodeAddress);