@@ -424,36 +424,17 @@ ${helpers.predefined_type("transition-timing-function",
424424 extra_prefixes="moz webkit" ,
425425 spec="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function" ) }
426426
427- <%helpers: vector_longhand name="transition-property"
428- allow_empty="True"
429- need_index="True"
430- animation_value_type="none"
431- extra_prefixes="moz webkit"
432- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-property" >
433-
434- use values:: computed:: ComputedValueAsSpecified ;
435-
436- pub use properties:: animated_properties:: TransitionProperty ;
437- pub use properties:: animated_properties:: TransitionProperty as SpecifiedValue ;
438-
439- pub mod computed_value {
440- // NB: Can't generate the type here because it needs all the longhands
441- // generated beforehand.
442- pub use super :: SpecifiedValue as T ;
443- }
444-
445- pub fn parse ( _context : & ParserContext , input : & mut Parser ) -> Result < SpecifiedValue , ( ) > {
446- SpecifiedValue :: parse ( input)
447- }
448-
449- pub fn get_initial_specified_value ( ) -> SpecifiedValue {
450- TransitionProperty :: All
451- }
452-
453- no_viewport_percentage ! ( SpecifiedValue ) ;
454-
455- impl ComputedValueAsSpecified for SpecifiedValue { }
456- </%helpers : vector_longhand >
427+ ${ helpers. predefined_type ( "transition-property" ,
428+ "TransitionProperty" ,
429+ "computed::TransitionProperty::All" ,
430+ initial_specified_value="specified::TransitionProperty::All" ,
431+ vector=True ,
432+ allow_empty=True ,
433+ need_index=True ,
434+ needs_context=False ,
435+ animation_value_type="none" ,
436+ extra_prefixes="moz webkit" ,
437+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-property" ) }
457438
458439${ helpers. predefined_type ( "transition-delay" ,
459440 "Time" ,
@@ -463,7 +444,7 @@ ${helpers.predefined_type("transition-delay",
463444 need_index=True ,
464445 animation_value_type="none" ,
465446 extra_prefixes="moz webkit" ,
466- spec="https://drafts.csswg.org/css-transitions/#propdef-transition-duration " ) }
447+ spec="https://drafts.csswg.org/css-transitions/#propdef-transition-delay " ) }
467448
468449<%helpers: vector_longhand name="animation-name"
469450 need_index="True"
@@ -547,18 +528,16 @@ ${helpers.predefined_type("animation-duration",
547528 extra_prefixes="moz webkit" ,
548529 spec="https://drafts.csswg.org/css-transitions/#propdef-transition-duration" ) }
549530
550- <%helpers : vector_longhand name="animation-timing-function"
551- need_index="True"
531+ ${ helpers. predefined_type ( "animation-timing-function" ,
532+ "TimingFunction" ,
533+ "computed::TimingFunction::ease()" ,
534+ initial_specified_value="specified::TimingFunction::ease()" ,
535+ vector=True ,
536+ need_index=True ,
552537 animation_value_type="none" ,
553- extra_prefixes="moz webkit"
554- spec="https://drafts.csswg.org/css-animations/#propdef-animation-timing-function" ,
555- allowed_in_keyframe_block="True" >
556- pub use properties:: longhands:: transition_timing_function:: single_value:: computed_value;
557- pub use properties:: longhands:: transition_timing_function:: single_value:: get_initial_value;
558- pub use properties:: longhands:: transition_timing_function:: single_value:: get_initial_specified_value;
559- pub use properties:: longhands:: transition_timing_function:: single_value:: parse;
560- pub use properties:: longhands:: transition_timing_function:: single_value:: SpecifiedValue ;
561- </%helpers : vector_longhand >
538+ extra_prefixes="moz webkit" ,
539+ allowed_in_keyframe_block=True ,
540+ spec="https://drafts.csswg.org/css-transitions/#propdef-animation-timing-function" ) }
562541
563542<%helpers : vector_longhand name="animation-iteration-count"
564543 need_index="True"
@@ -660,111 +639,27 @@ ${helpers.single_keyword("animation-fill-mode",
660639 spec="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode" ,
661640 allowed_in_keyframe_block=False ) }
662641
663- <%helpers : vector_longhand name="animation-delay"
664- need_index ="True "
642+ ${ helpers. predefined_type( "animation-delay",
643+ "Time ",
644+ "computed::Time::zero()" ,
645+ initial_specified_value="specified::Time::zero()" ,
646+ vector=True ,
647+ need_index=True ,
665648 animation_value_type="none" ,
666649 extra_prefixes="moz webkit" ,
667650 spec="https://drafts.csswg.org/css-animations/#propdef-animation-delay" ,
668- allowed_in_keyframe_block="False" >
669- pub use properties:: longhands:: transition_delay:: single_value:: computed_value;
670- pub use properties:: longhands:: transition_delay:: single_value:: get_initial_specified_value;
671- pub use properties:: longhands:: transition_delay:: single_value:: { get_initial_value, parse} ;
672- pub use properties:: longhands:: transition_delay:: single_value:: SpecifiedValue ;
673- </%helpers: vector_longhand>
674-
675- <%helpers : longhand products ="gecko" name="scroll-snap-points-y" animation_value_type="none"
676- spec="Nonstandard (https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/#scroll-snap-points)" >
677- use std:: fmt;
678- use style_traits:: ToCss ;
679- use values:: specified:: LengthOrPercentage ;
680-
681- pub mod computed_value {
682- use values:: computed:: LengthOrPercentage ;
683-
684- #[ derive( Debug , Clone , PartialEq ) ]
685- #[ cfg_attr( feature = "servo" , derive( HeapSizeOf ) ) ]
686- pub struct T ( pub Option <LengthOrPercentage >) ;
687- }
688-
689- #[ derive( Clone , Debug , HasViewportPercentage , PartialEq ) ]
690- #[ cfg_attr( feature = "servo" , derive( HeapSizeOf ) ) ]
691- pub enum SpecifiedValue {
692- None ,
693- Repeat ( LengthOrPercentage ) ,
694- }
695-
696- impl ToCss for computed_value:: T {
697- fn to_css< W > ( & self , dest: & mut W ) -> fmt:: Result where W : fmt:: Write {
698- match self. 0 {
699- None => dest. write_str ( "none" ) ,
700- Some ( ref l) => {
701- try!( dest. write_str ( "repeat(" ) ) ;
702- try!( l. to_css ( dest) ) ;
703- dest. write_str ( ")" )
704- } ,
705- }
706- }
707- }
708- impl ToCss for SpecifiedValue {
709- fn to_css< W > ( & self , dest: & mut W ) -> fmt:: Result where W : fmt:: Write {
710- match * self {
711- SpecifiedValue :: None => dest. write_str ( "none" ) ,
712- SpecifiedValue :: Repeat ( ref l) => {
713- try!( dest. write_str ( "repeat(" ) ) ;
714- try!( l. to_css ( dest) ) ;
715- dest. write_str ( ")" )
716- } ,
717- }
718- }
719- }
720-
721- #[ inline]
722- pub fn get_initial_value ( ) -> computed_value:: T {
723- computed_value : : T ( None )
724- }
725-
726- impl ToComputedValue for SpecifiedValue {
727- type ComputedValue = computed_value : : T ;
728-
729- #[ inline]
730- fn to_computed_value( & self , context: & Context ) -> computed_value:: T {
731- match * self {
732- SpecifiedValue :: None => computed_value:: T ( None ) ,
733- SpecifiedValue : : Repeat ( ref l) =>
734- computed_value:: T ( Some ( l. to_computed_value( context) ) ) ,
735- }
736- }
737- #[ inline]
738- fn from_computed_value( computed: & computed_value:: T ) -> Self {
739- match * computed {
740- computed_value : : T ( None ) => SpecifiedValue :: None ,
741- computed_value : : T ( Some ( l) ) =>
742- SpecifiedValue :: Repeat ( ToComputedValue :: from_computed_value ( & l) )
743- }
744- }
745- }
746-
747- pub fn parse( context: & ParserContext , input: & mut Parser ) -> Result <SpecifiedValue , ( ) > {
748- if input. try ( |input| input. expect_ident_matching ( "none" ) ) . is_ok ( ) {
749- Ok ( SpecifiedValue :: None )
750- } else if input. try ( |input| input. expect_function_matching ( "repeat" ) ) . is_ok ( ) {
751- input. parse_nested_block ( |input| {
752- LengthOrPercentage :: parse_non_negative ( context, input) . map ( SpecifiedValue :: Repeat )
753- } )
754- } else {
755- Err ( ( ) )
756- }
757- }
758- </%helpers: longhand>
759-
760- <%helpers : longhand products ="gecko" name="scroll-snap-points-x" animation_value_type="none"
761- spec="Nonstandard (https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/#scroll-snap-points)" >
762- pub use super :: scroll_snap_points_y:: SpecifiedValue ;
763- pub use super :: scroll_snap_points_y:: computed_value;
764- pub use super :: scroll_snap_points_y:: get_initial_value;
765- pub use super :: scroll_snap_points_y:: parse;
766- </%helpers: longhand>
767-
651+ allowed_in_keyframe_block=False ) }
652+
653+ % for axis in [ "x" , "y" ] :
654+ ${ helpers. predefined_type (
655+ "scroll-snap-points-" + axis,
656+ "ScrollSnapPoint" ,
657+ "computed::ScrollSnapPoint::none()" ,
658+ animation_value_type="none" ,
659+ products="gecko" ,
660+ spec="Nonstandard (https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/#scroll-snap-points)" ,
661+ ) }
662+ % endfor
768663
769664${ helpers. predefined_type ( "scroll-snap-destination" ,
770665 "Position" ,
0 commit comments