diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-06-21 13:06:20 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-06-22 10:47:21 +0200 |
commit | eb2c508df0ca8a286db9d30d5fb2ba8e47b41fa2 (patch) | |
tree | 0dd27854dd7c3e761a75b0d22c2914153f891f7f /components/layout/data.rs | |
parent | a217ffb00a844c4396f5abb1d3ead2f2bb520a6c (diff) | |
download | servo-eb2c508df0ca8a286db9d30d5fb2ba8e47b41fa2.tar.gz servo-eb2c508df0ca8a286db9d30d5fb2ba8e47b41fa2.zip |
Implement the LayoutData getters on LayoutJS<Node> rather than Node itself.
Diffstat (limited to 'components/layout/data.rs')
-rw-r--r-- | components/layout/data.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout/data.rs b/components/layout/data.rs index 9146e0110c4..f679435a91f 100644 --- a/components/layout/data.rs +++ b/components/layout/data.rs @@ -8,7 +8,7 @@ use construct::{ConstructionItem, ConstructionResult}; use incremental::RestyleDamage; use msg::constellation_msg::ConstellationChan; use parallel::DomParallelInfo; -use script::dom::node::SharedLayoutData; +use script::dom::node::{LayoutNodeHelpers, SharedLayoutData}; use script::layout_interface::LayoutChan; use std::cell::{Ref, RefMut}; use std::mem; @@ -116,20 +116,20 @@ pub trait LayoutDataAccess { impl<'ln> LayoutDataAccess for LayoutNode<'ln> { #[inline(always)] unsafe fn borrow_layout_data_unchecked(&self) -> *const Option<LayoutDataWrapper> { - mem::transmute(self.get().layout_data_unchecked()) + mem::transmute(self.get_jsmanaged().layout_data_unchecked()) } #[inline(always)] fn borrow_layout_data<'a>(&'a self) -> Ref<'a,Option<LayoutDataWrapper>> { unsafe { - mem::transmute(self.get().layout_data()) + mem::transmute(self.get_jsmanaged().layout_data()) } } #[inline(always)] fn mutate_layout_data<'a>(&'a self) -> RefMut<'a,Option<LayoutDataWrapper>> { unsafe { - mem::transmute(self.get().layout_data_mut()) + mem::transmute(self.get_jsmanaged().layout_data_mut()) } } } |