aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/properties/gecko.mako.rs11
-rw-r--r--components/style/properties/longhand/inherited_text.mako.rs2
2 files changed, 11 insertions, 2 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs
index f4a507dfb7a..45b5d5fd13a 100644
--- a/components/style/properties/gecko.mako.rs
+++ b/components/style/properties/gecko.mako.rs
@@ -1444,7 +1444,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") %>
@@ -1523,6 +1523,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::*;
diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs
index b2f856059bb..b7254d94561 100644
--- a/components/style/properties/longhand/inherited_text.mako.rs
+++ b/components/style/properties/longhand/inherited_text.mako.rs
@@ -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;