Auto merge of #11127 - heycam:text-align, r=bholley

Support text-align in geckolib.

We don't yet support the 'unsafe' keyword, which isn't in a spec yet, and which would require slightly more complex parsing.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11127)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-11 22:53:56 -07:00
commit f12869d2a7
3 changed files with 17 additions and 1 deletions

View file

@ -535,7 +535,7 @@ pub const NS_STYLE_RESIZE_NONE: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_RESIZE_BOTH: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_RESIZE_HORIZONTAL: ::std::os::raw::c_uint = 2;
pub const NS_STYLE_RESIZE_VERTICAL: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_TEXT_ALIGN_DEFAULT: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_TEXT_ALIGN_START: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_TEXT_ALIGN_LEFT: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_TEXT_ALIGN_RIGHT: ::std::os::raw::c_uint = 2;
pub const NS_STYLE_TEXT_ALIGN_CENTER: ::std::os::raw::c_uint = 3;

View file

@ -667,6 +667,15 @@ fn static_assert() {
</%self:impl_trait>
<%self:impl_trait style_struct_name="InheritedText"
skip_longhands="text-align">
<% text_align_keyword = Keyword("text-align", "start end left right center justify -moz-center -moz-left " +
"-moz-right match-parent") %>
<%call expr="impl_keyword('text_align', 'mTextAlign', text_align_keyword, need_clone=False)"></%call>
</%self:impl_trait>
<%self:impl_trait style_struct_name="Text"
skip_longhands="text-decoration-color"
skip_additionals="*">