diff --git a/components/script/dom/webidls/CSSStyleDeclaration.webidl b/components/script/dom/webidls/CSSStyleDeclaration.webidl index b656fc15e43..f13bcfa4048 100644 --- a/components/script/dom/webidls/CSSStyleDeclaration.webidl +++ b/components/script/dom/webidls/CSSStyleDeclaration.webidl @@ -330,4 +330,6 @@ partial interface CSSStyleDeclaration { [SetterThrows, TreatNullAs=EmptyString] attribute DOMString animation-name; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString animationName; + [SetterThrows, TreatNullAs=EmptyString] attribute DOMString animation-duration; + [SetterThrows, TreatNullAs=EmptyString] attribute DOMString animationDuration; }; diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index 4d50e99594f..898a1902548 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -809,6 +809,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone= impl ToCss for T { fn to_css(&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() { if i != 0 { try!(dest.write_str(", ")); @@ -827,6 +831,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone= impl ToCss for SpecifiedValue { fn to_css(&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() { if i != 0 { try!(dest.write_str(", ")); @@ -866,6 +874,12 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone= } +<%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; + + // CSSOM View Module // https://www.w3.org/TR/cssom-view-1/ ${helpers.single_keyword("scroll-behavior",