mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Combine DOM-related concepts in Layout 2020 into dom.rs
This commit is contained in:
parent
ab4bd2a133
commit
72b5fcd0b6
24 changed files with 257 additions and 344 deletions
|
@ -86,7 +86,12 @@ pub trait GetStyleAndOpaqueLayoutData<'dom> {
|
|||
|
||||
/// A wrapper so that layout can access only the methods that it should have access to. Layout must
|
||||
/// only ever see these and must never see instances of `LayoutDom`.
|
||||
pub trait LayoutNode<'dom>: Debug + GetStyleAndOpaqueLayoutData<'dom> + TNode {
|
||||
/// FIXME(mrobinson): `Send + Sync` is required here for Layout 2020, but eventually it
|
||||
/// should stop sending LayoutNodes to other threads and rely on ThreadSafeLayoutNode
|
||||
/// or some other mechanism to ensure thread safety.
|
||||
pub trait LayoutNode<'dom>:
|
||||
Copy + Debug + GetStyleAndOpaqueLayoutData<'dom> + TNode + Send + Sync
|
||||
{
|
||||
type ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode<'dom>;
|
||||
fn to_threadsafe(&self) -> Self::ConcreteThreadSafeLayoutNode;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue