Move children_to_process to layout.

We don't need this for Gecko, and it's hard to implement in that case because
there's nowhere obvious to put it (we don't plan to create TSDs for non-dirty
nodes, and non-dirty nodes can have dirty children which require the
children_to_process atomic). There are various solutions here, but punting is
the easiest.

We'll need to rethink this if/when we need to do a bottom-up traversal for
Gecko.
This commit is contained in:
Bobby Holley 2016-10-08 18:08:01 -07:00
parent b1d8eff467
commit c72fffa8f8
8 changed files with 74 additions and 44 deletions

View file

@ -139,6 +139,14 @@ pub trait TNode : Sized + Copy + Clone + NodeInfo {
unsafe fn set_can_be_fragmented(&self, value: bool);
/// Atomically stores the number of children of this node that we will
/// need to process during bottom-up traversal.
fn store_children_to_process(&self, n: isize);
/// Atomically notes that a child has been processed during bottom-up
/// traversal. Returns the number of children left to process.
fn did_process_child(&self) -> isize;
/// Borrows the style data immutably. Fails on a conflicting borrow.
#[inline(always)]
fn borrow_data(&self) -> Option<AtomicRef<PersistentStyleData>>;