зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #17526 - Check has_new_animation_style along with for_css_rule_changes() in ne… (from hiikezoe:check-has_new_animation_style); r=birtles
…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 Source-Repo: https://github.com/servo/servo Source-Revision: 4b99a75508e1c84ef007a16a80d9ba513eafe22c --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : e1a3a4bfb2a2f53cb5271e5a628168c8b5e11662
This commit is contained in:
Родитель
6ea9496773
Коммит
1efb8f0832
|
@ -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 &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче