Make 'display' animatable

But not by CSS animations or Web Animations.
This commit is contained in:
Brian Birtles 2017-06-15 10:21:08 +09:00
parent d249c61c0d
commit e6bd750702
3 changed files with 9 additions and 3 deletions

View file

@ -12,7 +12,7 @@
// TODO(SimonSapin): don't parse `inline-table`, since we don't support it
<%helpers:longhand name="display"
need_clone="True"
animation_value_type="none"
animation_value_type="discrete"
custom_cascade="${product == 'servo'}"
spec="https://drafts.csswg.org/css-display/#propdef-display">
<%

View file

@ -356,7 +356,10 @@ fn get_animated_properties(keyframes: &[Arc<Locked<Keyframe>>], guard: &SharedRw
assert!(!importance.important());
if let Some(property) = AnimatableLonghand::from_declaration(declaration) {
if !seen.has_animatable_longhand_bit(&property) {
// Skip the 'display' property because although it is animatable from SMIL,
// it should not be animatable from CSS Animations or Web Animations.
if property != AnimatableLonghand::Display &&
!seen.has_animatable_longhand_bit(&property) {
seen.set_animatable_longhand_bit(&property);
ret.push(property);
}