diff options
author | Hiroyuki Ikezoe <hikezoe@mozilla.com> | 2017-09-20 15:59:04 +0900 |
---|---|---|
committer | Hiroyuki Ikezoe <hikezoe@mozilla.com> | 2017-09-20 15:59:05 +0900 |
commit | e3232f5c369d2ecdf8c591f2571306bb41bcd8ee (patch) | |
tree | fa3d927206de71ef705bb82bb58bda60656386eb /components | |
parent | a940999795671e20f41ab0df3f5347735e8138d6 (diff) | |
download | servo-e3232f5c369d2ecdf8c591f2571306bb41bcd8ee.tar.gz servo-e3232f5c369d2ecdf8c591f2571306bb41bcd8ee.zip |
Filter out !important property in keyframes for servo.
Diffstat (limited to 'components')
-rw-r--r-- | components/style/animation.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/components/style/animation.rs b/components/style/animation.rs index e29236186c7..91146571589 100644 --- a/components/style/animation.rs +++ b/components/style/animation.rs @@ -481,11 +481,13 @@ fn compute_style_for_animation_step(context: &SharedStyleContext, KeyframesStepValue::Declarations { block: ref declarations } => { let guard = declarations.read_with(context.guards.author); - // No !important in keyframes. - debug_assert!(!guard.any_important()); - let iter = || { - guard.declarations().iter().rev() + // It's possible to have !important properties in keyframes + // so we have to filter them out. + // See the spec issue https://github.com/w3c/csswg-drafts/issues/1824 + // Also we filter our non-animatable properties. + guard.normal_declaration_iter() + .filter(|declaration| declaration.is_animatable()) .map(|decl| (decl, CascadeLevel::Animations)) }; |