diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs index cca68b120f9..c71e158d597 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -136,9 +136,16 @@ right("right") => 3, center("center") => 4, justify("justify") => 5, + % if product == "servo": servo_center("-servo-center") => 6, servo_left("-servo-left") => 7, servo_right("-servo-right") => 8, + % else: + _moz_center("-moz-center") => 6, + _moz_left("-moz-left") => 7, + _moz_right("-moz-right") => 8, + match_parent("match-parent") => 9, + % endif } } #[inline] pub fn get_initial_value() -> computed_value::T { diff --git a/ports/geckolib/gecko_bindings/structs.rs b/ports/geckolib/gecko_bindings/structs.rs index 0f80898c824..9d0aeb77ddb 100644 --- a/ports/geckolib/gecko_bindings/structs.rs +++ b/ports/geckolib/gecko_bindings/structs.rs @@ -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; diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index d78f53a50cf..6c21856cf60 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -667,6 +667,15 @@ fn static_assert() { +<%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)"> + + + <%self:impl_trait style_struct_name="Text" skip_longhands="text-decoration-color" skip_additionals="*">