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

@ -97,7 +97,10 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoLayoutNode<'dom, LayoutDataType
phantom: PhantomData,
}
}
/// # Safety
///
/// This function should not be called if there is no TrustedNodeAddress.
pub unsafe fn new(address: &TrustedNodeAddress) -> Self {
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,
}
}
/// # Safety
///
/// This function should not mutate StyleSharedRwLockReadGuard.
pub unsafe fn flush_stylesheets(
&self,
stylist: &mut Stylist,