diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 70363eba25c..967ffa21972 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2204,7 +2204,7 @@ fn static_assert() { <%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"> + -webkit-text-stroke-width text-emphasis-position"> <% text_align_keyword = Keyword("text-align", "start end left right center justify -moz-center -moz-left " + "-moz-right match-parent") %> @@ -2310,6 +2310,26 @@ fn static_assert() { } } + pub fn set_text_emphasis_position(&mut self, v: longhands::text_emphasis_position::computed_value::T) { + use properties::longhands::text_emphasis_position::*; + + let mut result = match v.0 { + HorizontalWritingModeValue::Over => structs::NS_STYLE_TEXT_EMPHASIS_POSITION_OVER as u8, + HorizontalWritingModeValue::Under => structs::NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER as u8, + }; + match v.1 { + VerticalWritingModeValue::Right => { + result |= structs::NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT as u8; + } + VerticalWritingModeValue::Left => { + result |= structs::NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT as u8; + } + } + self.gecko.mTextEmphasisPosition = result; + } + + <%call expr="impl_simple_copy('text_emphasis_position', 'mTextEmphasisPosition')"> + pub fn set_text_emphasis_style(&mut self, v: longhands::text_emphasis_style::computed_value::T) { use nsstring::nsCString; use properties::longhands::text_emphasis_style::computed_value::T; diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs index 335ad1f1ca1..0a4d7a90632 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -973,7 +973,7 @@ ${helpers.single_keyword("text-align-last", } -<%helpers:longhand name="text-emphasis-position" animatable="False" products="none" +<%helpers:longhand name="text-emphasis-position" animatable="False" products="gecko" spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-position"> use std::fmt; use values::computed::ComputedValueAsSpecified; @@ -1070,6 +1070,7 @@ ${helpers.predefined_type( } + // CSS Ruby Layout Module Level 1 // https://drafts.csswg.org/css-ruby/ ${helpers.single_keyword("ruby-align", "start center space-between space-around",