From 9da7679367eba53d0f86bff30bc8b005940f044e Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Fri, 19 Sep 2014 14:02:22 -0700 Subject: Use html5ever for HTML parsing --- components/script/layout_interface.rs | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'components/script/layout_interface.rs') 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) -> Result; } -/// 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); pub struct ContentBoxesResponse(pub Vec>); pub struct HitTestResponse(pub UntrustedNodeAddress); -- cgit v1.2.3