Bug 1356941 - Use IntermediateColor for text-shadow. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 24 Apr 2017 15:03:44 +0900
changeset 566930 2edec88b684efb6f5fb3dfdcc1fe8d5a46321366
parent 566929 78085384a8926b2e7b4e0731da4c333599059157
child 566931 d6af8590663ea9d2b48bee4c0a6a64226168aa77
push id55379
push userhikezoe@mozilla.com
push dateMon, 24 Apr 2017 06:04:15 +0000
reviewersbirtles
bugs1356941
milestone55.0a1
Bug 1356941 - Use IntermediateColor for text-shadow. r?birtles MozReview-Commit-ID: 6jE3VFdV7kB
servo/components/style/properties/helpers/animated_properties.mako.rs
servo/components/style/properties/longhand/inherited_text.mako.rs
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -2225,16 +2225,17 @@ impl Interpolate for IntermediateRGBA {
             }
         }
     }
     ${impl_interpolate_for_shadow('Intermediate%sShadow' % type,
                                   'IntermediateColor::IntermediateRGBA(IntermediateRGBA::transparent())')}
 </%def>
 
 ${impl_intermediate_type_for_shadow('Box')}
+${impl_intermediate_type_for_shadow('Text')}
 
 impl<'a> From<<&'a Either<CSSParserColor, Auto>> for Either<IntermediateColor, Auto> {
     fn from(from: &Either<CSSParserColor, Auto>) -> Either<IntermediateColor, Auto> {
         match *from {
             Either::First(ref from) =>
                 match *from {
                     CSSParserColor::RGBA(ref color) =>
                         Either::First(IntermediateColor::IntermediateRGBA(
--- a/servo/components/style/properties/longhand/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_text.mako.rs
@@ -706,17 +706,18 @@
                 SpecifiedValue::pre |
                 SpecifiedValue::pre_wrap => true,
             }
         }
     }
     % endif
 </%helpers:single_keyword_computed>
 
-<%helpers:longhand name="text-shadow" animation_value_type="ComputedValue"
+<%helpers:longhand name="text-shadow"
+                   animation_value_type="IntermediateTextShadowList",
                    spec="https://drafts.csswg.org/css-text-decor/#propdef-text-shadow">
     use cssparser;
     use std::fmt;
     use style_traits::ToCss;
     use values::HasViewportPercentage;
 
     impl HasViewportPercentage for SpecifiedValue {
         fn has_viewport_percentage(&self) -> bool {