Update node.rs (Ignore changes)

This commit is contained in:
komuhangi 2024-03-31 20:05:55 +03:00 committed by GitHub
parent f789c02693
commit 67d6ac0d14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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))
}