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 2b30f678a09..c331f4aa5e3 100644 --- a/components/script/layout_dom/node.rs +++ b/components/script/layout_dom/node.rs @@ -97,9 +97,7 @@ 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)) } diff --git a/components/script/layout_dom/shadow_root.rs b/components/script/layout_dom/shadow_root.rs index 3da0e2cc537..090d1e84f8b 100644 --- a/components/script/layout_dom/shadow_root.rs +++ b/components/script/layout_dom/shadow_root.rs @@ -71,9 +71,6 @@ impl<'dom, LayoutDataType: LayoutDataTrait> ServoShadowRoot<'dom, LayoutDataType } } - /// # Safety - /// - /// This function should not mutate StyleSharedRwLockReadGuard. pub unsafe fn flush_stylesheets( &self, stylist: &mut Stylist,