mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Don't generate rare_data_for_layout methods anymore
It is only used twice.
This commit is contained in:
parent
dd750c6f86
commit
414d477b54
3 changed files with 6 additions and 9 deletions
|
@ -1039,8 +1039,9 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn get_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>> {
|
unsafe fn get_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>> {
|
||||||
(*self.unsafe_get())
|
self.unsafe_get()
|
||||||
.rare_data_for_layout()
|
.rare_data
|
||||||
|
.borrow_for_layout()
|
||||||
.as_ref()?
|
.as_ref()?
|
||||||
.shadow_root
|
.shadow_root
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|
|
@ -671,11 +671,6 @@ macro_rules! impl_rare_data (
|
||||||
rare_data.as_mut().unwrap()
|
rare_data.as_mut().unwrap()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
|
||||||
fn rare_data_for_layout(&self) -> &Option<Box<$type>> {
|
|
||||||
unsafe { self.rare_data.borrow_for_layout() }
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1400,8 +1400,9 @@ impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn containing_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>> {
|
unsafe fn containing_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>> {
|
||||||
(*self.unsafe_get())
|
self.unsafe_get()
|
||||||
.rare_data_for_layout()
|
.rare_data
|
||||||
|
.borrow_for_layout()
|
||||||
.as_ref()?
|
.as_ref()?
|
||||||
.containing_shadow_root
|
.containing_shadow_root
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue