Track the restyle root and use it to do less work during the traversal.

MozReview-Commit-ID: A8O3JOpsv4E
This commit is contained in:
Bobby Holley 2017-07-18 18:38:47 -07:00
parent 0534f72925
commit d4aa8e3cef
9 changed files with 132 additions and 68 deletions

View file

@ -27,8 +27,8 @@ bitflags! {
/// Actively seeks out and clears change hints that may have been posted into
/// the tree. Nonsensical without also passing Forgetful.
const AggressivelyForgetful = 1 << 4,
/// Clears the dirty descendants bit in the subtree.
const ClearDirtyDescendants = 1 << 5,
/// Clears all the dirty bits on the elements traversed.
const ClearDirtyBits = 1 << 5,
/// Clears the animation-only dirty descendants bit in the subtree.
const ClearAnimationOnlyDirtyDescendants = 1 << 6,
/// Allows the traversal to run in parallel if there are sufficient cores on
@ -67,7 +67,7 @@ pub fn assert_traversal_flags_match() {
ServoTraversalFlags_UnstyledOnly => UnstyledOnly,
ServoTraversalFlags_Forgetful => Forgetful,
ServoTraversalFlags_AggressivelyForgetful => AggressivelyForgetful,
ServoTraversalFlags_ClearDirtyDescendants => ClearDirtyDescendants,
ServoTraversalFlags_ClearDirtyBits => ClearDirtyBits,
ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants =>
ClearAnimationOnlyDirtyDescendants,
ServoTraversalFlags_ParallelTraversal => ParallelTraversal,