style: Correctly handle Gecko prefixed text-align values in property glue.

This commit is contained in:
Cameron McCormack 2017-05-01 13:34:52 +08:00
parent c71d97ae5e
commit 2296649b5c

View file

@ -3249,13 +3249,12 @@ fn static_assert() {
skip_longhands="text-align text-emphasis-style text-shadow line-height letter-spacing word-spacing 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"> -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 " + <% text_align_keyword = Keyword("text-align",
"-moz-right char") %> "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") %> <% 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)} ${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 ${impl_keyword_clone('text_align', 'mTextAlign', text_align_keyword)}
// constants removed
${impl_keyword_clone('text_align', 'mTextAlign', text_align_reachable_keyword)}
pub fn set_text_shadow(&mut self, v: longhands::text_shadow::computed_value::T) { 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); self.gecko.mTextShadow.replace_with_new(v.0.len() as u32);