mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Keep custom-ident and string separate in animation/keyframes name.
This commit is contained in:
parent
82c04113d0
commit
1146921866
13 changed files with 123 additions and 67 deletions
|
@ -7,7 +7,7 @@ use servo_atoms::Atom;
|
|||
use style::parser::Parse;
|
||||
use style::properties::longhands::animation_iteration_count::single_value::computed_value::T as AnimationIterationCount;
|
||||
use style::properties::longhands::animation_name;
|
||||
use style::values::CustomIdent;
|
||||
use style::values::{KeyframesName, CustomIdent};
|
||||
use style_traits::ToCss;
|
||||
|
||||
#[test]
|
||||
|
@ -15,13 +15,13 @@ fn test_animation_name() {
|
|||
use self::animation_name::single_value::SpecifiedValue as SingleValue;
|
||||
let other_name = Atom::from("other-name");
|
||||
assert_eq!(parse_longhand!(animation_name, "none"),
|
||||
animation_name::SpecifiedValue(vec![SingleValue(CustomIdent(atom!("")))]));
|
||||
animation_name::SpecifiedValue(vec![SingleValue(None)]));
|
||||
assert_eq!(parse_longhand!(animation_name, "other-name, none, 'other-name', \"other-name\""),
|
||||
animation_name::SpecifiedValue(
|
||||
vec![SingleValue(CustomIdent(other_name.clone())),
|
||||
SingleValue(CustomIdent(atom!(""))),
|
||||
SingleValue(CustomIdent(other_name.clone())),
|
||||
SingleValue(CustomIdent(other_name.clone()))]));
|
||||
vec![SingleValue(Some(KeyframesName::Ident(CustomIdent(other_name.clone())))),
|
||||
SingleValue(None),
|
||||
SingleValue(Some(KeyframesName::QuotedString(other_name.clone()))),
|
||||
SingleValue(Some(KeyframesName::QuotedString(other_name.clone())))]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue