mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Further changes required by Servo
This commit is contained in:
parent
679a69defb
commit
989f8d89c4
1 changed files with 11 additions and 2 deletions
|
@ -555,13 +555,17 @@ impl TimelineOrKeyframesName {
|
|||
return dest.write_str("none")
|
||||
}
|
||||
|
||||
self.0.with_str(|s| {
|
||||
let mut serialize = |s: &_| {
|
||||
if CustomIdent::is_valid(s, invalid) {
|
||||
serialize_identifier(s, dest)
|
||||
} else {
|
||||
s.to_css(dest)
|
||||
}
|
||||
})
|
||||
};
|
||||
#[cfg(feature = "gecko")]
|
||||
return self.0.with_str(|s| serialize(s));
|
||||
#[cfg(feature = "servo")]
|
||||
return serialize(self.0.as_ref());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -616,6 +620,11 @@ impl KeyframesName {
|
|||
Self(TimelineOrKeyframesName::from_atom(atom))
|
||||
}
|
||||
|
||||
/// <https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-name>
|
||||
pub fn from_ident(value: &str) -> Self {
|
||||
Self(TimelineOrKeyframesName::from_ident(value))
|
||||
}
|
||||
|
||||
/// Returns the `none` value.
|
||||
pub fn none() -> Self {
|
||||
Self(TimelineOrKeyframesName::none())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue