diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-03-19 20:56:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-19 20:56:00 -0700 |
commit | 103e827948e4c3592ee93cbed8adf270588b559e (patch) | |
tree | 3d10c920379484bc920e9b5346f01cd29cadb1e8 | |
parent | 8d25dcb8b5f83728987171fe7a5b4905df741e58 (diff) | |
parent | 615c8cb5e62c8c910e3b4d3acd990b78f9fa0ffe (diff) | |
download | servo-103e827948e4c3592ee93cbed8adf270588b559e.tar.gz servo-103e827948e4c3592ee93cbed8adf270588b559e.zip |
Auto merge of #16036 - chenpighead:text-size-adjust, r=upsuper
Stylo: Add support for text-size-adjust property
<!-- Please describe your changes on the following line: -->
Gecko supports -{moz,webkit}-text-size-adjust properties, but it only supports auto and none value.
Implement parsing/serialization for text-size-adjust property and its gecko glue.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16002 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16036)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/properties/gecko.mako.rs | 6 | ||||
-rw-r--r-- | components/style/properties/longhand/inherited_text.mako.rs | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 65f6c3c73a1..35ef4a1f004 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2606,7 +2606,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 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") %> @@ -2789,6 +2789,10 @@ fn static_assert() { <%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" diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs index 1e3a2ea7024..3739b6f3921 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -169,6 +169,13 @@ ${helpers.single_keyword("hyphens", "manual none auto", 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))", |