style: Correctly handle Gecko prefixed text-align values in property glue. draft
authorCameron McCormack <cam@mcc.id.au>
Mon, 01 May 2017 13:34:52 +0800
changeset 570817 0d18304984783b1ec6b12bbaf71622508ea8d867
parent 570775 5278e2a35fc8f2be390243db1e62858bf0982055
child 570818 bfe70e959c9efec54ec32ea26016a9e3ded28bf4
push id56589
push userbmo:cam@mcc.id.au
push dateMon, 01 May 2017 05:35:23 +0000
milestone55.0a1
style: Correctly handle Gecko prefixed text-align values in property glue. MozReview-Commit-ID: FpHHQReCm44
servo/components/style/properties/gecko.mako.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -3266,23 +3266,22 @@ fn static_assert() {
     }
 </%self:impl_trait>
 
 
 <%self:impl_trait style_struct_name="InheritedText"
                   skip_longhands="text-align text-emphasis-style text-shadow line-height letter-spacing word-spacing
                                   -webkit-text-stroke-width text-emphasis-position -moz-tab-size -moz-text-size-adjust">
 
-    <% text_align_keyword = Keyword("text-align", "start end left right center justify -moz-center -moz-left " +
-                                                  "-moz-right char") %>
+    <% text_align_keyword = Keyword("text-align",
+                                    "start end left right center justify -moz-center -moz-left -moz-right char",
+                                    gecko_strip_moz_prefix=False) %>
     <% text_align_reachable_keyword = Keyword("text-align", "start end left right center justify char") %>
     ${impl_keyword('text_align', 'mTextAlign', text_align_keyword, need_clone=False)}
-    // Stable rust errors on unreachable patterns, and there is overlap, so we run with the overlapping
-    // constants removed
-    ${impl_keyword_clone('text_align', 'mTextAlign', text_align_reachable_keyword)}
+    ${impl_keyword_clone('text_align', 'mTextAlign', text_align_keyword)}
 
     pub fn set_text_shadow(&mut self, v: longhands::text_shadow::computed_value::T) {
         self.gecko.mTextShadow.replace_with_new(v.0.len() as u32);
 
         for (servo, gecko_shadow) in v.0.into_iter()
                                       .zip(self.gecko.mTextShadow.iter_mut()) {
 
             gecko_shadow.mXOffset = servo.offset_x.0;