mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Use animation values that have been processed during animation-only restyle for normal restyle.
This commit is contained in:
parent
35e0e3aa11
commit
4935d972e5
7 changed files with 76 additions and 47 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue