author | Emilio Cobos Álvarez <emilio@crisal.io> |
Tue, 12 Mar 2019 17:50:55 +0100 | |
changeset 524576 | 52d4cd296bae3e17548385812d92c736c354928f |
parent 524575 | 0d875c3ec155799e7bf41be3a9b0ee0ca856e333 |
child 524577 | 4f66d73a9466c86797238dca29fe4f9d7ffdde14 |
push id | 2032 |
push user | ffxbld-merge |
push date | Mon, 13 May 2019 09:36:57 +0000 |
treeherder | mozilla-release@455c1065dcbe [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1534726 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/servo/components/style/properties/properties.mako.rs +++ b/servo/components/style/properties/properties.mako.rs @@ -2586,16 +2586,17 @@ pub mod style_structs { } % endif % endfor % if style_struct.name == "Border": % for side in ["top", "right", "bottom", "left"]: /// 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 % elif style_struct.name == "Font": /// Computes a font hash in order to be able to cache fonts /// effectively in GFX and layout. pub fn compute_font_hash(&mut self) { // Corresponds to the fields in @@ -2625,16 +2626,17 @@ pub mod style_structs { /// (Servo does not handle MathML, so this does nothing) pub fn apply_unconstrained_font_size(&mut self, _: NonNegativeLength) { } % elif style_struct.name == "Outline": /// 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": /// Whether the text decoration has an underline. #[inline] pub fn has_underline(&self) -> bool { self.text_decoration_line.contains(longhands::text_decoration_line::SpecifiedValue::UNDERLINE) } @@ -2719,21 +2721,17 @@ pub mod style_structs { self.transition_duration_iter() .take(self.transition_property_count()) .any(|t| t.seconds() > 0.) } % elif style_struct.name == "Column": /// 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 } % for longhand in style_struct.longhands: % if longhand.need_index: /// An iterator over the values of the ${longhand.name} properties. pub struct ${longhand.camel_case}Iter<'a> {
--- a/servo/components/style/values/computed/text.rs +++ b/servo/components/style/values/computed/text.rs @@ -33,17 +33,17 @@ pub type InitialLetter = GenericInitialL ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToAnimatedZero, )] -pub struct LetterSpacing(Length); +pub struct LetterSpacing(pub Length); impl LetterSpacing { /// Return the `normal` computed value, which is just zero. #[inline] pub fn normal() -> Self { LetterSpacing(Length::zero()) } }
--- a/servo/components/style/values/specified/text.rs +++ b/servo/components/style/values/specified/text.rs @@ -831,16 +831,17 @@ impl From<TextEmphasisPosition> for u8 { pub enum WordBreak { Normal, BreakAll, KeepAll, /// The break-word value, needed for compat. /// /// Specifying `word-break: break-word` makes `overflow-wrap` behave as /// `anywhere`, and `word-break` behave like `normal`. + #[cfg(feature = "gecko")] BreakWord, } /// Values for the `overflow-wrap` property. #[repr(u8)] #[derive( Clone, Copy,