Merge branch 'main' of github.com:jahielkomu/servo into contribution/7

This commit is contained in:
jahielkomu 2024-03-31 20:10:24 +03:00
commit aabc422ccb
2 changed files with 7 additions and 2 deletions

View file

@ -98,6 +98,9 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoLayoutNode<'dom, LayoutDataType
} }
} }
/// # Safety
///
/// This function should not be called if there is no TrustedNodeAddress.
pub unsafe fn new(address: &TrustedNodeAddress) -> Self { pub unsafe fn new(address: &TrustedNodeAddress) -> Self {
ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address)) ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address))
} }

View file

@ -70,7 +70,9 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoShadowRoot<'dom, LayoutDataType
phantom: PhantomData, phantom: PhantomData,
} }
} }
/// # Safety
///
/// This function should not mutate StyleSharedRwLockReadGuard.
pub unsafe fn flush_stylesheets( pub unsafe fn flush_stylesheets(
&self, &self,
stylist: &mut Stylist, stylist: &mut Stylist,