mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
style: Add animation-duration parsing under experimental flag
This commit is contained in:
parent
60192bb830
commit
c80084cd29
2 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -809,6 +809,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
|
|||
|
||||
impl ToCss for T {
|
||||
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() {
|
||||
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<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() {
|
||||
if i != 0 {
|
||||
try!(dest.write_str(", "));
|
||||
|
@ -866,6 +874,12 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
|
|||
}
|
||||
</%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
|
||||
// https://www.w3.org/TR/cssom-view-1/
|
||||
${helpers.single_keyword("scroll-behavior",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue