diff options
Diffstat (limited to 'components/layout_thread')
-rw-r--r-- | components/layout_thread/dom_wrapper.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/components/layout_thread/dom_wrapper.rs b/components/layout_thread/dom_wrapper.rs index 7d3ad1e5c5a..3ad5927c89b 100644 --- a/components/layout_thread/dom_wrapper.rs +++ b/components/layout_thread/dom_wrapper.rs @@ -649,21 +649,17 @@ impl<'le> TElement for ServoLayoutElement<'le> { /// The shadow root this element is a host of. fn shadow_root(&self) -> Option<ServoShadowRoot<'le>> { - unsafe { - self.element - .get_shadow_root_for_layout() - .map(ServoShadowRoot::from_layout_js) - } + self.element + .get_shadow_root_for_layout() + .map(ServoShadowRoot::from_layout_js) } /// The shadow root which roots the subtree this element is contained in. fn containing_shadow(&self) -> Option<ServoShadowRoot<'le>> { - unsafe { - self.element - .upcast() - .containing_shadow_root_for_layout() - .map(ServoShadowRoot::from_layout_js) - } + self.element + .upcast() + .containing_shadow_root_for_layout() + .map(ServoShadowRoot::from_layout_js) } fn local_name(&self) -> &LocalName { |