Remove DangerousThreadSafeLayoutNode

Remove this trait and replace it by two non-public functions on
ServoThreadSafeLayoutNode. This requires making the iterator not
generic, which simplifies things a little bit as well.
This commit is contained in:
Martin Robinson 2023-05-08 10:53:16 +02:00
parent 03574d8191
commit ab4bd2a133
2 changed files with 33 additions and 44 deletions

View file

@ -306,14 +306,6 @@ pub trait ThreadSafeLayoutNode<'dom>:
}
}
// This trait is only public so that it can be implemented by the gecko wrapper.
// It can be used to violate thread-safety, so don't use it elsewhere in layout!
#[allow(unsafe_code)]
pub trait DangerousThreadSafeLayoutNode<'dom>: ThreadSafeLayoutNode<'dom> {
unsafe fn dangerous_first_child(&self) -> Option<Self>;
unsafe fn dangerous_next_sibling(&self) -> Option<Self>;
}
pub trait ThreadSafeLayoutElement<'dom>:
Clone
+ Copy