Bug 1371450 - Return whether the root element has animation-only dirty bit from Servo_TraverseSubtree for flushing throttled animations. r?emilio draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sat, 15 Jul 2017 07:46:29 +0900
changeset 609160 2ae783257cb6ec5e2b8b474f7c9c986b92a64830
parent 609159 7e3d0bd04cbc2b32d21e3bae3ce2f7b7921760d6
child 609161 e59782e495ed4ece555ddaf9352c9029de306ad2
push id68526
push userhikezoe@mozilla.com
push dateFri, 14 Jul 2017 23:06:22 +0000
reviewersemilio
bugs1371450
milestone56.0a1
Bug 1371450 - Return whether the root element has animation-only dirty bit from Servo_TraverseSubtree for flushing throttled animations. r?emilio MozReview-Commit-ID: 4wLud7FMQk1
servo/ports/geckolib/glue.rs
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -278,17 +278,18 @@ pub extern "C" fn Servo_TraverseSubtree(
     if needs_animation_only_restyle {
         traverse_subtree(element,
                          raw_data,
                          traversal_flags | ANIMATION_ONLY,
                          unsafe { &*snapshots });
     }
 
     if restyle_behavior == Restyle::ForThrottledAnimationFlush {
-        return needs_animation_only_restyle;
+        return element.has_animation_only_dirty_descendants() ||
+               element.borrow_data().unwrap().restyle.is_restyle();
     }
 
     traverse_subtree(element,
                      raw_data,
                      traversal_flags,
                      unsafe { &*snapshots });
 
     if restyle_behavior == Restyle::ForNewlyBoundElement {