Auto merge of #13751 - joewalker:font-kerning, r=Manishearth

Add support for 'font-kerning' in geckolib

Add support for 'font-kerning' in geckolib
These changes fix #13667

    $ ./mach build -d
    It looks like you passed an unrecognized argument into mach.

    $ ./mach test-tidy
    It looks like you are trying to run an unknown mach command: test-tidy

I'm clearly doing something wrong here, but I'm not sure what

- [x] These changes do not require tests because "[For stylo it's okay to not have tests since many of the reftests fail due to unrelated reasons](https://github.com/servo/servo/pull/13570#issuecomment-251354116)" :)

<!-- 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/13751)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-14 08:56:54 -05:00 committed by GitHub
commit b94f074b52

View file

@ -449,7 +449,7 @@ impl Debug for ${style_struct.gecko_struct_name} {
# These are currently being shuffled to a different style struct on the gecko side. # These are currently being shuffled to a different style struct on the gecko side.
force_stub += ["backface-visibility", "transform-box", "transform-style"] force_stub += ["backface-visibility", "transform-box", "transform-style"]
# These live in an nsFont member in Gecko. Should be straightforward to do manually. # These live in an nsFont member in Gecko. Should be straightforward to do manually.
force_stub += ["font-kerning", "font-variant"] force_stub += ["font-variant"]
# These have unusual representations in gecko. # These have unusual representations in gecko.
force_stub += ["list-style-type"] force_stub += ["list-style-type"]
# In a nsTArray, have to be done manually, but probably not too much work # In a nsTArray, have to be done manually, but probably not too much work
@ -739,7 +739,7 @@ fn static_assert() {
</%self:impl_trait> </%self:impl_trait>
<%self:impl_trait style_struct_name="Font" <%self:impl_trait style_struct_name="Font"
skip_longhands="font-family font-stretch font-style font-size font-weight" skip_longhands="font-family font-kerning font-stretch font-style font-size font-weight"
skip_additionals="*"> skip_additionals="*">
pub fn set_font_family(&mut self, v: longhands::font_family::computed_value::T) { pub fn set_font_family(&mut self, v: longhands::font_family::computed_value::T) {
@ -790,6 +790,11 @@ fn static_assert() {
Au(self.gecko.mSize) Au(self.gecko.mSize)
} }
<% kerning_keyword = Keyword("font-kerning", "auto normal none",
gecko_constant_prefix='NS_FONT_KERNING') %>
${impl_keyword('font_kerning', 'mFont.kerning', kerning_keyword, need_clone=False)}
<% stretch_keyword = Keyword("font-stretch", <% stretch_keyword = Keyword("font-stretch",
"normal ultra-condensed extra-condensed condensed " + "normal ultra-condensed extra-condensed condensed " +
"semi-condensed semi-expanded expanded " + "semi-condensed semi-expanded expanded " +