From 4398512c1226319379e91a9087ced3a83db99e7c Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Mon, 10 Oct 2016 19:31:06 -0700 Subject: [PATCH] Fix property warnings. MozReview-Commit-ID: BmT9CmbDZlX --- components/style/properties/gecko.mako.rs | 6 ++---- components/style/properties/longhand/effects.mako.rs | 6 +++--- components/style/properties/properties.mako.rs | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index add67265fdf..ae11a6ca23f 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1178,8 +1178,8 @@ fn static_assert() { use gecko_bindings::structs::{NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER}; use gecko_bindings::structs::{NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE, NS_STYLE_GRADIENT_SIZE_EXPLICIT_SIZE}; use gecko_bindings::structs::nsStyleCoord; - use values::computed::{Image, Gradient, GradientKind, GradientShape, Length, LengthOrKeyword}; - use values::computed::{LengthOrPercentage, LengthOrPercentageOrKeyword}; + use values::computed::{Image, Gradient, GradientKind, GradientShape, LengthOrKeyword}; + use values::computed::LengthOrPercentageOrKeyword; use values::specified::AngleOrCorner; use values::specified::{HorizontalDirection, SizeKeyword, VerticalDirection}; use cssparser::Color as CSSColor; @@ -1618,8 +1618,6 @@ fn static_assert() { <%call expr="impl_coord_copy('letter_spacing', 'mLetterSpacing')"> pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) { - use values::computed::LengthOrPercentage::*; - match v.0 { Some(lop) => self.gecko.mWordSpacing.set(lop), // https://drafts.csswg.org/css-text-3/#valdef-word-spacing-normal diff --git a/components/style/properties/longhand/effects.mako.rs b/components/style/properties/longhand/effects.mako.rs index 5e000b9105f..cd20aa1527d 100644 --- a/components/style/properties/longhand/effects.mako.rs +++ b/components/style/properties/longhand/effects.mako.rs @@ -1195,9 +1195,9 @@ ${helpers.predefined_type("opacity", pub struct OriginParseResult { - horizontal: Option, - vertical: Option, - depth: Option + pub horizontal: Option, + pub vertical: Option, + pub depth: Option } pub fn parse_origin(_: &ParserContext, input: &mut Parser) -> Result { diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index da734f41270..07ce9e128f8 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -30,7 +30,7 @@ use logical_geometry::WritingMode; use parser::{ParserContext, ParserContextExtraData}; use selector_matching::{ApplicableDeclarationBlock, ApplicableDeclarationBlockReadGuard}; use stylesheets::Origin; -use values::LocalToCss; +#[cfg(feature = "servo")] use values::LocalToCss; use values::HasViewportPercentage; use values::computed::{self, ToComputedValue}; use cascade_info::CascadeInfo;