mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +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
|
where
|
||||||
Self: 'a,
|
Self: 'a,
|
||||||
{
|
{
|
||||||
Some(unsafe {
|
Some(unsafe { &self.shadow_root.get_style_data_for_layout().data })
|
||||||
&self
|
|
||||||
.shadow_root
|
|
||||||
.get_style_data_for_layout::<ServoLayoutElement>()
|
|
||||||
.data
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,12 +184,7 @@ impl<'lr> TShadowRoot for ServoShadowRoot<'lr> {
|
||||||
where
|
where
|
||||||
Self: 'a,
|
Self: 'a,
|
||||||
{
|
{
|
||||||
Some(unsafe {
|
Some(unsafe { &self.shadow_root.get_style_data_for_layout().data })
|
||||||
&self
|
|
||||||
.shadow_root
|
|
||||||
.get_style_data_for_layout::<ServoLayoutElement>()
|
|
||||||
.data
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,9 +241,7 @@ impl ShadowRootMethods for ShadowRoot {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
pub trait LayoutShadowRootHelpers<'dom> {
|
pub trait LayoutShadowRootHelpers<'dom> {
|
||||||
unsafe fn get_host_for_layout(&self) -> LayoutDom<'dom, Element>;
|
unsafe fn get_host_for_layout(&self) -> LayoutDom<'dom, Element>;
|
||||||
unsafe fn get_style_data_for_layout<'a, E: TElement>(
|
unsafe fn get_style_data_for_layout(self) -> &'dom AuthorStyles<StyleSheetInDocument>;
|
||||||
&self,
|
|
||||||
) -> &'a AuthorStyles<StyleSheetInDocument>;
|
|
||||||
unsafe fn flush_stylesheets<E: TElement>(
|
unsafe fn flush_stylesheets<E: TElement>(
|
||||||
&self,
|
&self,
|
||||||
device: &Device,
|
device: &Device,
|
||||||
|
@ -264,9 +262,7 @@ impl<'dom> LayoutShadowRootHelpers<'dom> for LayoutDom<'dom, ShadowRoot> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn get_style_data_for_layout<'a, E: TElement>(
|
unsafe fn get_style_data_for_layout(self) -> &'dom AuthorStyles<StyleSheetInDocument> {
|
||||||
&self,
|
|
||||||
) -> &'a AuthorStyles<StyleSheetInDocument> {
|
|
||||||
(*self.unsafe_get()).author_styles.borrow_for_layout()
|
(*self.unsafe_get()).author_styles.borrow_for_layout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue