aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-05-20 20:10:11 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-05-20 20:12:30 +0200
commitfade636ebeab55e9e7158a25abf117d86dad2130 (patch)
treee0fd9c3d8d09336c50d2fda5ddae33d2eec2e925
parent34722c3de93264c442dc8621c630e65340a3ca9a (diff)
downloadservo-fade636ebeab55e9e7158a25abf117d86dad2130.tar.gz
servo-fade636ebeab55e9e7158a25abf117d86dad2130.zip
style: Fix Gecko build after #20506.
-rw-r--r--components/style/properties/gecko.mako.rs10
-rw-r--r--components/style/properties/longhand/font.mako.rs6
2 files changed, 11 insertions, 5 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs
index b86a59fc6e5..3d9a8e579af 100644
--- a/components/style/properties/gecko.mako.rs
+++ b/components/style/properties/gecko.mako.rs
@@ -2607,10 +2607,16 @@ fn static_assert() {
}
pub fn set_font_stretch(&mut self, v: longhands::font_stretch::computed_value::T) {
- unsafe { bindings::Gecko_FontStretch_SetFloat(&mut self.gecko.mFont.stretch, (v.0).0) };
+ unsafe {
+ bindings::Gecko_FontStretch_SetFloat(
+ &mut self.gecko.mFont.stretch,
+ v.value(),
+ )
+ };
}
${impl_simple_copy('font_stretch', 'mFont.stretch')}
pub fn clone_font_stretch(&self) -> longhands::font_stretch::computed_value::T {
+ use values::computed::font::FontStretch;
use values::computed::Percentage;
use values::generics::NonNegative;
@@ -2618,7 +2624,7 @@ fn static_assert() {
unsafe { bindings::Gecko_FontStretch_ToFloat(self.gecko.mFont.stretch) };
debug_assert!(stretch >= 0.);
- NonNegative(Percentage(stretch))
+ FontStretch(NonNegative(Percentage(stretch)))
}
pub fn set_font_style(&mut self, v: longhands::font_style::computed_value::T) {
diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs
index 0dca4a4c67e..69f95532c16 100644
--- a/components/style/properties/longhand/font.mako.rs
+++ b/components/style/properties/longhand/font.mako.rs
@@ -335,7 +335,7 @@ ${helpers.predefined_type("-x-text-zoom",
use gecko_bindings::structs::{LookAndFeel_FontID, nsFont};
use std::mem;
use values::computed::Percentage;
- use values::computed::font::{FontSize, FontStyle, FontFamilyList};
+ use values::computed::font::{FontSize, FontStretch, FontStyle, FontFamilyList};
use values::generics::NonNegative;
let id = match *self {
@@ -356,9 +356,9 @@ ${helpers.predefined_type("-x-text-zoom",
)
}
let font_weight = longhands::font_weight::computed_value::T::from_gecko_weight(system.weight);
- let font_stretch = NonNegative(Percentage(unsafe {
+ let font_stretch = FontStretch(NonNegative(Percentage(unsafe {
bindings::Gecko_FontStretch_ToFloat(system.stretch)
- }));
+ })));
let font_style = FontStyle::from_gecko(system.style);
let ret = ComputedSystemFont {
font_family: longhands::font_family::computed_value::T(