aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/lib.rs')
-rw-r--r--components/layout/lib.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index 4c5bd766e24..abdf6ff04c0 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -22,7 +22,7 @@ extern crate fnv;
extern crate gfx;
extern crate gfx_traits;
extern crate heapsize;
-#[macro_use] extern crate html5ever_atoms;
+#[macro_use] extern crate html5ever;
extern crate ipc_channel;
extern crate libc;
#[macro_use]
@@ -93,3 +93,15 @@ pub mod wrapper;
// For unit tests:
pub use fragment::Fragment;
pub use fragment::SpecificFragmentInfo;
+
+/// Returns whether the two arguments point to the same value.
+///
+/// FIXME: Remove this and use Arc::ptr_eq once we require Rust 1.17
+#[inline]
+pub fn arc_ptr_eq<T: 'static>(a: &::std::sync::Arc<T>, b: &::std::sync::Arc<T>) -> bool {
+ ::style::ptr_eq::<T>(&**a, &**b)
+}
+
+// We can't use stylearc for everything in layout, because the Flow stuff uses
+// weak references.
+use style::stylearc::Arc as StyleArc;