Rename TraversalRestyleBehavior::ForAnimationOnly to TraversalRestyleBehavior::ForThrottledAnimationFlush.

ForAnimationOnly is somewhat misleading, it means actually we process
*only* animation-only restyle without normal restyle. The purpose of
ForAnimationOnly is for updating throttled animations to get correct position
of the animations when we need to handle events. Currently we do also update
unthrottled animations though.
This commit is contained in:
Hiroyuki Ikezoe 2017-07-15 11:16:41 +09:00
parent 3fb309c755
commit 0523e7efb6

View file

@ -262,11 +262,11 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
let traversal_flags = match (root_behavior, restyle_behavior) {
(Root::Normal, Restyle::Normal) |
(Root::Normal, Restyle::ForNewlyBoundElement) |
(Root::Normal, Restyle::ForAnimationOnly)
(Root::Normal, Restyle::ForThrottledAnimationFlush)
=> TraversalFlags::empty(),
(Root::UnstyledChildrenOnly, Restyle::Normal) |
(Root::UnstyledChildrenOnly, Restyle::ForNewlyBoundElement) |
(Root::UnstyledChildrenOnly, Restyle::ForAnimationOnly)
(Root::UnstyledChildrenOnly, Restyle::ForThrottledAnimationFlush)
=> UNSTYLED_CHILDREN_ONLY,
(Root::Normal, Restyle::ForCSSRuleChanges) => FOR_CSS_RULE_CHANGES,
(Root::Normal, Restyle::ForReconstruct) => FOR_RECONSTRUCT,
@ -282,7 +282,7 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
unsafe { &*snapshots });
}
if restyle_behavior == Restyle::ForAnimationOnly {
if restyle_behavior == Restyle::ForThrottledAnimationFlush {
return needs_animation_only_restyle;
}