mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Bug 1341372 - Part 1: Let animation-only restyle include css-transition.
Animation-only restyle should include both Animation and Transition cascade levels. MozReview-Commit-ID: 5l6gaJKbixM
This commit is contained in:
parent
485a4de729
commit
1c1e487491
6 changed files with 77 additions and 24 deletions
|
@ -9,7 +9,7 @@
|
|||
use dom::TElement;
|
||||
use properties::ComputedValues;
|
||||
use properties::longhands::display::computed_value as display;
|
||||
use restyle_hints::{RESTYLE_CSS_ANIMATIONS, RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, RestyleHint};
|
||||
use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, RestyleHint};
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage, Snapshot};
|
||||
#[cfg(feature = "servo")] use std::collections::HashMap;
|
||||
|
@ -199,13 +199,13 @@ impl StoredRestyleHint {
|
|||
// In the middle of an animation only restyle, we don't need to
|
||||
// propagate any restyle hints, and we need to remove ourselves.
|
||||
if traversal_flags.for_animation_only() {
|
||||
if self.0.contains(RESTYLE_CSS_ANIMATIONS) {
|
||||
self.0.remove(RESTYLE_CSS_ANIMATIONS);
|
||||
if self.0.intersects(RestyleHint::for_animations()) {
|
||||
self.0.remove(RestyleHint::for_animations());
|
||||
}
|
||||
return Self::empty();
|
||||
}
|
||||
|
||||
debug_assert!(!self.0.contains(RESTYLE_CSS_ANIMATIONS),
|
||||
debug_assert!(!self.0.intersects(RestyleHint::for_animations()),
|
||||
"There should not be any animation restyle hints \
|
||||
during normal traversal");
|
||||
|
||||
|
@ -259,7 +259,7 @@ impl StoredRestyleHint {
|
|||
|
||||
/// Returns true if the hint has animation-only restyle.
|
||||
pub fn has_animation_hint(&self) -> bool {
|
||||
self.0.contains(RESTYLE_CSS_ANIMATIONS)
|
||||
self.0.intersects(RestyleHint::for_animations())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue