Make LayoutShadowRootHelpers::get_host_for_layout be safe

This commit is contained in:
Anthony Ramine 2020-03-31 22:30:42 +02:00
parent 68d5cfffd5
commit f712b0bcf8
3 changed files with 10 additions and 8 deletions

View file

@ -177,7 +177,7 @@ impl<'lr> TShadowRoot for ServoShadowRoot<'lr> {
}
fn host(&self) -> ServoLayoutElement<'lr> {
ServoLayoutElement::from_layout_js(unsafe { self.shadow_root.get_host_for_layout() })
ServoLayoutElement::from_layout_js(self.shadow_root.get_host_for_layout())
}
fn style_data<'a>(&self) -> Option<&'a CascadeData>