Use animation values that have been processed during animation-only restyle for normal restyle.

This commit is contained in:
Hiroyuki Ikezoe 2017-05-24 11:11:56 +09:00
parent 35e0e3aa11
commit 4935d972e5
7 changed files with 76 additions and 47 deletions

View file

@ -6,7 +6,7 @@
use context::SharedStyleContext;
use dom::TElement;
use properties::{ComputedValues, PropertyDeclarationBlock};
use properties::{AnimationRules, ComputedValues, PropertyDeclarationBlock};
use properties::longhands::display::computed_value as display;
use restyle_hints::{HintComputationContext, RestyleReplacements, RestyleHint};
use rule_tree::StrongRuleNode;
@ -571,4 +571,16 @@ impl ElementData {
None => None,
}
}
/// Returns AnimationRules that has processed during animation-only restyles.
pub fn get_animation_rules(&self) -> AnimationRules {
if cfg!(feature = "servo") {
return AnimationRules(None, None)
}
match self.get_styles() {
Some(s) => s.primary.rules.get_animation_rules(),
None => AnimationRules(None, None),
}
}
}