Bug 1348615 - [stylo] gecko glue code for text-size-adjust.
MozReview-Commit-ID: 4QyFX1gRUCT
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -2601,17 +2601,17 @@ fn static_assert() {
self.gecko.mBorderSpacingRow = other.gecko.mBorderSpacingRow;
}
</%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">
+ -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 match-parent char") %>
${impl_keyword('text_align', 'mTextAlign', text_align_keyword, need_clone=False)}
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);
@@ -2784,16 +2784,20 @@ fn static_assert() {
Either::First(au) => {
self.gecko.mTabSize.set(au);
}
}
}
<%call expr="impl_coord_copy('_moz_tab_size', 'mTabSize')"></%call>
+ <% text_size_adjust_keyword = Keyword("text-size-adjust", "auto none") %>
+
+ ${impl_keyword('_moz_text_size_adjust', 'mTextSizeAdjust', text_size_adjust_keyword, need_clone=False)}
+
</%self:impl_trait>
<%self:impl_trait style_struct_name="Text"
skip_longhands="text-decoration-line text-overflow"
skip_additionals="*">
pub fn set_text_decoration_line(&mut self, v: longhands::text_decoration_line::computed_value::T) {
let mut bits: u8 = 0;
--- a/servo/components/style/properties/longhand/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_text.mako.rs
@@ -164,16 +164,23 @@
animatable=False,
spec="https://drafts.csswg.org/css-text/#propdef-text-transform")}
${helpers.single_keyword("hyphens", "manual none auto",
gecko_enum_prefix="StyleHyphens",
products="gecko", animatable=False, extra_prefixes="moz",
spec="https://drafts.csswg.org/css-text/#propdef-hyphens")}
+// TODO: Support <percentage>
+${helpers.single_keyword("-moz-text-size-adjust", "auto none",
+ gecko_constant_prefix="NS_STYLE_TEXT_SIZE_ADJUST",
+ products="gecko", animatable=False,
+ spec="https://drafts.csswg.org/css-size-adjust/#adjustment-control",
+ alias="-webkit-text-size-adjust")}
+
${helpers.predefined_type("text-indent",
"LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
animatable=True,
spec="https://drafts.csswg.org/css-text/#propdef-text-indent")}
// Also known as "word-wrap" (which is more popular because of IE), but this is the preferred
// name per CSS-TEXT 6.2.