style: Cleanup unused style traversal flags.

Some of these were unused, some of them were only used in combination with
others, so I've unified them.

In particular, Forgetful and ClearAnimationOnlyDirtyDescendants were used only
together for a very specific task (the final animation traversal), so I merged
them into something that has that name.

ClearDirtyBits was unused, so I removed along with some code that would no
longer be called.

Differential Revision: https://phabricator.services.mozilla.com/D25454
This commit is contained in:
Emilio Cobos Álvarez 2019-04-09 18:03:41 +00:00
parent a7636010ee
commit fce58015d6
5 changed files with 10 additions and 60 deletions

View file

@ -471,7 +471,7 @@ trait PrivateMatchMethods: TElement {
debug!("accumulate_damage_for: {:?}", self);
debug_assert!(!shared_context
.traversal_flags
.contains(TraversalFlags::Forgetful));
.contains(TraversalFlags::FinalAnimationTraversal));
let difference = self.compute_style_difference(old_values, new_values, pseudo);
@ -723,11 +723,11 @@ pub trait MatchMethods: TElement {
}
}
// Don't accumulate damage if we're in a forgetful traversal.
// Don't accumulate damage if we're in the final animation traversal.
if context
.shared
.traversal_flags
.contains(TraversalFlags::Forgetful)
.contains(TraversalFlags::FinalAnimationTraversal)
{
return ChildCascadeRequirement::MustCascadeChildren;
}