mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn get_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>> {
|
||||
(*self.unsafe_get())
|
||||
.rare_data_for_layout()
|
||||
self.unsafe_get()
|
||||
.rare_data
|
||||
.borrow_for_layout()
|
||||
.as_ref()?
|
||||
.shadow_root
|
||||
.as_ref()
|
||||
|
|
|
@ -671,11 +671,6 @@ macro_rules! impl_rare_data (
|
|||
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]
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn containing_shadow_root_for_layout(self) -> Option<LayoutDom<'dom, ShadowRoot>> {
|
||||
(*self.unsafe_get())
|
||||
.rare_data_for_layout()
|
||||
self.unsafe_get()
|
||||
.rare_data
|
||||
.borrow_for_layout()
|
||||
.as_ref()?
|
||||
.containing_shadow_root
|
||||
.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue