mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Auto merge of #17526 - hiikezoe:check-has_new_animation_style, r=birtles
Check has_new_animation_style along with for_css_rule_changes() in ne… …eds_animations_update(). <!-- Please describe your changes on the following line: --> https://bugzilla.mozilla.org/show_bug.cgi?id=1375787 --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17526) <!-- Reviewable:end -->
This commit is contained in:
commit
4b99a75508
1 changed files with 8 additions and 3 deletions
|
@ -653,9 +653,14 @@ trait PrivateMatchMethods: TElement {
|
|||
let old_display_style = old_box_style.clone_display();
|
||||
let new_display_style = new_box_style.clone_display();
|
||||
|
||||
// If the traverse is triggered by CSS rule changes,
|
||||
// we need to try to update all CSS animations.
|
||||
context.shared.traversal_flags.for_css_rule_changes() ||
|
||||
// If the traverse is triggered by CSS rule changes, we need to
|
||||
// try to update all CSS animations on the element if the element
|
||||
// has CSS animation style regardless of whether the animation is
|
||||
// running or not.
|
||||
// TODO: We should check which @keyframes changed/added/deleted
|
||||
// and update only animations corresponding to those @keyframes.
|
||||
(context.shared.traversal_flags.for_css_rule_changes() &&
|
||||
has_new_animation_style) ||
|
||||
!old_box_style.animations_equals(&new_box_style) ||
|
||||
(old_display_style == display::T::none &&
|
||||
new_display_style != display::T::none &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue