From a65925cb855d8e8bd82c3b7dc4b8158c9a1a673d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 12 Mar 2019 17:50:55 +0100 Subject: [PATCH] style: Fix servo build. --- components/style/properties/properties.mako.rs | 8 +++----- components/style/values/computed/text.rs | 2 +- components/style/values/specified/text.rs | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 73965f90a3c..0153d6fe336 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -2591,6 +2591,7 @@ pub mod style_structs { /// Whether the border-${side} property has nonzero width. #[allow(non_snake_case)] pub fn border_${side}_has_nonzero_width(&self) -> bool { + use crate::Zero; !self.border_${side}_width.is_zero() } % endfor @@ -2630,6 +2631,7 @@ pub mod style_structs { /// Whether the outline-width property is non-zero. #[inline] pub fn outline_has_nonzero_width(&self) -> bool { + use crate::Zero; !self.outline_width.is_zero() } % elif style_struct.name == "Text": @@ -2724,11 +2726,7 @@ pub mod style_structs { /// Whether this is a multicol style. #[cfg(feature = "servo")] pub fn is_multicol(&self) -> bool { - use crate::values::Either; - match self.column_width { - Either::First(_width) => true, - Either::Second(_auto) => !self.column_count.is_auto(), - } + !self.column_width.is_auto() || !self.column_count.is_auto() } % endif } diff --git a/components/style/values/computed/text.rs b/components/style/values/computed/text.rs index 65b694c5057..911891bf33b 100644 --- a/components/style/values/computed/text.rs +++ b/components/style/values/computed/text.rs @@ -38,7 +38,7 @@ pub type InitialLetter = GenericInitialLetter; ToAnimatedValue, ToAnimatedZero, )] -pub struct LetterSpacing(Length); +pub struct LetterSpacing(pub Length); impl LetterSpacing { /// Return the `normal` computed value, which is just zero. diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs index 33394857f68..883084e649a 100644 --- a/components/style/values/specified/text.rs +++ b/components/style/values/specified/text.rs @@ -836,6 +836,7 @@ pub enum WordBreak { /// /// Specifying `word-break: break-word` makes `overflow-wrap` behave as /// `anywhere`, and `word-break` behave like `normal`. + #[cfg(feature = "gecko")] BreakWord, }