diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index efb18a8d285..0dd190ef2f1 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -2520,6 +2520,7 @@ impl Window { impl Window { #[allow(unsafe_code)] + #[allow(clippy::too_many_arguments)] pub fn new( runtime: Rc, script_chan: MainThreadScriptChan, diff --git a/components/script/layout_dom/node.rs b/components/script/layout_dom/node.rs index 6fb20bc13b3..c331f4aa5e3 100644 --- a/components/script/layout_dom/node.rs +++ b/components/script/layout_dom/node.rs @@ -98,9 +98,6 @@ 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 { ServoLayoutNode::from_layout_js(LayoutDom::from_trusted_node_address(*address)) } diff --git a/components/script/layout_dom/shadow_root.rs b/components/script/layout_dom/shadow_root.rs index de2da7a030f..2d3d6d0d618 100644 --- a/components/script/layout_dom/shadow_root.rs +++ b/components/script/layout_dom/shadow_root.rs @@ -70,9 +70,7 @@ 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,