Make letter-spacing animatable.

From the spec: 'normal' value computes to zero.
This commit is contained in:
Hiroyuki Ikezoe 2017-04-06 08:30:11 +09:00
parent b89dc6a08c
commit b801e07ec5
2 changed files with 33 additions and 2 deletions

View file

@ -2882,6 +2882,15 @@ fn static_assert() {
}
}
pub fn clone_letter_spacing(&self) -> longhands::letter_spacing::computed_value::T {
use properties::longhands::letter_spacing::computed_value::T;
match self.gecko.mLetterSpacing.as_value() {
CoordDataValue::Normal => T(None),
CoordDataValue::Coord(coord) => T(Some(Au(coord))),
_ => unreachable!("Unexpected computed value for letter-spacing"),
}
}
<%call expr="impl_coord_copy('letter_spacing', 'mLetterSpacing')"></%call>
pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) {