mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
parent
a7636010ee
commit
fce58015d6
5 changed files with 10 additions and 60 deletions
|
@ -16,15 +16,9 @@ bitflags! {
|
|||
/// Traverse and update all elements with CSS animations since
|
||||
/// @keyframes rules may have changed. Triggered by CSS rule changes.
|
||||
const ForCSSRuleChanges = 1 << 1;
|
||||
/// A forgetful traversal ignores the previous state of the frame tree, and
|
||||
/// thus does not compute damage or maintain other state describing the styles
|
||||
/// pre-traversal. A forgetful traversal is usually the right thing if you
|
||||
/// aren't going to do a post-traversal.
|
||||
const Forgetful = 1 << 3;
|
||||
/// 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;
|
||||
/// The final animation-only traversal, which shouldn't really care about other
|
||||
/// style changes anymore.
|
||||
const FinalAnimationTraversal = 1 << 2;
|
||||
/// Allows the traversal to run in parallel if there are sufficient cores on
|
||||
/// the machine.
|
||||
const ParallelTraversal = 1 << 7;
|
||||
|
@ -58,10 +52,7 @@ pub fn assert_traversal_flags_match() {
|
|||
check_traversal_flags! {
|
||||
ServoTraversalFlags_AnimationOnly => TraversalFlags::AnimationOnly,
|
||||
ServoTraversalFlags_ForCSSRuleChanges => TraversalFlags::ForCSSRuleChanges,
|
||||
ServoTraversalFlags_Forgetful => TraversalFlags::Forgetful,
|
||||
ServoTraversalFlags_ClearDirtyBits => TraversalFlags::ClearDirtyBits,
|
||||
ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants =>
|
||||
TraversalFlags::ClearAnimationOnlyDirtyDescendants,
|
||||
ServoTraversalFlags_FinalAnimationTraversal => TraversalFlags::FinalAnimationTraversal,
|
||||
ServoTraversalFlags_ParallelTraversal => TraversalFlags::ParallelTraversal,
|
||||
ServoTraversalFlags_FlushThrottledAnimations => TraversalFlags::FlushThrottledAnimations,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue