aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/traversal_flags.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2017-07-26 13:13:00 -0700
committerBobby Holley <bobbyholley@gmail.com>2017-08-11 10:53:08 -0700
commitf4ccbf36877ea9628c92a5a274b466409dbde15e (patch)
treee595e4e70a6555ba37b9641e8b188ccfe443279f /components/style/traversal_flags.rs
parent32790be78d5e65152416c304fdf6f62eba05c924 (diff)
downloadservo-f4ccbf36877ea9628c92a5a274b466409dbde15e.tar.gz
servo-f4ccbf36877ea9628c92a5a274b466409dbde15e.zip
Hoist StyleNew{Children,Subtree} into their own paths.
The buggy animation handling isn't a regression, since currently we pass UnstyledChildrenOnly in those cases, which blocks the animation traversal in Servo_TraverseSubtree. In general I really wanted to handle these two paths together. But there's enough broken with the NewChildren path that I wanted to scope the buginess as tightly as possible. And I really need to separate the handling here from StyleDocument() to make the restyle root stuff work. MozReview-Commit-ID: 9F0mcQl7AAX
Diffstat (limited to 'components/style/traversal_flags.rs')
-rw-r--r--components/style/traversal_flags.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/style/traversal_flags.rs b/components/style/traversal_flags.rs
index a2e0cdc7515..7a985c3d3cf 100644
--- a/components/style/traversal_flags.rs
+++ b/components/style/traversal_flags.rs
@@ -16,8 +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,
- /// Traverse only unstyled children of the root and their descendants.
- const UnstyledChildrenOnly = 1 << 2,
+ /// Styles unstyled elements, but does not handle invalidations on
+ /// already-styled elements.
+ const UnstyledOnly = 1 << 2,
/// 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
@@ -55,7 +56,7 @@ pub fn assert_traversal_flags_match() {
check_traversal_flags! {
ServoTraversalFlags_AnimationOnly => AnimationOnly,
ServoTraversalFlags_ForCSSRuleChanges => ForCSSRuleChanges,
- ServoTraversalFlags_UnstyledChildrenOnly => UnstyledChildrenOnly,
+ ServoTraversalFlags_UnstyledOnly => UnstyledOnly,
ServoTraversalFlags_Forgetful => Forgetful,
ServoTraversalFlags_AggressivelyForgetful => AggressivelyForgetful,
ServoTraversalFlags_ClearDirtyDescendants => ClearDirtyDescendants,