aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index fca0f0949eb..5241d01785d 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -30,7 +30,7 @@
#![allow(unsafe_code)]
-use atomic_refcell::AtomicRefCell;
+use atomic_refcell::{AtomicRef, AtomicRefCell};
use dom::bindings::inheritance::{CharacterDataTypeId, ElementTypeId};
use dom::bindings::inheritance::{HTMLElementTypeId, NodeTypeId};
use dom::bindings::js::LayoutJS;
@@ -1092,8 +1092,10 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
self.element.get_attr(namespace, name)
}
- fn get_style_data(&self) -> Option<&AtomicRefCell<ElementData>> {
+ fn style_data(&self) -> AtomicRef<ElementData> {
self.element.get_data()
+ .expect("Unstyled layout node?")
+ .borrow()
}
}