style: Add animation-duration parsing under experimental flag

This commit is contained in:
Emilio Cobos Álvarez 2016-06-17 04:00:16 +02:00
parent 60192bb830
commit c80084cd29
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 16 additions and 0 deletions

View file

@ -330,4 +330,6 @@ partial interface CSSStyleDeclaration {
[SetterThrows, TreatNullAs=EmptyString] attribute DOMString animation-name; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString animation-name;
[SetterThrows, TreatNullAs=EmptyString] attribute DOMString animationName; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString animationName;
[SetterThrows, TreatNullAs=EmptyString] attribute DOMString animation-duration;
[SetterThrows, TreatNullAs=EmptyString] attribute DOMString animationDuration;
}; };

View file

@ -809,6 +809,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
impl ToCss for T { impl ToCss for T {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
if self.0.is_empty() {
return dest.write_str("none")
}
for (i, name) in self.0.iter().enumerate() { for (i, name) in self.0.iter().enumerate() {
if i != 0 { if i != 0 {
try!(dest.write_str(", ")); try!(dest.write_str(", "));
@ -827,6 +831,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
impl ToCss for SpecifiedValue { impl ToCss for SpecifiedValue {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
if self.0.is_empty() {
return dest.write_str("none")
}
for (i, name) in self.0.iter().enumerate() { for (i, name) in self.0.iter().enumerate() {
if i != 0 { if i != 0 {
try!(dest.write_str(", ")); try!(dest.write_str(", "));
@ -866,6 +874,12 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
} }
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand name="animation-duration" experimental="True">
pub use super::transition_duration::computed_value;
pub use super::transition_duration::{parse, get_initial_value};
pub use super::transition_duration::SpecifiedValue;
</%helpers:longhand>
// CSSOM View Module // CSSOM View Module
// https://www.w3.org/TR/cssom-view-1/ // https://www.w3.org/TR/cssom-view-1/
${helpers.single_keyword("scroll-behavior", ${helpers.single_keyword("scroll-behavior",