diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs index e671a12344e..51a1bf2795f 100644 --- a/components/gfx/paint_context.rs +++ b/components/gfx/paint_context.rs @@ -222,8 +222,8 @@ impl<'a> PaintContext<'a> { // conforming implementation of `crisp-edges`, but it is not the best we could do. // Something like Scale2x would be ideal. let draw_surface_filter = match image_rendering { - image_rendering::T::Auto => Filter::Linear, - image_rendering::T::CrispEdges | image_rendering::T::Pixelated => Filter::Point, + image_rendering::T::auto => Filter::Linear, + image_rendering::T::crispedges | image_rendering::T::pixelated => Filter::Point, }; let draw_surface_options = DrawSurfaceOptions::new(draw_surface_filter, true); diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index c62518a9977..91b70ebed34 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -1331,7 +1331,7 @@ impl FragmentDisplayListBuilding for Fragment { }, stretch_size: stacking_relative_content_box.size, tile_spacing: Size2D::zero(), - image_rendering: image_rendering::T::Auto, + image_rendering: image_rendering::T::auto, }) } CanvasData::WebGL(context_id) => { diff --git a/components/layout/webrender_helpers.rs b/components/layout/webrender_helpers.rs index e18eeeb5fb9..9ec470e1b7f 100644 --- a/components/layout/webrender_helpers.rs +++ b/components/layout/webrender_helpers.rs @@ -218,9 +218,9 @@ trait ToImageRendering { impl ToImageRendering for image_rendering::T { fn to_image_rendering(&self) -> webrender_traits::ImageRendering { match *self { - image_rendering::T::CrispEdges => webrender_traits::ImageRendering::CrispEdges, - image_rendering::T::Auto => webrender_traits::ImageRendering::Auto, - image_rendering::T::Pixelated => webrender_traits::ImageRendering::Pixelated, + image_rendering::T::crispedges => webrender_traits::ImageRendering::CrispEdges, + image_rendering::T::auto => webrender_traits::ImageRendering::Auto, + image_rendering::T::pixelated => webrender_traits::ImageRendering::Pixelated, } } } diff --git a/components/style/properties/longhand/inherited_box.mako.rs b/components/style/properties/longhand/inherited_box.mako.rs index 26abe0bb5d8..b267abd77b0 100644 --- a/components/style/properties/longhand/inherited_box.mako.rs +++ b/components/style/properties/longhand/inherited_box.mako.rs @@ -45,20 +45,21 @@ ${helpers.single_keyword("color-adjust", use cssparser::ToCss; use std::fmt; + #[allow(non_camel_case_types)] #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))] pub enum T { - Auto, - CrispEdges, - Pixelated, + auto, + crispedges, + pixelated, } impl ToCss for T { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { match *self { - T::Auto => dest.write_str("auto"), - T::CrispEdges => dest.write_str("crisp-edges"), - T::Pixelated => dest.write_str("pixelated"), + T::auto => dest.write_str("auto"), + T::crispedges => dest.write_str("crisp-edges"), + T::pixelated => dest.write_str("pixelated"), } } } @@ -71,7 +72,7 @@ ${helpers.single_keyword("color-adjust", #[inline] pub fn get_initial_value() -> computed_value::T { - computed_value::T::Auto + computed_value::T::auto } pub fn parse(_: &ParserContext, input: &mut Parser) -> Result { @@ -79,11 +80,11 @@ ${helpers.single_keyword("color-adjust", // `auto`. match_ignore_ascii_case! { try!(input.expect_ident()), - "auto" => Ok(computed_value::T::Auto), - "optimizespeed" => Ok(computed_value::T::Auto), - "optimizequality" => Ok(computed_value::T::Auto), - "crisp-edges" => Ok(computed_value::T::CrispEdges), - "pixelated" => Ok(computed_value::T::Pixelated), + "auto" => Ok(computed_value::T::auto), + "optimizespeed" => Ok(computed_value::T::auto), + "optimizequality" => Ok(computed_value::T::auto), + "crisp-edges" => Ok(computed_value::T::crispedges), + "pixelated" => Ok(computed_value::T::pixelated), _ => Err(()) } }