Auto merge of #13473 - KiChjang:gecko-letter-spacing, r=Manishearth,Wafflespeanut

Support letter-spacing in stylo

Fixes #12823.

r? @Manishearth

**This needs to be tested!**

<!-- 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/13473)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-30 09:38:26 -05:00 committed by GitHub
commit f67e5e4004
2 changed files with 11 additions and 2 deletions

View file

@ -1459,7 +1459,7 @@ fn static_assert() {
<%self:impl_trait style_struct_name="InheritedText"
skip_longhands="text-align text-shadow line-height word-spacing">
skip_longhands="text-align text-shadow line-height letter-spacing word-spacing">
<% text_align_keyword = Keyword("text-align", "start end left right center justify -moz-center -moz-left " +
"-moz-right match-parent") %>
@ -1538,6 +1538,15 @@ fn static_assert() {
<%call expr="impl_coord_copy('line_height', 'mLineHeight')"></%call>
pub fn set_letter_spacing(&mut self, v: longhands::letter_spacing::computed_value::T) {
match v.0 {
Some(au) => self.gecko.mLetterSpacing.set_value(CoordDataValue::Coord(au.0)),
None => self.gecko.mLetterSpacing.set_value(CoordDataValue::Normal)
}
}
<%call expr="impl_coord_copy('letter_spacing', 'mLetterSpacing')"></%call>
pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) {
use values::computed::LengthOrPercentage::*;

View file

@ -208,7 +208,7 @@
</%helpers:longhand>
// FIXME: This prop should be animatable.
<%helpers:longhand name="letter-spacing" products="servo" animatable="False">
<%helpers:longhand name="letter-spacing" animatable="False">
use cssparser::ToCss;
use std::fmt;
use values::LocalToCss;