mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Clean up LayoutShadowRootHelpers::get_style_data_for_layout
Parameter E is unused and the result should be bound by 'dom.
This commit is contained in:
parent
206157dd74
commit
86296b84ff
3 changed files with 4 additions and 18 deletions
|
@ -177,12 +177,7 @@ impl<'lr> TShadowRoot for ServoShadowRoot<'lr> {
|
|||
where
|
||||
Self: 'a,
|
||||
{
|
||||
Some(unsafe {
|
||||
&self
|
||||
.shadow_root
|
||||
.get_style_data_for_layout::<ServoLayoutElement>()
|
||||
.data
|
||||
})
|
||||
Some(unsafe { &self.shadow_root.get_style_data_for_layout().data })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -184,12 +184,7 @@ impl<'lr> TShadowRoot for ServoShadowRoot<'lr> {
|
|||
where
|
||||
Self: 'a,
|
||||
{
|
||||
Some(unsafe {
|
||||
&self
|
||||
.shadow_root
|
||||
.get_style_data_for_layout::<ServoLayoutElement>()
|
||||
.data
|
||||
})
|
||||
Some(unsafe { &self.shadow_root.get_style_data_for_layout().data })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -241,9 +241,7 @@ impl ShadowRootMethods for ShadowRoot {
|
|||
#[allow(unsafe_code)]
|
||||
pub trait LayoutShadowRootHelpers<'dom> {
|
||||
unsafe fn get_host_for_layout(&self) -> LayoutDom<'dom, Element>;
|
||||
unsafe fn get_style_data_for_layout<'a, E: TElement>(
|
||||
&self,
|
||||
) -> &'a AuthorStyles<StyleSheetInDocument>;
|
||||
unsafe fn get_style_data_for_layout(self) -> &'dom AuthorStyles<StyleSheetInDocument>;
|
||||
unsafe fn flush_stylesheets<E: TElement>(
|
||||
&self,
|
||||
device: &Device,
|
||||
|
@ -264,9 +262,7 @@ impl<'dom> LayoutShadowRootHelpers<'dom> for LayoutDom<'dom, ShadowRoot> {
|
|||
|
||||
#[inline]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_style_data_for_layout<'a, E: TElement>(
|
||||
&self,
|
||||
) -> &'a AuthorStyles<StyleSheetInDocument> {
|
||||
unsafe fn get_style_data_for_layout(self) -> &'dom AuthorStyles<StyleSheetInDocument> {
|
||||
(*self.unsafe_get()).author_styles.borrow_for_layout()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue