Bug 1506391 - Use 2018-style paths in code generated by Mako. r=emilio
authorSimon Sapin <simon.sapin@exyr.org>
Thu, 01 Nov 2018 11:50:25 +0100
changeset 1755874 cac08ebe30b019083431ffe29d5282891df97a80
parent 1755873 5015facddfdf27194ea3ba9039e6de4453feb20c
child 1755875 f3d03eaccc5862b764f0850170a875b036848c4f
push id314122
push useramarchesini@mozilla.com
push dateSun, 11 Nov 2018 10:27:41 +0000
treeherdertry@07e5a8723776 [default view] [failures only]
reviewersemilio
bugs1506391
milestone65.0a1
Bug 1506391 - Use 2018-style paths in code generated by Mako. r=emilio
servo/components/style/gecko/pseudo_element_definition.mako.rs
servo/components/style/properties/data.py
servo/components/style/properties/gecko.mako.rs
servo/components/style/properties/helpers.mako.rs
servo/components/style/properties/helpers/animated_properties.mako.rs
servo/components/style/properties/longhands/border.mako.rs
servo/components/style/properties/longhands/color.mako.rs
servo/components/style/properties/longhands/column.mako.rs
servo/components/style/properties/longhands/font.mako.rs
servo/components/style/properties/longhands/inherited_svg.mako.rs
servo/components/style/properties/longhands/inherited_text.mako.rs
servo/components/style/properties/longhands/outline.mako.rs
servo/components/style/properties/longhands/position.mako.rs
servo/components/style/properties/properties.mako.rs
servo/components/style/properties/shorthands/background.mako.rs
servo/components/style/properties/shorthands/border.mako.rs
servo/components/style/properties/shorthands/box.mako.rs
servo/components/style/properties/shorthands/column.mako.rs
servo/components/style/properties/shorthands/font.mako.rs
servo/components/style/properties/shorthands/inherited_svg.mako.rs
servo/components/style/properties/shorthands/inherited_text.mako.rs
servo/components/style/properties/shorthands/list.mako.rs
servo/components/style/properties/shorthands/outline.mako.rs
servo/components/style/properties/shorthands/position.mako.rs
servo/components/style/properties/shorthands/svg.mako.rs
servo/components/style/properties/shorthands/text.mako.rs
--- a/servo/components/style/gecko/pseudo_element_definition.mako.rs
+++ b/servo/components/style/gecko/pseudo_element_definition.mako.rs
@@ -151,17 +151,17 @@ impl PseudoElement {
             % endfor
             _ => None,
         }
     }
 
     /// Construct a `CSSPseudoElementType` from a pseudo-element
     #[inline]
     fn pseudo_type(&self) -> CSSPseudoElementType {
-        use gecko_bindings::structs::CSSPseudoElementType_InheritingAnonBox;
+        use crate::gecko_bindings::structs::CSSPseudoElementType_InheritingAnonBox;
 
         match *self {
             % for pseudo in PSEUDOS:
                 % if not pseudo.is_anon_box():
                     PseudoElement::${pseudo.capitalized_pseudo()} => CSSPseudoElementType::${pseudo.pseudo_ident},
                 % elif pseudo.is_tree_pseudo_element():
                     PseudoElement::${pseudo.capitalized_pseudo()}(..) => CSSPseudoElementType::XULTree,
                 % elif pseudo.is_inheriting_anon_box():
--- a/servo/components/style/properties/data.py
+++ b/servo/components/style/properties/data.py
@@ -265,22 +265,22 @@ class Longhand(object):
 
     def may_be_disabled_in(self, shorthand, product):
         if product == "gecko":
             return self.gecko_pref and self.gecko_pref != shorthand.gecko_pref
         return self.servo_pref and self.servo_pref != shorthand.servo_pref
 
     def base_type(self):
         if self.predefined_type and not self.is_vector:
-            return "::values::specified::{}".format(self.predefined_type)
+            return "crate::values::specified::{}".format(self.predefined_type)
         return "longhands::{}::SpecifiedValue".format(self.ident)
 
     def specified_type(self):
         if self.predefined_type and not self.is_vector:
-            ty = "::values::specified::{}".format(self.predefined_type)
+            ty = "crate::values::specified::{}".format(self.predefined_type)
         else:
             ty = "longhands::{}::SpecifiedValue".format(self.ident)
         if self.boxed:
             ty = "Box<{}>".format(ty)
         return ty
 
     def specified_is_copy(self):
         if self.is_vector or self.boxed:
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -5,85 +5,85 @@
 // `data` comes from components/style/properties.mako.rs; see build.rs for more details.
 
 <%!
     from data import to_camel_case, to_camel_case_lower
     from data import Keyword
 %>
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
-use Atom;
+use crate::Atom;
 use app_units::Au;
-use custom_properties::CustomPropertiesMap;
-use gecko_bindings::bindings;
+use crate::custom_properties::CustomPropertiesMap;
+use crate::gecko_bindings::bindings;
 % for style_struct in data.style_structs:
-use gecko_bindings::structs::${style_struct.gecko_ffi_name};
-use gecko_bindings::bindings::Gecko_Construct_Default_${style_struct.gecko_ffi_name};
-use gecko_bindings::bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name};
-use gecko_bindings::bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
+use crate::gecko_bindings::structs::${style_struct.gecko_ffi_name};
+use crate::gecko_bindings::bindings::Gecko_Construct_Default_${style_struct.gecko_ffi_name};
+use crate::gecko_bindings::bindings::Gecko_CopyConstruct_${style_struct.gecko_ffi_name};
+use crate::gecko_bindings::bindings::Gecko_Destroy_${style_struct.gecko_ffi_name};
 % endfor
-use gecko_bindings::bindings::Gecko_CopyCounterStyle;
-use gecko_bindings::bindings::Gecko_CopyCursorArrayFrom;
-use gecko_bindings::bindings::Gecko_CopyFontFamilyFrom;
-use gecko_bindings::bindings::Gecko_CopyImageValueFrom;
-use gecko_bindings::bindings::Gecko_CopyListStyleImageFrom;
-use gecko_bindings::bindings::Gecko_EnsureImageLayersLength;
-use gecko_bindings::bindings::Gecko_SetCursorArrayLength;
-use gecko_bindings::bindings::Gecko_SetCursorImageValue;
-use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
-use gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
-use gecko_bindings::bindings::Gecko_nsStyleFont_CopyLangFrom;
-use gecko_bindings::bindings::Gecko_SetListStyleImageNone;
-use gecko_bindings::bindings::Gecko_SetListStyleImageImageValue;
-use gecko_bindings::bindings::Gecko_SetNullImageValue;
-use gecko_bindings::bindings::{Gecko_ResetFilters, Gecko_CopyFiltersFrom};
-use gecko_bindings::bindings::RawGeckoPresContextBorrowed;
-use gecko_bindings::structs;
-use gecko_bindings::structs::nsCSSPropertyID;
-use gecko_bindings::structs::mozilla::CSSPseudoElementType;
-use gecko_bindings::structs::mozilla::CSSPseudoElementType_InheritingAnonBox;
-use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
-use gecko_bindings::sugar::refptr::RefPtr;
-use gecko::values::convert_nscolor_to_rgba;
-use gecko::values::convert_rgba_to_nscolor;
-use gecko::values::GeckoStyleCoordConvertible;
-use gecko::values::round_border_to_device_pixels;
-use logical_geometry::WritingMode;
-use media_queries::Device;
-use properties::computed_value_flags::*;
-use properties::longhands;
-use rule_tree::StrongRuleNode;
-use selector_parser::PseudoElement;
+use crate::gecko_bindings::bindings::Gecko_CopyCounterStyle;
+use crate::gecko_bindings::bindings::Gecko_CopyCursorArrayFrom;
+use crate::gecko_bindings::bindings::Gecko_CopyFontFamilyFrom;
+use crate::gecko_bindings::bindings::Gecko_CopyImageValueFrom;
+use crate::gecko_bindings::bindings::Gecko_CopyListStyleImageFrom;
+use crate::gecko_bindings::bindings::Gecko_EnsureImageLayersLength;
+use crate::gecko_bindings::bindings::Gecko_SetCursorArrayLength;
+use crate::gecko_bindings::bindings::Gecko_SetCursorImageValue;
+use crate::gecko_bindings::bindings::Gecko_NewCSSShadowArray;
+use crate::gecko_bindings::bindings::Gecko_nsStyleFont_SetLang;
+use crate::gecko_bindings::bindings::Gecko_nsStyleFont_CopyLangFrom;
+use crate::gecko_bindings::bindings::Gecko_SetListStyleImageNone;
+use crate::gecko_bindings::bindings::Gecko_SetListStyleImageImageValue;
+use crate::gecko_bindings::bindings::Gecko_SetNullImageValue;
+use crate::gecko_bindings::bindings::{Gecko_ResetFilters, Gecko_CopyFiltersFrom};
+use crate::gecko_bindings::bindings::RawGeckoPresContextBorrowed;
+use crate::gecko_bindings::structs;
+use crate::gecko_bindings::structs::nsCSSPropertyID;
+use crate::gecko_bindings::structs::mozilla::CSSPseudoElementType;
+use crate::gecko_bindings::structs::mozilla::CSSPseudoElementType_InheritingAnonBox;
+use crate::gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
+use crate::gecko_bindings::sugar::refptr::RefPtr;
+use crate::gecko::values::convert_nscolor_to_rgba;
+use crate::gecko::values::convert_rgba_to_nscolor;
+use crate::gecko::values::GeckoStyleCoordConvertible;
+use crate::gecko::values::round_border_to_device_pixels;
+use crate::logical_geometry::WritingMode;
+use crate::media_queries::Device;
+use crate::properties::computed_value_flags::*;
+use crate::properties::longhands;
+use crate::rule_tree::StrongRuleNode;
+use crate::selector_parser::PseudoElement;
 use servo_arc::{Arc, RawOffsetArc};
 use std::marker::PhantomData;
 use std::mem::{forget, uninitialized, transmute, zeroed};
 use std::{cmp, ops, ptr};
-use values::{self, CustomIdent, Either, KeyframesName, None_};
-use values::computed::{NonNegativeLength, Percentage, TransitionProperty};
-use values::computed::font::FontSize;
-use values::computed::effects::{BoxShadow, Filter, SimpleShadow};
-use values::computed::outline::OutlineStyle;
-use values::generics::column::ColumnCount;
-use values::generics::position::ZIndex;
-use values::generics::text::MozTabSize;
-use values::generics::transform::TransformStyle;
-use values::generics::url::UrlOrNone;
-use computed_values::border_style;
+use crate::values::{self, CustomIdent, Either, KeyframesName, None_};
+use crate::values::computed::{NonNegativeLength, Percentage, TransitionProperty};
+use crate::values::computed::font::FontSize;
+use crate::values::computed::effects::{BoxShadow, Filter, SimpleShadow};
+use crate::values::computed::outline::OutlineStyle;
+use crate::values::generics::column::ColumnCount;
+use crate::values::generics::position::ZIndex;
+use crate::values::generics::text::MozTabSize;
+use crate::values::generics::transform::TransformStyle;
+use crate::values::generics::url::UrlOrNone;
+use crate::computed_values::border_style;
 
 pub mod style_structs {
     % for style_struct in data.style_structs:
     pub use super::${style_struct.gecko_struct_name} as ${style_struct.name};
     % endfor
 }
 
 /// FIXME(emilio): This is completely duplicated with the other properties code.
-pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedData;
+pub type ComputedValuesInner = crate::gecko_bindings::structs::ServoComputedData;
 
 #[repr(C)]
-pub struct ComputedValues(::gecko_bindings::structs::mozilla::ComputedStyle);
+pub struct ComputedValues(crate::gecko_bindings::structs::mozilla::ComputedStyle);
 
 impl ComputedValues {
     pub fn new(
         device: &Device,
         pseudo: Option<<&PseudoElement>,
         custom_properties: Option<Arc<CustomPropertiesMap>>,
         writing_mode: WritingMode,
         flags: ComputedValueFlags,
@@ -143,17 +143,17 @@ impl ComputedValues {
                our_type == CSSPseudoElementType::NonInheritingAnonBox;
     }
 
     /// Returns true if the display property is changed from 'none' to others.
     pub fn is_display_property_changed_from_none(
         &self,
         old_values: Option<<&ComputedValues>
     ) -> bool {
-        use properties::longhands::display::computed_value::T as Display;
+        use crate::properties::longhands::display::computed_value::T as Display;
 
         old_values.map_or(false, |old| {
             let old_display_style = old.get_box().clone_display();
             let new_display_style = self.get_box().clone_display();
             old_display_style == Display::None &&
             new_display_style != Display::None
         })
     }
@@ -303,17 +303,17 @@ impl ComputedValuesInner {
 
     #[allow(non_snake_case)]
     pub fn has_moz_binding(&self) -> bool {
         !self.get_box().gecko.mBinding.mRawPtr.is_null()
     }
 }
 
 <%def name="declare_style_struct(style_struct)">
-pub use ::gecko_bindings::structs::mozilla::Gecko${style_struct.gecko_name} as ${style_struct.gecko_struct_name};
+pub use crate::gecko_bindings::structs::mozilla::Gecko${style_struct.gecko_name} as ${style_struct.gecko_struct_name};
 impl ${style_struct.gecko_struct_name} {
     pub fn gecko(&self) -> &${style_struct.gecko_ffi_name} {
         &self.gecko
     }
     pub fn gecko_mut(&mut self) -> &mut ${style_struct.gecko_ffi_name} {
         &mut self.gecko
     }
 }
@@ -366,17 +366,17 @@ def get_gecko_property(ffi_name, self_pa
 
 def set_gecko_property(ffi_name, expr):
     return "self.gecko.%s = %s;" % (ffi_name, expr)
 %>
 
 <%def name="impl_keyword_setter(ident, gecko_ffi_name, keyword, cast_type='u8', on_set=None)">
     #[allow(non_snake_case)]
     pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
-        use properties::longhands::${ident}::computed_value::T as Keyword;
+        use crate::properties::longhands::${ident}::computed_value::T as Keyword;
         // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
         let result = match v {
             % for value in keyword.values_for('gecko'):
                 Keyword::${to_camel_case(value)} =>
                     structs::${keyword.gecko_constant(value)} ${keyword.maybe_cast(cast_type)},
             % endfor
         };
         ${set_gecko_property(gecko_ffi_name, "result")}
@@ -387,17 +387,17 @@ def set_gecko_property(ffi_name, expr):
 </%def>
 
 <%def name="impl_keyword_clone(ident, gecko_ffi_name, keyword, cast_type='u8')">
     // FIXME: We introduced non_upper_case_globals for -moz-appearance only
     //        since the prefix of Gecko value starts with ThemeWidgetType_NS_THEME.
     //        We should remove this after fix bug 1371809.
     #[allow(non_snake_case, non_upper_case_globals)]
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use properties::longhands::${ident}::computed_value::T as Keyword;
+        use crate::properties::longhands::${ident}::computed_value::T as Keyword;
         // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
 
         // Some constant macros in the gecko are defined as negative integer(e.g. font-stretch).
         // And they are convert to signed integer in Rust bindings. We need to cast then
         // as signed type when we have both signed/unsigned integer in order to use them
         // as match's arms.
         // Also, to use same implementation here we use casted constant if we have only singed values.
         % if keyword.gecko_enum_prefix is None:
@@ -513,18 +513,18 @@ def set_gecko_property(ffi_name, expr):
     }
 </%def>
 
 <%def name="impl_svg_length(ident, gecko_ffi_name)">
     // When context-value is used on an SVG length, the corresponding flag is
     // set on mContextFlags, and the length field is set to the initial value.
 
     pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
-        use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
-        use gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
+        use crate::values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
+        use crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
         let length = match v {
             SVGLength::Length(length) => {
                 self.gecko.mContextFlags &= !CONTEXT_VALUE;
                 length
             }
             SVGLength::ContextValue => {
                 self.gecko.mContextFlags |= CONTEXT_VALUE;
                 match longhands::${ident}::get_initial_value() {
@@ -537,31 +537,31 @@ def set_gecko_property(ffi_name, expr):
             SvgLengthOrPercentageOrNumber::LengthOrPercentage(lop) =>
                 self.gecko.${gecko_ffi_name}.set(lop),
             SvgLengthOrPercentageOrNumber::Number(num) =>
                 self.gecko.${gecko_ffi_name}.set_value(CoordDataValue::Factor(num.into())),
         }
     }
 
     pub fn copy_${ident}_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
+        use crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
         self.gecko.${gecko_ffi_name}.copy_from(&other.gecko.${gecko_ffi_name});
         self.gecko.mContextFlags =
             (self.gecko.mContextFlags & !CONTEXT_VALUE) |
             (other.gecko.mContextFlags & CONTEXT_VALUE);
     }
 
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
-        use values::computed::LengthOrPercentage;
-        use gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
+        use crate::values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
+        use crate::values::computed::LengthOrPercentage;
+        use crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
         if (self.gecko.mContextFlags & CONTEXT_VALUE) != 0 {
             return SVGLength::ContextValue;
         }
         let length = match self.gecko.${gecko_ffi_name}.as_value() {
             CoordDataValue::Factor(number) => {
                 SvgLengthOrPercentageOrNumber::Number(number)
             },
             CoordDataValue::Coord(coord) => {
@@ -584,20 +584,20 @@ def set_gecko_property(ffi_name, expr):
         SVGLength::Length(length.into())
     }
 </%def>
 
 <%def name="impl_svg_opacity(ident, gecko_ffi_name)">
     <% source_prefix = ident.split("_")[0].upper() + "_OPACITY_SOURCE" %>
 
     pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
-        use gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
-        use gecko_bindings::structs::nsStyleSVG_${source_prefix}_SHIFT as SHIFT;
-        use gecko_bindings::structs::nsStyleSVGOpacitySource::*;
-        use values::generics::svg::SVGOpacity;
+        use crate::gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
+        use crate::gecko_bindings::structs::nsStyleSVG_${source_prefix}_SHIFT as SHIFT;
+        use crate::gecko_bindings::structs::nsStyleSVGOpacitySource::*;
+        use crate::values::generics::svg::SVGOpacity;
         self.gecko.mContextFlags &= !MASK;
         match v {
             SVGOpacity::Opacity(opacity) => {
                 self.gecko.mContextFlags |=
                     (eStyleSVGOpacitySource_Normal as u8) << SHIFT;
                 self.gecko.${gecko_ffi_name} = opacity;
             }
             SVGOpacity::ContextFillOpacity => {
@@ -609,32 +609,32 @@ def set_gecko_property(ffi_name, expr):
                 self.gecko.mContextFlags |=
                     (eStyleSVGOpacitySource_ContextStrokeOpacity as u8) << SHIFT;
                 self.gecko.${gecko_ffi_name} = 1.;
             }
         }
     }
 
     pub fn copy_${ident}_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
+        use crate::gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
         self.gecko.${gecko_ffi_name} = other.gecko.${gecko_ffi_name};
         self.gecko.mContextFlags =
             (self.gecko.mContextFlags & !MASK) |
             (other.gecko.mContextFlags & MASK);
     }
 
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
-        use gecko_bindings::structs::nsStyleSVG_${source_prefix}_SHIFT as SHIFT;
-        use gecko_bindings::structs::nsStyleSVGOpacitySource::*;
-        use values::generics::svg::SVGOpacity;
+        use crate::gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
+        use crate::gecko_bindings::structs::nsStyleSVG_${source_prefix}_SHIFT as SHIFT;
+        use crate::gecko_bindings::structs::nsStyleSVGOpacitySource::*;
+        use crate::values::generics::svg::SVGOpacity;
 
         let source = (self.gecko.mContextFlags & MASK) >> SHIFT;
         if source == eStyleSVGOpacitySource_Normal as u8 {
             return SVGOpacity::Opacity(self.gecko.${gecko_ffi_name});
         } else {
             debug_assert_eq!(self.gecko.${gecko_ffi_name}, 1.0);
             if source == eStyleSVGOpacitySource_ContextFillOpacity as u8 {
                 SVGOpacity::ContextFillOpacity
@@ -644,17 +644,17 @@ def set_gecko_property(ffi_name, expr):
             }
         }
     }
 </%def>
 
 <%def name="impl_svg_paint(ident, gecko_ffi_name)">
     #[allow(non_snake_case)]
     pub fn set_${ident}(&mut self, mut v: longhands::${ident}::computed_value::T) {
-        use values::generics::svg::SVGPaintKind;
+        use crate::values::generics::svg::SVGPaintKind;
         use self::structs::nsStyleSVGPaintType;
         use self::structs::nsStyleSVGFallbackType;
 
         let ref mut paint = ${get_gecko_property(gecko_ffi_name)};
         unsafe {
             bindings::Gecko_nsStyleSVGPaint_Reset(paint);
         }
         let fallback = v.fallback.take();
@@ -706,18 +706,18 @@ def set_gecko_property(ffi_name, expr):
 
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use values::computed::url::ComputedUrl;
-        use values::generics::svg::{SVGPaint, SVGPaintKind};
+        use crate::values::computed::url::ComputedUrl;
+        use crate::values::generics::svg::{SVGPaint, SVGPaintKind};
         use self::structs::nsStyleSVGPaintType;
         use self::structs::nsStyleSVGFallbackType;
         let ref paint = ${get_gecko_property(gecko_ffi_name)};
 
         let fallback = match paint.mFallbackType {
             nsStyleSVGFallbackType::eStyleSVGFallbackType_Color => {
                 Some(Either::First(paint.mFallbackColor.into()))
             },
@@ -808,17 +808,17 @@ def set_gecko_property(ffi_name, expr):
     }
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use properties::longhands::${ident}::computed_value::T;
+        use crate::properties::longhands::${ident}::computed_value::T;
         T::from_gecko_style_coord(&self.gecko.${gecko_ffi_name}.data_at(${index}))
             .expect("clone for ${ident} failed")
     }
 </%def>
 
 <%def name="impl_style_coord(ident, gecko_ffi_name)">
     #[allow(non_snake_case)]
     pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
@@ -830,17 +830,17 @@ def set_gecko_property(ffi_name, expr):
     }
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use properties::longhands::${ident}::computed_value::T;
+        use crate::properties::longhands::${ident}::computed_value::T;
         T::from_gecko_style_coord(&self.gecko.${gecko_ffi_name})
             .expect("clone for ${ident} failed")
     }
 </%def>
 
 <%def name="impl_style_sides(ident)">
     <% gecko_ffi_name = "m" + to_camel_case(ident) %>
 
@@ -890,17 +890,17 @@ def set_gecko_property(ffi_name, expr):
     }
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use values::computed::border::BorderCornerRadius;
+        use crate::values::computed::border::BorderCornerRadius;
         let width = GeckoStyleCoordConvertible::from_gecko_style_coord(
                         &self.gecko.${gecko_ffi_name}.data_at(${x_index}))
                         .expect("Failed to clone ${ident}");
         let height = GeckoStyleCoordConvertible::from_gecko_style_coord(
                         &self.gecko.${gecko_ffi_name}.data_at(${y_index}))
                         .expect("Failed to clone ${ident}");
         BorderCornerRadius::new(width, height)
     }
@@ -928,17 +928,17 @@ def set_gecko_property(ffi_name, expr):
     }
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use values::computed::url::ComputedUrl;
+        use crate::values::computed::url::ComputedUrl;
 
         if self.gecko.${gecko_ffi_name}.mRawPtr.is_null() {
             return UrlOrNone::none()
         }
 
         UrlOrNone::Url(unsafe {
             ComputedUrl::from_url_value(self.gecko.${gecko_ffi_name}.to_safe())
         })
@@ -1007,17 +1007,17 @@ transform_functions = [
             "angle" : "%s.set_angle(%s)",
             "number" : "bindings::Gecko_CSSValue_SetNumber(%s, %s)",
             # Note: We use nsCSSValueSharedList here, instead of nsCSSValueList_heap
             #       because this function is not called on the main thread and
             #       nsCSSValueList_heap is not thread safe.
             "list" : "%s.set_shared_list(%s.0.iter().map(&convert_to_ns_css_value));",
         }
     %>
-    ::values::generics::transform::TransformOperation::${name}${pattern} => {
+    crate::values::generics::transform::TransformOperation::${name}${pattern} => {
         % if has_optional:
             let optional_present = ${items[-1] + str(len(items))}.is_some();
             let len = if optional_present {
                 ${len(items) + 1}
             } else {
                 ${len(items)}
             };
         % else:
@@ -1077,17 +1077,17 @@ transform_functions = [
         field_names = None
         if keyword == "interpolatematrix":
             field_names = ["from_list", "to_list", "progress"]
         elif keyword == "accumulatematrix":
             field_names = ["from_list", "to_list", "count"]
 
     %>
     structs::nsCSSKeyword::eCSSKeyword_${keyword} => {
-        ::values::generics::transform::TransformOperation::${name}${pre_symbols}
+        crate::values::generics::transform::TransformOperation::${name}${pre_symbols}
         % for index, item in enumerate(items):
             % if keyword == "matrix3d":
                 m${index / 4 + 1}${index % 4 + 1}:
             % elif keyword == "matrix":
                 ${chr(ord('a') + index)}:
             % elif keyword == "interpolatematrix" or keyword == "accumulatematrix":
                 ${field_names[index]}:
             % endif
@@ -1110,18 +1110,18 @@ transform_functions = [
         ${post_symbols}
     },
 </%def>
 
 fn set_single_transform_function(
     servo_value: &values::computed::TransformOperation,
     gecko_value: &mut structs::nsCSSValue /* output */
 ) {
-    use values::computed::TransformOperation;
-    use values::generics::transform::{Matrix, Matrix3D};
+    use crate::values::computed::TransformOperation;
+    use crate::values::generics::transform::{Matrix, Matrix3D};
 
     let convert_to_ns_css_value = |item: &TransformOperation| -> structs::nsCSSValue {
         let mut value = structs::nsCSSValue::null();
         set_single_transform_function(item, &mut value);
         value
     };
 
     unsafe {
@@ -1132,17 +1132,17 @@ fn set_single_transform_function(
         }
     }
 }
 
 pub fn convert_transform(
     input: &[values::computed::TransformOperation],
     output: &mut structs::root::RefPtr<structs::root::nsCSSValueSharedList>
 ) {
-    use gecko_bindings::sugar::refptr::RefPtr;
+    use crate::gecko_bindings::sugar::refptr::RefPtr;
 
     unsafe { output.clear() };
 
     let list = unsafe {
         RefPtr::from_addrefed(bindings::Gecko_NewCSSValueSharedList(input.len() as u32))
     };
     let value_list = unsafe { list.mHead.as_mut() };
     if let Some(value_list) = value_list {
@@ -1151,19 +1151,19 @@ pub fn convert_transform(
         }
     }
     output.set_move(list);
 }
 
 fn clone_single_transform_function(
     gecko_value: &structs::nsCSSValue
 ) -> values::computed::TransformOperation {
-    use values::computed::{Length, Percentage, TransformOperation};
-    use values::generics::transform::{Matrix, Matrix3D};
-    use values::generics::transform::Transform;
+    use crate::values::computed::{Length, Percentage, TransformOperation};
+    use crate::values::generics::transform::{Matrix, Matrix3D};
+    use crate::values::generics::transform::Transform;
 
     let convert_shared_list_to_operations = |value: &structs::nsCSSValue|
                                             -> Vec<TransformOperation> {
         debug_assert_eq!(value.mUnit, structs::nsCSSUnit::eCSSUnit_SharedList);
         let value_list = unsafe {
             value.mValue.mSharedList.as_ref()
                     .as_mut().expect("List pointer should be non-null").mHead.as_ref()
         };
@@ -1185,17 +1185,17 @@ fn clone_single_transform_function(
             _ => panic!("unacceptable transform function"),
         }
     }
 }
 
 pub fn clone_transform_from_list(
     list: Option< &structs::root::nsCSSValueList>
 ) -> values::computed::Transform {
-    use values::generics::transform::Transform;
+    use crate::values::generics::transform::Transform;
 
     let result = match list {
         Some(list) => {
             list.into_iter()
                 .filter_map(|value| {
                     // Handle none transform.
                     if value.is_none() {
                         None
@@ -1208,17 +1208,17 @@ pub fn clone_transform_from_list(
         _ => vec![],
     };
     Transform(result)
 }
 
 <%def name="impl_transform(ident, gecko_ffi_name)">
     #[allow(non_snake_case)]
     pub fn set_${ident}(&mut self, other: values::computed::Transform) {
-        use gecko_properties::convert_transform;
+        use crate::gecko_properties::convert_transform;
         if other.0.is_empty() {
             unsafe {
                 self.gecko.${gecko_ffi_name}.clear();
             }
             return;
         };
         convert_transform(&other.0, &mut self.gecko.${gecko_ffi_name});
     }
@@ -1230,18 +1230,18 @@ pub fn clone_transform_from_list(
 
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> values::computed::Transform {
-        use gecko_properties::clone_transform_from_list;
-        use values::generics::transform::Transform;
+        use crate::gecko_properties::clone_transform_from_list;
+        use crate::values::generics::transform::Transform;
 
         if self.gecko.${gecko_ffi_name}.mRawPtr.is_null() {
             return Transform(vec!());
         }
         let list = unsafe { (*self.gecko.${gecko_ffi_name}.to_safe().get()).mHead.as_ref() };
         clone_transform_from_list(list)
     }
 </%def>
@@ -1274,17 +1274,17 @@ pub fn clone_transform_from_list(
 
     #[allow(non_snake_case)]
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     #[allow(non_snake_case)]
     pub fn clone_${ident}(&self) -> values::computed::TransformOrigin {
-        use values::computed::{Length, LengthOrPercentage, TransformOrigin};
+        use crate::values::computed::{Length, LengthOrPercentage, TransformOrigin};
         TransformOrigin {
             horizontal: LengthOrPercentage::from_gecko_style_coord(&self.gecko.${gecko_ffi_name}[0])
                 .expect("clone for LengthOrPercentage failed"),
             vertical: LengthOrPercentage::from_gecko_style_coord(&self.gecko.${gecko_ffi_name}[1])
                 .expect("clone for LengthOrPercentage failed"),
             depth: if let Some(third) = self.gecko.${gecko_ffi_name}.get(2) {
                 Length::from_gecko_style_coord(third)
                     .expect("clone for Length failed")
@@ -1370,17 +1370,17 @@ impl Clone for ${style_struct.gecko_stru
         self.gecko.mFont.${gecko_ffi_name}.assign_from_iter_pod(iter);
     }
 
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use values::generics::font::{FontSettings, FontTag, ${tag_type}};
+        use crate::values::generics::font::{FontSettings, FontTag, ${tag_type}};
 
         FontSettings(
             self.gecko.mFont.${gecko_ffi_name}.iter().map(|gecko_font_setting| {
                 ${tag_type} {
                     tag: FontTag(gecko_font_setting.mTag),
                     value: gecko_font_setting.mValue as ${value_type},
                 }
             }).collect::<Vec<_>>().into_boxed_slice()
@@ -1597,33 +1597,33 @@ fn static_assert() {
         }
     }
 
     pub fn reset_border_image_source(&mut self, other: &Self) {
         self.copy_border_image_source_from(other)
     }
 
     pub fn clone_border_image_source(&self) -> longhands::border_image_source::computed_value::T {
-        use values::None_;
+        use crate::values::None_;
 
         match unsafe { self.gecko.mBorderImageSource.into_image() } {
             Some(image) => Either::Second(image),
             None => Either::First(None_),
         }
     }
 
     <% impl_style_sides("border_image_outset") %>
 
     <%
     border_image_repeat_keywords = ["Stretch", "Repeat", "Round", "Space"]
     %>
 
     pub fn set_border_image_repeat(&mut self, v: longhands::border_image_repeat::computed_value::T) {
-        use values::specified::border::BorderImageRepeatKeyword;
-        use gecko_bindings::structs::StyleBorderImageRepeat;
+        use crate::values::specified::border::BorderImageRepeatKeyword;
+        use crate::gecko_bindings::structs::StyleBorderImageRepeat;
 
         % for i, side in enumerate(["H", "V"]):
             self.gecko.mBorderImageRepeat${side} = match v.${i} {
                 % for keyword in border_image_repeat_keywords:
                 BorderImageRepeatKeyword::${keyword} => StyleBorderImageRepeat::${keyword},
                 % endfor
             };
         % endfor
@@ -1634,52 +1634,52 @@ fn static_assert() {
         self.gecko.mBorderImageRepeatV = other.gecko.mBorderImageRepeatV;
     }
 
     pub fn reset_border_image_repeat(&mut self, other: &Self) {
         self.copy_border_image_repeat_from(other)
     }
 
     pub fn clone_border_image_repeat(&self) -> longhands::border_image_repeat::computed_value::T {
-        use values::specified::border::BorderImageRepeatKeyword;
-        use gecko_bindings::structs::StyleBorderImageRepeat;
+        use crate::values::specified::border::BorderImageRepeatKeyword;
+        use crate::gecko_bindings::structs::StyleBorderImageRepeat;
 
         % for side in ["H", "V"]:
         let servo_${side.lower()} = match self.gecko.mBorderImageRepeat${side} {
             % for keyword in border_image_repeat_keywords:
             StyleBorderImageRepeat::${keyword} => BorderImageRepeatKeyword::${keyword},
             % endfor
         };
         % endfor
         longhands::border_image_repeat::computed_value::T(servo_h, servo_v)
     }
 
     <% impl_style_sides("border_image_width") %>
 
     pub fn set_border_image_slice(&mut self, v: longhands::border_image_slice::computed_value::T) {
-        use gecko_bindings::structs::{NS_STYLE_BORDER_IMAGE_SLICE_NOFILL, NS_STYLE_BORDER_IMAGE_SLICE_FILL};
+        use crate::gecko_bindings::structs::{NS_STYLE_BORDER_IMAGE_SLICE_NOFILL, NS_STYLE_BORDER_IMAGE_SLICE_FILL};
 
         v.offsets.to_gecko_rect(&mut self.gecko.mBorderImageSlice);
 
         let fill = if v.fill {
             NS_STYLE_BORDER_IMAGE_SLICE_FILL
         } else {
             NS_STYLE_BORDER_IMAGE_SLICE_NOFILL
         };
         self.gecko.mBorderImageFill = fill as u8;
     }
 
     <%self:copy_sides_style_coord ident="border_image_slice">
         self.gecko.mBorderImageFill = other.gecko.mBorderImageFill;
     </%self:copy_sides_style_coord>
 
     pub fn clone_border_image_slice(&self) -> longhands::border_image_slice::computed_value::T {
-        use gecko_bindings::structs::NS_STYLE_BORDER_IMAGE_SLICE_FILL;
-        use values::computed::{BorderImageSlice, NumberOrPercentage};
-        type NumberOrPercentageRect = ::values::generics::rect::Rect<NumberOrPercentage>;
+        use crate::gecko_bindings::structs::NS_STYLE_BORDER_IMAGE_SLICE_FILL;
+        use crate::values::computed::{BorderImageSlice, NumberOrPercentage};
+        type NumberOrPercentageRect = crate::values::generics::rect::Rect<NumberOrPercentage>;
 
         BorderImageSlice {
             offsets:
                 NumberOrPercentageRect::from_gecko_rect(&self.gecko.mBorderImageSlice)
                     .expect("mBorderImageSlice[${side}] could not convert to NumberOrPercentageRect"),
             fill: self.gecko.mBorderImageFill as u32 == NS_STYLE_BORDER_IMAGE_SLICE_FILL
         }
     }
@@ -1722,17 +1722,17 @@ fn static_assert() {
     pub fn set_z_index(&mut self, v: longhands::z_index::computed_value::T) {
         match v {
             ZIndex::Integer(n) => self.gecko.mZIndex.set_value(CoordDataValue::Integer(n)),
             ZIndex::Auto => self.gecko.mZIndex.set_value(CoordDataValue::Auto),
         }
     }
 
     pub fn copy_z_index_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleUnit;
+        use crate::gecko_bindings::structs::nsStyleUnit;
         // z-index is never a calc(). If it were, we'd be leaking here, so
         // assert that it isn't.
         debug_assert_ne!(self.gecko.mZIndex.unit(), nsStyleUnit::eStyleUnit_Calc);
         unsafe {
             self.gecko.mZIndex.copy_from_unchecked(&other.gecko.mZIndex);
         }
     }
 
@@ -1758,17 +1758,17 @@ fn static_assert() {
     ${impl_simple_type_with_conversion("align_items")}
 
     pub fn set_justify_items(&mut self, v: longhands::justify_items::computed_value::T) {
         self.gecko.mSpecifiedJustifyItems = v.specified.into();
         self.set_computed_justify_items(v.computed);
     }
 
     pub fn set_computed_justify_items(&mut self, v: values::specified::JustifyItems) {
-        debug_assert_ne!(v.0, ::values::specified::align::AlignFlags::LEGACY);
+        debug_assert_ne!(v.0, crate::values::specified::align::AlignFlags::LEGACY);
         self.gecko.mJustifyItems = v.into();
     }
 
     pub fn reset_justify_items(&mut self, reset_style: &Self) {
         self.gecko.mJustifyItems = reset_style.gecko.mJustifyItems;
         self.gecko.mSpecifiedJustifyItems = reset_style.gecko.mSpecifiedJustifyItems;
     }
 
@@ -1791,17 +1791,17 @@ fn static_assert() {
     pub fn clone_order(&self) -> longhands::order::computed_value::T {
         self.gecko.mOrder
     }
 
     ${impl_simple_copy('order', 'mOrder')}
 
     % for value in GRID_LINES:
     pub fn set_${value.name}(&mut self, v: longhands::${value.name}::computed_value::T) {
-        use gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine};
+        use crate::gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine};
 
         let ident = v.ident.as_ref().map_or(&[] as &[_], |ident| ident.0.as_slice());
         self.gecko.${value.gecko}.mLineName.assign(ident);
         self.gecko.${value.gecko}.mHasSpan = v.is_span;
         if let Some(integer) = v.line_num {
             // clamping the integer between a range
             self.gecko.${value.gecko}.mInteger = cmp::max(nsStyleGridLine_kMinLine,
                 cmp::min(integer, nsStyleGridLine_kMaxLine));
@@ -1814,17 +1814,17 @@ fn static_assert() {
         self.gecko.${value.gecko}.mLineName.assign(&*other.gecko.${value.gecko}.mLineName);
     }
 
     pub fn reset_${value.name}(&mut self, other: &Self) {
         self.copy_${value.name}_from(other)
     }
 
     pub fn clone_${value.name}(&self) -> longhands::${value.name}::computed_value::T {
-        use gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine};
+        use crate::gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine};
 
         longhands::${value.name}::computed_value::T {
             is_span: self.gecko.${value.gecko}.mHasSpan,
             ident: {
                 let name = self.gecko.${value.gecko}.mLineName.to_string();
                 if name.len() == 0 {
                     None
                 } else {
@@ -1854,28 +1854,28 @@ fn static_assert() {
         self.gecko.mGridAuto${kind.title()}Max.copy_from(&other.gecko.mGridAuto${kind.title()}Max);
     }
 
     pub fn reset_grid_auto_${kind}(&mut self, other: &Self) {
         self.copy_grid_auto_${kind}_from(other)
     }
 
     pub fn clone_grid_auto_${kind}(&self) -> longhands::grid_auto_${kind}::computed_value::T {
-        ::values::generics::grid::TrackSize::from_gecko_style_coords(&self.gecko.mGridAuto${kind.title()}Min,
+        crate::values::generics::grid::TrackSize::from_gecko_style_coords(&self.gecko.mGridAuto${kind.title()}Min,
                                                                      &self.gecko.mGridAuto${kind.title()}Max)
     }
 
     pub fn set_grid_template_${kind}(&mut self, v: longhands::grid_template_${kind}::computed_value::T) {
         <% self_grid = "self.gecko.mGridTemplate%s" % kind.title() %>
-        use gecko_bindings::structs::{nsTArray, nsStyleGridLine_kMaxLine};
+        use crate::gecko_bindings::structs::{nsTArray, nsStyleGridLine_kMaxLine};
         use nsstring::nsStringRepr;
         use std::usize;
-        use values::CustomIdent;
-        use values::generics::grid::TrackListType::Auto;
-        use values::generics::grid::{GridTemplateComponent, RepeatCount};
+        use crate::values::CustomIdent;
+        use crate::values::generics::grid::TrackListType::Auto;
+        use crate::values::generics::grid::{GridTemplateComponent, RepeatCount};
 
         #[inline]
         fn set_line_names(servo_names: &[CustomIdent], gecko_names: &mut nsTArray<nsStringRepr>) {
             unsafe {
                 bindings::Gecko_ResizeTArrayForStrings(gecko_names, servo_names.len() as u32);
             }
 
             for (servo_name, gecko_name) in servo_names.iter().zip(gecko_names.iter_mut()) {
@@ -1987,21 +1987,21 @@ fn static_assert() {
     }
 
     pub fn reset_grid_template_${kind}(&mut self, other: &Self) {
         self.copy_grid_template_${kind}_from(other)
     }
 
     pub fn clone_grid_template_${kind}(&self) -> longhands::grid_template_${kind}::computed_value::T {
         <% self_grid = "self.gecko.mGridTemplate%s" % kind.title() %>
-        use gecko_bindings::structs::nsTArray;
+        use crate::gecko_bindings::structs::nsTArray;
         use nsstring::nsStringRepr;
-        use values::CustomIdent;
-        use values::generics::grid::{GridTemplateComponent, LineNameList, RepeatCount};
-        use values::generics::grid::{TrackList, TrackListType, TrackListValue, TrackRepeat, TrackSize};
+        use crate::values::CustomIdent;
+        use crate::values::generics::grid::{GridTemplateComponent, LineNameList, RepeatCount};
+        use crate::values::generics::grid::{TrackList, TrackListType, TrackListValue, TrackRepeat, TrackSize};
 
         let value = match unsafe { ${self_grid}.mPtr.as_ref() } {
             None => return GridTemplateComponent::None,
             Some(value) => value,
         };
 
         #[inline]
         fn to_boxed_customident_slice(gecko_names: &nsTArray<nsStringRepr>) -> Box<[CustomIdent]> {
@@ -2073,18 +2073,18 @@ fn static_assert() {
             GridTemplateComponent::TrackList(TrackList{list_type, values, line_names, auto_repeat})
         }
     }
     % endfor
 
     ${impl_simple_type_with_conversion("grid_auto_flow")}
 
     pub fn set_grid_template_areas(&mut self, v: values::computed::position::GridTemplateAreas) {
-        use gecko_bindings::bindings::Gecko_NewGridTemplateAreasValue;
-        use gecko_bindings::sugar::refptr::UniqueRefPtr;
+        use crate::gecko_bindings::bindings::Gecko_NewGridTemplateAreasValue;
+        use crate::gecko_bindings::sugar::refptr::UniqueRefPtr;
 
         let v = match v {
             Either::First(areas) => areas,
             Either::Second(_) => {
                 unsafe { self.gecko.mGridTemplateAreas.clear() }
                 return;
             },
         };
@@ -2114,18 +2114,18 @@ fn static_assert() {
     }
 
     pub fn reset_grid_template_areas(&mut self, other: &Self) {
         self.copy_grid_template_areas_from(other)
     }
 
     pub fn clone_grid_template_areas(&self) -> values::computed::position::GridTemplateAreas {
         use std::ops::Range;
-        use values::None_;
-        use values::specified::position::{NamedArea, TemplateAreas, TemplateAreasArc};
+        use crate::values::None_;
+        use crate::values::specified::position::{NamedArea, TemplateAreas, TemplateAreasArc};
 
         if self.gecko.mGridTemplateAreas.mRawPtr.is_null() {
             return Either::Second(None_);
         }
 
         let gecko_grid_template_areas = self.gecko.mGridTemplateAreas.mRawPtr;
         let areas = unsafe {
             let vec: Vec<NamedArea> =
@@ -2272,18 +2272,18 @@ fn static_assert() {
         self.gecko.mFont.systemFont = other.gecko.mFont.systemFont;
     }
 
     pub fn reset_font_family(&mut self, other: &Self) {
         self.copy_font_family_from(other)
     }
 
     pub fn clone_font_family(&self) -> longhands::font_family::computed_value::T {
-        use gecko_bindings::structs::FontFamilyType;
-        use values::computed::font::{FontFamily, SingleFontFamily, FontFamilyList};
+        use crate::gecko_bindings::structs::FontFamilyType;
+        use crate::values::computed::font::{FontFamily, SingleFontFamily, FontFamilyList};
 
         let fontlist = &self.gecko.mFont.fontlist;
         let shared_fontlist = unsafe { fontlist.mFontlist.mBasePtr.to_safe() };
 
         if shared_fontlist.mNames.is_empty() {
             let default = fontlist.mDefaultFontType;
             let default = match default {
                 FontFamilyType::eFamily_serif => {
@@ -2312,17 +2312,17 @@ fn static_assert() {
 
     pub fn unzoom_fonts(&mut self, device: &Device) {
         self.gecko.mSize = device.unzoom_text(Au(self.gecko.mSize)).0;
         self.gecko.mScriptUnconstrainedSize = device.unzoom_text(Au(self.gecko.mScriptUnconstrainedSize)).0;
         self.gecko.mFont.size = device.unzoom_text(Au(self.gecko.mFont.size)).0;
     }
 
     pub fn set_font_size(&mut self, v: FontSize) {
-        use values::generics::font::KeywordSize;
+        use crate::values::generics::font::KeywordSize;
         self.gecko.mSize = v.size().0;
         self.gecko.mScriptUnconstrainedSize = v.size().0;
         if let Some(info) = v.keyword_info {
             self.gecko.mFontSizeKeyword = match info.kw {
                 KeywordSize::XXSmall => structs::NS_STYLE_FONT_SIZE_XXSMALL,
                 KeywordSize::XSmall => structs::NS_STYLE_FONT_SIZE_XSMALL,
                 KeywordSize::Small => structs::NS_STYLE_FONT_SIZE_SMALL,
                 KeywordSize::Medium => structs::NS_STYLE_FONT_SIZE_MEDIUM,
@@ -2526,17 +2526,17 @@ fn static_assert() {
             self.gecko.mFontSizeFactor = 1.;
             self.gecko.mFontSizeOffset = 0;
             self.gecko.mScriptUnconstrainedSize = parent.gecko.mScriptUnconstrainedSize;
         }
         self.fixup_font_min_size(device);
     }
 
     pub fn clone_font_size(&self) -> FontSize {
-        use values::generics::font::{KeywordInfo, KeywordSize};
+        use crate::values::generics::font::{KeywordInfo, KeywordSize};
         let size = Au(self.gecko.mSize).into();
         let kw = match self.gecko.mFontSizeKeyword as u32 {
             structs::NS_STYLE_FONT_SIZE_XXSMALL => KeywordSize::XXSmall,
             structs::NS_STYLE_FONT_SIZE_XSMALL => KeywordSize::XSmall,
             structs::NS_STYLE_FONT_SIZE_SMALL => KeywordSize::Small,
             structs::NS_STYLE_FONT_SIZE_MEDIUM => KeywordSize::Medium,
             structs::NS_STYLE_FONT_SIZE_LARGE => KeywordSize::Large,
             structs::NS_STYLE_FONT_SIZE_XLARGE => KeywordSize::XLarge,
@@ -2577,66 +2577,66 @@ fn static_assert() {
             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;
+        use crate::values::computed::font::FontStretch;
+        use crate::values::computed::Percentage;
+        use crate::values::generics::NonNegative;
 
         let stretch =
             unsafe { bindings::Gecko_FontStretch_ToFloat(self.gecko.mFont.stretch) };
         debug_assert!(stretch >= 0.);
 
         FontStretch(NonNegative(Percentage(stretch)))
     }
 
     pub fn set_font_style(&mut self, v: longhands::font_style::computed_value::T) {
-        use values::generics::font::FontStyle;
+        use crate::values::generics::font::FontStyle;
         let s = &mut self.gecko.mFont.style;
         unsafe {
             match v {
                 FontStyle::Normal => bindings::Gecko_FontSlantStyle_SetNormal(s),
                 FontStyle::Italic => bindings::Gecko_FontSlantStyle_SetItalic(s),
                 FontStyle::Oblique(ref angle) => {
                     bindings::Gecko_FontSlantStyle_SetOblique(s, angle.0.degrees())
                 }
             }
         }
     }
     ${impl_simple_copy('font_style', 'mFont.style')}
     pub fn clone_font_style(&self) -> longhands::font_style::computed_value::T {
-        use values::computed::font::FontStyle;
+        use crate::values::computed::font::FontStyle;
         FontStyle::from_gecko(self.gecko.mFont.style)
     }
 
     ${impl_simple_type_with_conversion("font_synthesis", "mFont.synthesis")}
 
     pub fn set_font_size_adjust(&mut self, v: longhands::font_size_adjust::computed_value::T) {
-        use properties::longhands::font_size_adjust::computed_value::T;
+        use crate::properties::longhands::font_size_adjust::computed_value::T;
         match v {
             T::None => self.gecko.mFont.sizeAdjust = -1.0 as f32,
             T::Number(n) => self.gecko.mFont.sizeAdjust = n,
         }
     }
 
     pub fn copy_font_size_adjust_from(&mut self, other: &Self) {
         self.gecko.mFont.sizeAdjust = other.gecko.mFont.sizeAdjust;
     }
 
     pub fn reset_font_size_adjust(&mut self, other: &Self) {
         self.copy_font_size_adjust_from(other)
     }
 
     pub fn clone_font_size_adjust(&self) -> longhands::font_size_adjust::computed_value::T {
-        use properties::longhands::font_size_adjust::computed_value::T;
+        use crate::properties::longhands::font_size_adjust::computed_value::T;
         T::from_gecko_adjust(self.gecko.mFont.sizeAdjust)
     }
 
     #[allow(non_snake_case)]
     pub fn set__x_lang(&mut self, v: longhands::_x_lang::computed_value::T) {
         let ptr = v.0.as_ptr();
         forget(v);
         unsafe {
@@ -2684,23 +2684,23 @@ fn static_assert() {
     }
 
     ${impl_simple("_moz_script_level", "mScriptLevel")}
     <% impl_simple_type_with_conversion("font_language_override", "mFont.languageOverride") %>
 
     pub fn set_font_variant_alternates(&mut self,
                                        v: values::computed::font::FontVariantAlternates,
                                        device: &Device) {
-        use gecko_bindings::bindings::{Gecko_ClearAlternateValues, Gecko_AppendAlternateValues};
-        use gecko_bindings::bindings::Gecko_nsFont_ResetFontFeatureValuesLookup;
-        use gecko_bindings::bindings::Gecko_nsFont_SetFontFeatureValuesLookup;
+        use crate::gecko_bindings::bindings::{Gecko_ClearAlternateValues, Gecko_AppendAlternateValues};
+        use crate::gecko_bindings::bindings::Gecko_nsFont_ResetFontFeatureValuesLookup;
+        use crate::gecko_bindings::bindings::Gecko_nsFont_SetFontFeatureValuesLookup;
         % for value in "normal swash stylistic ornaments annotation styleset character_variant historical".split():
-            use gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
+            use crate::gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
         % endfor
-        use values::specified::font::VariantAlternates;
+        use crate::values::specified::font::VariantAlternates;
 
         unsafe {
             Gecko_ClearAlternateValues(&mut self.gecko.mFont, v.len());
         }
 
         if v.0.is_empty() {
             self.gecko.mFont.variantAlternates = NS_FONT_VARIANT_ALTERNATES_NORMAL as u16;
             unsafe { Gecko_nsFont_ResetFontFeatureValuesLookup(&mut self.gecko.mFont); }
@@ -2739,35 +2739,35 @@ fn static_assert() {
 
         unsafe {
             Gecko_nsFont_SetFontFeatureValuesLookup(&mut self.gecko.mFont, device.pres_context());
         }
     }
 
     #[allow(non_snake_case)]
     pub fn copy_font_variant_alternates_from(&mut self, other: &Self) {
-        use gecko_bindings::bindings::Gecko_CopyAlternateValuesFrom;
+        use crate::gecko_bindings::bindings::Gecko_CopyAlternateValuesFrom;
 
         self.gecko.mFont.variantAlternates = other.gecko.mFont.variantAlternates;
         unsafe {
             Gecko_CopyAlternateValuesFrom(&mut self.gecko.mFont, &other.gecko.mFont);
         }
     }
 
     pub fn reset_font_variant_alternates(&mut self, other: &Self) {
         self.copy_font_variant_alternates_from(other)
     }
 
     pub fn clone_font_variant_alternates(&self) -> values::computed::font::FontVariantAlternates {
         % for value in "normal swash stylistic ornaments annotation styleset character_variant historical".split():
-            use gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
+            use crate::gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
         % endfor
-        use values::specified::font::VariantAlternates;
-        use values::specified::font::VariantAlternatesList;
-        use values::CustomIdent;
+        use crate::values::specified::font::VariantAlternates;
+        use crate::values::specified::font::VariantAlternatesList;
+        use crate::values::CustomIdent;
 
         if self.gecko.mFont.variantAlternates == NS_FONT_VARIANT_ALTERNATES_NORMAL as u16 {
             return VariantAlternatesList(vec![].into_boxed_slice());
         }
 
         let mut alternates = Vec::with_capacity(self.gecko.mFont.alternateValues.len());
         if self.gecko.mFont.variantAlternates & (NS_FONT_VARIANT_ALTERNATES_HISTORICAL as u16) != 0 {
             alternates.push(VariantAlternates::HistoricalForms);
@@ -2884,17 +2884,17 @@ fn static_assert() {
         self.gecko.m${type.capitalize()}${gecko_ffi_name}Count = input_len as u32;
         for (gecko, servo) in self.gecko.m${type.capitalize()}s.iter_mut().take(input_len as usize).zip(v) {
             gecko.m${gecko_ffi_name} = servo.seconds() * 1000.;
         }
     }
     #[allow(non_snake_case)]
     pub fn ${type}_${ident}_at(&self, index: usize)
         -> longhands::${type}_${ident}::computed_value::SingleComputedValue {
-        use values::computed::Time;
+        use crate::values::computed::Time;
         Time::from_seconds(self.gecko.m${type.capitalize()}s[index].m${gecko_ffi_name} / 1000.)
     }
     ${impl_animation_or_transition_count(type, ident, gecko_ffi_name)}
     ${impl_copy_animation_or_transition_value(type, ident, gecko_ffi_name)}
 </%def>
 
 <%def name="impl_animation_or_transition_timing_function(type)">
     pub fn set_${type}_timing_function<I>(&mut self, v: I)
@@ -2948,17 +2948,17 @@ fn static_assert() {
 </%def>
 
 <%def name="impl_animation_keyword(ident, gecko_ffi_name, keyword, cast_type='u8')">
     #[allow(non_snake_case)]
     pub fn set_animation_${ident}<I>(&mut self, v: I)
         where I: IntoIterator<Item = longhands::animation_${ident}::computed_value::single_value::T>,
               I::IntoIter: ExactSizeIterator + Clone
     {
-        use properties::longhands::animation_${ident}::single_value::computed_value::T as Keyword;
+        use crate::properties::longhands::animation_${ident}::single_value::computed_value::T as Keyword;
 
         let v = v.into_iter();
 
         debug_assert_ne!(v.len(), 0);
         let input_len = v.len();
         self.gecko.mAnimations.ensure_len(input_len);
 
         self.gecko.mAnimation${gecko_ffi_name}Count = input_len as u32;
@@ -2971,17 +2971,17 @@ fn static_assert() {
                 % endfor
             };
             gecko.m${gecko_ffi_name} = result;
         }
     }
     #[allow(non_snake_case)]
     pub fn animation_${ident}_at(&self, index: usize)
         -> longhands::animation_${ident}::computed_value::SingleComputedValue {
-        use properties::longhands::animation_${ident}::single_value::computed_value::T as Keyword;
+        use crate::properties::longhands::animation_${ident}::single_value::computed_value::T as Keyword;
         match self.gecko.mAnimations[index].m${gecko_ffi_name} ${keyword.maybe_cast("u32")} {
             % for value in keyword.gecko_values():
                 structs::${keyword.gecko_constant(value)} => Keyword::${to_camel_case(value)},
             % endfor
             % if keyword.gecko_inexhaustive:
             _ => panic!("Found unexpected value for animation-${ident}"),
             % endif
         }
@@ -3003,17 +3003,17 @@ fn static_assert() {
         unsafe { self.gecko.${gecko_ffi_name}.set(&other.gecko.${gecko_ffi_name}); }
     }
 
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
 
     pub fn clone_${ident}(&self) -> values::computed::${type} {
-        use values::generics::transform::${type};
+        use crate::values::generics::transform::${type};
 
         if self.gecko.${gecko_ffi_name}.mRawPtr.is_null() {
             return ${type}::None;
         }
 
         let list = unsafe { (*self.gecko.${gecko_ffi_name}.to_safe().get()).mHead.as_ref() };
 
         let mut transform = clone_transform_from_list(list);
@@ -3082,38 +3082,38 @@ fn static_assert() {
     ) %>
     ${impl_keyword('clear', 'mBreakType', clear_keyword)}
 
     <% resize_keyword = Keyword("resize", "None Both Horizontal Vertical") %>
     ${impl_keyword('resize', 'mResize', resize_keyword)}
 
     <% overflow_x = data.longhands_by_name["overflow-x"] %>
     pub fn set_overflow_y(&mut self, v: longhands::overflow_y::computed_value::T) {
-        use properties::longhands::overflow_x::computed_value::T as BaseType;
+        use crate::properties::longhands::overflow_x::computed_value::T as BaseType;
         // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
         self.gecko.mOverflowY = match v {
             % for value in overflow_x.keyword.values_for('gecko'):
                 BaseType::${to_camel_case(value)} => structs::${overflow_x.keyword.gecko_constant(value)} as u8,
             % endfor
         };
     }
     ${impl_simple_copy('overflow_y', 'mOverflowY')}
     pub fn clone_overflow_y(&self) -> longhands::overflow_y::computed_value::T {
-        use properties::longhands::overflow_x::computed_value::T as BaseType;
+        use crate::properties::longhands::overflow_x::computed_value::T as BaseType;
         // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
         match self.gecko.mOverflowY as u32 {
             % for value in overflow_x.keyword.values_for('gecko'):
             structs::${overflow_x.keyword.gecko_constant(value)} => BaseType::${to_camel_case(value)},
             % endfor
             x => panic!("Found unexpected value in style struct for overflow_y property: {}", x),
         }
     }
 
     pub fn set_vertical_align(&mut self, v: longhands::vertical_align::computed_value::T) {
-        use values::generics::box_::VerticalAlign;
+        use crate::values::generics::box_::VerticalAlign;
         let value = match v {
             VerticalAlign::Baseline => structs::NS_STYLE_VERTICAL_ALIGN_BASELINE,
             VerticalAlign::Sub => structs::NS_STYLE_VERTICAL_ALIGN_SUB,
             VerticalAlign::Super => structs::NS_STYLE_VERTICAL_ALIGN_SUPER,
             VerticalAlign::Top => structs::NS_STYLE_VERTICAL_ALIGN_TOP,
             VerticalAlign::TextTop => structs::NS_STYLE_VERTICAL_ALIGN_TEXT_TOP,
             VerticalAlign::Middle => structs::NS_STYLE_VERTICAL_ALIGN_MIDDLE,
             VerticalAlign::Bottom => structs::NS_STYLE_VERTICAL_ALIGN_BOTTOM,
@@ -3125,18 +3125,18 @@ fn static_assert() {
                 self.gecko.mVerticalAlign.set(length);
                 return;
             },
         };
         self.gecko.mVerticalAlign.set_value(CoordDataValue::Enumerated(value));
     }
 
     pub fn clone_vertical_align(&self) -> longhands::vertical_align::computed_value::T {
-        use values::computed::LengthOrPercentage;
-        use values::generics::box_::VerticalAlign;
+        use crate::values::computed::LengthOrPercentage;
+        use crate::values::generics::box_::VerticalAlign;
 
         let gecko = &self.gecko.mVerticalAlign;
         match gecko.as_value() {
             CoordDataValue::Enumerated(value) => VerticalAlign::from_gecko_keyword(value),
             _ => {
                 VerticalAlign::Length(
                     LengthOrPercentage::from_gecko_style_coord(gecko).expect(
                         "expected <length-percentage> for vertical-align",
@@ -3149,34 +3149,34 @@ fn static_assert() {
     <%call expr="impl_coord_copy('vertical_align', 'mVerticalAlign')"></%call>
 
     % for kind in ["before", "after"]:
     // Temp fix for Bugzilla bug 24000.
     // Map 'auto' and 'avoid' to false, and 'always', 'left', and 'right' to true.
     // "A conforming user agent may interpret the values 'left' and 'right'
     // as 'always'." - CSS2.1, section 13.3.1
     pub fn set_page_break_${kind}(&mut self, v: longhands::page_break_${kind}::computed_value::T) {
-        use computed_values::page_break_${kind}::T;
+        use crate::computed_values::page_break_${kind}::T;
 
         let result = match v {
             T::Auto   => false,
             T::Always => true,
             T::Avoid  => false,
             T::Left   => true,
             T::Right  => true
         };
         self.gecko.mBreak${kind.title()} = result;
     }
 
     ${impl_simple_copy('page_break_' + kind, 'mBreak' + kind.title())}
 
     // Temp fix for Bugzilla bug 24000.
     // See set_page_break_before/after for detail.
     pub fn clone_page_break_${kind}(&self) -> longhands::page_break_${kind}::computed_value::T {
-        use computed_values::page_break_${kind}::T;
+        use crate::computed_values::page_break_${kind}::T;
 
         if self.gecko.mBreak${kind.title()} { T::Always } else { T::Auto }
     }
     % endfor
 
     ${impl_style_coord("scroll_snap_points_x", "mScrollSnapPointsX")}
     ${impl_style_coord("scroll_snap_points_y", "mScrollSnapPointsY")}
 
@@ -3216,19 +3216,19 @@ fn static_assert() {
         self.gecko.mTransitions[index % self.gecko.mTransitionDurationCount as usize].mDuration.max(0.0)
             + self.gecko.mTransitions[index % self.gecko.mTransitionDelayCount as usize].mDelay
     }
 
     pub fn set_transition_property<I>(&mut self, v: I)
         where I: IntoIterator<Item = longhands::transition_property::computed_value::single_value::T>,
               I::IntoIter: ExactSizeIterator
     {
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
 
         let v = v.into_iter();
 
         if v.len() != 0 {
             self.gecko.mTransitions.ensure_len(v.len());
             self.gecko.mTransitionPropertyCount = v.len() as u32;
             for (servo, gecko) in v.zip(self.gecko.mTransitions.iter_mut()) {
                 unsafe { gecko.mUnknownProperty.clear() };
@@ -3249,31 +3249,31 @@ fn static_assert() {
             // In gecko |none| is represented by eCSSPropertyExtra_no_properties.
             self.gecko.mTransitionPropertyCount = 1;
             self.gecko.mTransitions[0].mProperty = eCSSPropertyExtra_no_properties;
         }
     }
 
     /// Returns whether there are any transitions specified.
     pub fn specifies_transitions(&self) -> bool {
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_all_properties;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_all_properties;
         if self.gecko.mTransitionPropertyCount == 1 &&
             self.gecko.mTransitions[0].mProperty == eCSSPropertyExtra_all_properties &&
             self.transition_combined_duration_at(0) <= 0.0f32 {
             return false;
         }
 
         self.gecko.mTransitionPropertyCount > 0
     }
 
     pub fn transition_property_at(&self, index: usize)
         -> longhands::transition_property::computed_value::SingleComputedValue {
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
 
         let property = self.gecko.mTransitions[index].mProperty;
         if property == eCSSProperty_UNKNOWN {
             let atom = self.gecko.mTransitions[index].mUnknownProperty.mRawPtr;
             debug_assert!(!atom.is_null());
             TransitionProperty::Unsupported(CustomIdent(unsafe{
                 Atom::from_raw(atom)
             }))
@@ -3295,18 +3295,18 @@ fn static_assert() {
         }
     }
 
     pub fn transition_nscsspropertyid_at(&self, index: usize) -> nsCSSPropertyID {
         self.gecko.mTransitions[index].mProperty
     }
 
     pub fn copy_transition_property_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
-        use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
+        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
         self.gecko.mTransitions.ensure_len(other.gecko.mTransitions.len());
 
         let count = other.gecko.mTransitionPropertyCount;
         self.gecko.mTransitionPropertyCount = count;
 
         for (index, transition) in self.gecko.mTransitions.iter_mut().enumerate().take(count as usize) {
             transition.mProperty = other.gecko.mTransitions[index].mProperty;
             unsafe { transition.mUnknownProperty.clear() };
@@ -3370,17 +3370,17 @@ fn static_assert() {
                 None => atom!(""),
                 Some(ref name) => name.as_atom().clone(),
             };
             unsafe { bindings::Gecko_SetAnimationName(gecko, atom.into_addrefed()); }
         }
     }
     pub fn animation_name_at(&self, index: usize)
         -> longhands::animation_name::computed_value::SingleComputedValue {
-        use properties::longhands::animation_name::single_value::SpecifiedValue as AnimationName;
+        use crate::properties::longhands::animation_name::single_value::SpecifiedValue as AnimationName;
 
         let atom = self.gecko.mAnimations[index].mName.mRawPtr;
         if atom == atom!("").as_ptr() {
             return AnimationName(None)
         }
         AnimationName(Some(KeyframesName::from_atom(unsafe { Atom::from_raw(atom) })))
     }
     pub fn copy_animation_name_from(&mut self, other: &Self) {
@@ -3405,17 +3405,17 @@ fn static_assert() {
                              data.longhands_by_name["animation-play-state"].keyword)}
 
     pub fn set_animation_iteration_count<I>(&mut self, v: I)
     where
         I: IntoIterator<Item = values::computed::AnimationIterationCount>,
         I::IntoIter: ExactSizeIterator + Clone
     {
         use std::f32;
-        use values::generics::box_::AnimationIterationCount;
+        use crate::values::generics::box_::AnimationIterationCount;
 
         let v = v.into_iter();
 
         debug_assert_ne!(v.len(), 0);
         let input_len = v.len();
         self.gecko.mAnimations.ensure_len(input_len);
 
         self.gecko.mAnimationIterationCountCount = input_len as u32;
@@ -3426,17 +3426,17 @@ fn static_assert() {
             }
         }
     }
 
     pub fn animation_iteration_count_at(
         &self,
         index: usize,
     ) -> values::computed::AnimationIterationCount {
-        use values::generics::box_::AnimationIterationCount;
+        use crate::values::generics::box_::AnimationIterationCount;
 
         if self.gecko.mAnimations[index].mIterationCount.is_infinite() {
             AnimationIterationCount::Infinite
         } else {
             AnimationIterationCount::Number(self.gecko.mAnimations[index].mIterationCount)
         }
     }
 
@@ -3468,33 +3468,33 @@ fn static_assert() {
         self.gecko.mPerspectiveOrigin[1].copy_from(&other.gecko.mPerspectiveOrigin[1]);
     }
 
     pub fn reset_perspective_origin(&mut self, other: &Self) {
         self.copy_perspective_origin_from(other)
     }
 
     pub fn clone_perspective_origin(&self) -> longhands::perspective_origin::computed_value::T {
-        use properties::longhands::perspective_origin::computed_value::T;
-        use values::computed::LengthOrPercentage;
+        use crate::properties::longhands::perspective_origin::computed_value::T;
+        use crate::values::computed::LengthOrPercentage;
         T {
             horizontal: LengthOrPercentage::from_gecko_style_coord(&self.gecko.mPerspectiveOrigin[0])
                 .expect("Expected length or percentage for horizontal value of perspective-origin"),
             vertical: LengthOrPercentage::from_gecko_style_coord(&self.gecko.mPerspectiveOrigin[1])
                 .expect("Expected length or percentage for vertical value of perspective-origin"),
         }
     }
 
     ${impl_individual_transform('rotate', 'Rotate', 'mSpecifiedRotate')}
     ${impl_individual_transform('translate', 'Translate', 'mSpecifiedTranslate')}
     ${impl_individual_transform('scale', 'Scale', 'mSpecifiedScale')}
 
     pub fn set_will_change(&mut self, v: longhands::will_change::computed_value::T) {
-        use gecko_bindings::bindings::{Gecko_AppendWillChange, Gecko_ClearWillChange};
-        use properties::longhands::will_change::computed_value::T;
+        use crate::gecko_bindings::bindings::{Gecko_AppendWillChange, Gecko_ClearWillChange};
+        use crate::properties::longhands::will_change::computed_value::T;
 
         match v {
             T::AnimateableFeatures { features, bits } => {
                 unsafe {
                     Gecko_ClearWillChange(&mut self.gecko, features.len());
                 }
 
                 for feature in features.iter() {
@@ -3510,33 +3510,33 @@ fn static_assert() {
                     Gecko_ClearWillChange(&mut self.gecko, 0);
                 }
                 self.gecko.mWillChangeBitField = 0;
             },
         };
     }
 
     pub fn copy_will_change_from(&mut self, other: &Self) {
-        use gecko_bindings::bindings::Gecko_CopyWillChangeFrom;
+        use crate::gecko_bindings::bindings::Gecko_CopyWillChangeFrom;
 
         self.gecko.mWillChangeBitField = other.gecko.mWillChangeBitField;
         unsafe {
             Gecko_CopyWillChangeFrom(&mut self.gecko, &other.gecko as *const _ as *mut _);
         }
     }
 
     pub fn reset_will_change(&mut self, other: &Self) {
         self.copy_will_change_from(other)
     }
 
     pub fn clone_will_change(&self) -> longhands::will_change::computed_value::T {
-        use properties::longhands::will_change::computed_value::T;
-        use gecko_bindings::structs::nsAtom;
-        use values::CustomIdent;
-        use values::specified::box_::WillChangeBits;
+        use crate::properties::longhands::will_change::computed_value::T;
+        use crate::gecko_bindings::structs::nsAtom;
+        use crate::values::CustomIdent;
+        use crate::values::specified::box_::WillChangeBits;
 
         if self.gecko.mWillChange.len() == 0 {
             return T::Auto
         }
 
         let custom_idents: Vec<CustomIdent> = self.gecko.mWillChange.iter().map(|gecko_atom| {
             unsafe {
                 CustomIdent(Atom::from_raw(gecko_atom.mRawPtr as *mut nsAtom))
@@ -3547,26 +3547,26 @@ fn static_assert() {
             features: custom_idents.into_boxed_slice(),
             bits: WillChangeBits::from_bits_truncate(self.gecko.mWillChangeBitField),
         }
     }
 
     <% impl_shape_source("shape_outside", "mShapeOutside") %>
 
     pub fn set_contain(&mut self, v: longhands::contain::computed_value::T) {
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_NONE;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_STRICT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_STYLE;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
-        use properties::longhands::contain::SpecifiedValue;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_NONE;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STRICT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STYLE;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
+        use crate::properties::longhands::contain::SpecifiedValue;
 
         if v.is_empty() {
             self.gecko.mContain = NS_STYLE_CONTAIN_NONE as u8;
             return;
         }
 
         if v.contains(SpecifiedValue::STRICT) {
             self.gecko.mContain = (NS_STYLE_CONTAIN_STRICT | NS_STYLE_CONTAIN_ALL_BITS) as u8;
@@ -3590,25 +3590,25 @@ fn static_assert() {
         if v.contains(SpecifiedValue::SIZE) {
             bitfield |= NS_STYLE_CONTAIN_SIZE;
         }
 
         self.gecko.mContain = bitfield as u8;
     }
 
     pub fn clone_contain(&self) -> longhands::contain::computed_value::T {
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_STRICT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_STYLE;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
-        use gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
-        use properties::longhands::contain::{self, SpecifiedValue};
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STRICT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_SIZE;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_LAYOUT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_STYLE;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_PAINT;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
+        use crate::gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
+        use crate::properties::longhands::contain::{self, SpecifiedValue};
 
         let mut servo_flags = contain::computed_value::T::empty();
         let gecko_flags = self.gecko.mContain;
 
         if gecko_flags & (NS_STYLE_CONTAIN_STRICT as u8) != 0 {
             debug_assert_eq!(
                 gecko_flags & (NS_STYLE_CONTAIN_ALL_BITS as u8),
                 NS_STYLE_CONTAIN_ALL_BITS as u8,
@@ -3642,41 +3642,41 @@ fn static_assert() {
         return servo_flags;
     }
 
     ${impl_simple_copy("contain", "mContain")}
 
     ${impl_simple_type_with_conversion("touch_action")}
 
     pub fn set_offset_path(&mut self, v: longhands::offset_path::computed_value::T) {
-        use gecko_bindings::bindings::{Gecko_NewStyleMotion, Gecko_SetStyleMotion};
-        use gecko_bindings::structs::StyleShapeSourceType;
-        use values::generics::basic_shape::FillRule;
-        use values::specified::OffsetPath;
+        use crate::gecko_bindings::bindings::{Gecko_NewStyleMotion, Gecko_SetStyleMotion};
+        use crate::gecko_bindings::structs::StyleShapeSourceType;
+        use crate::values::generics::basic_shape::FillRule;
+        use crate::values::specified::OffsetPath;
 
         let motion = unsafe { Gecko_NewStyleMotion().as_mut().unwrap() };
         match v {
             OffsetPath::None => motion.mOffsetPath.mType = StyleShapeSourceType::None,
             OffsetPath::Path(p) => {
                 set_style_svg_path(&mut motion.mOffsetPath, &p, FillRule::Nonzero)
             },
         }
         unsafe { Gecko_SetStyleMotion(&mut self.gecko.mMotion, motion) };
     }
 
     pub fn clone_offset_path(&self) -> longhands::offset_path::computed_value::T {
-        use values::specified::OffsetPath;
+        use crate::values::specified::OffsetPath;
         match unsafe { self.gecko.mMotion.mPtr.as_ref() } {
             None => OffsetPath::none(),
             Some(v) => (&v.mOffsetPath).into()
         }
     }
 
     pub fn copy_offset_path_from(&mut self, other: &Self) {
-        use gecko_bindings::bindings::Gecko_CopyStyleMotions;
+        use crate::gecko_bindings::bindings::Gecko_CopyStyleMotions;
         unsafe { Gecko_CopyStyleMotions(&mut self.gecko.mMotion, other.gecko.mMotion.mPtr) };
     }
 
     pub fn reset_offset_path(&mut self, other: &Self) {
         self.copy_offset_path_from(other);
     }
 
 </%self:impl_trait>
@@ -3686,17 +3686,17 @@ fn static_assert() {
         image_layers_field = "mImage" if shorthand == "background" else "mMask"
         copy_simple_image_array_property(name, shorthand, image_layers_field, field_name)
     %>
 
     pub fn set_${shorthand}_${name}<I>(&mut self, v: I)
         where I: IntoIterator<Item=longhands::${shorthand}_${name}::computed_value::single_value::T>,
               I::IntoIter: ExactSizeIterator
     {
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
         let v = v.into_iter();
 
         unsafe {
           Gecko_EnsureImageLayersLength(&mut self.gecko.${image_layers_field}, v.len(),
                                         LayerType::${shorthand.title()});
         }
 
         self.gecko.${image_layers_field}.${field_name}Count = v.len() as u32;
@@ -3705,17 +3705,17 @@ fn static_assert() {
                 ${caller.body()}
             };
         }
     }
 </%def>
 
 <%def name="copy_simple_image_array_property(name, shorthand, layers_field_name, field_name)">
     pub fn copy_${shorthand}_${name}_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
 
         let count = other.gecko.${layers_field_name}.${field_name}Count;
         unsafe {
             Gecko_EnsureImageLayersLength(&mut self.gecko.${layers_field_name},
                                           count as usize,
                                           LayerType::${shorthand.title()});
         }
         // FIXME(emilio): This may be bogus in the same way as bug 1426246.
@@ -3742,18 +3742,18 @@ fn static_assert() {
 
     <% copy_simple_image_array_property(name, shorthand, layer_field_name, field_name) %>
 
     pub fn set_${ident}<I>(&mut self, v: I)
     where
         I: IntoIterator<Item=longhands::${ident}::computed_value::single_value::T>,
         I::IntoIter: ExactSizeIterator,
     {
-        use properties::longhands::${ident}::single_value::computed_value::T as Keyword;
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::properties::longhands::${ident}::single_value::computed_value::T as Keyword;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
 
         let v = v.into_iter();
 
         unsafe {
           Gecko_EnsureImageLayersLength(&mut self.gecko.${layer_field_name}, v.len(),
                                         LayerType::${shorthand.title()});
         }
 
@@ -3766,17 +3766,17 @@ fn static_assert() {
                         structs::${keyword.gecko_constant(value)} ${keyword.maybe_cast('u8')},
                     % endfor
                 }
             };
         }
     }
 
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
-        use properties::longhands::${ident}::single_value::computed_value::T as Keyword;
+        use crate::properties::longhands::${ident}::single_value::computed_value::T as Keyword;
 
         % if keyword.needs_cast():
         % for value in keyword.values_for('gecko'):
         const ${keyword.casted_constant_name(value, "u8")} : u8 =
             structs::${keyword.gecko_constant(value)} as u8;
         % endfor
         % endif
 
@@ -3808,19 +3808,19 @@ fn static_assert() {
             image_layers_field = "mImage"
             struct_name = "Background"
         else:
             image_layers_field = "mMask"
             struct_name = "SVG"
     %>
 
     <%self:simple_image_array_property name="repeat" shorthand="${shorthand}" field_name="mRepeat">
-        use values::specified::background::BackgroundRepeatKeyword;
-        use gecko_bindings::structs::nsStyleImageLayers_Repeat;
-        use gecko_bindings::structs::StyleImageLayerRepeat;
+        use crate::values::specified::background::BackgroundRepeatKeyword;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_Repeat;
+        use crate::gecko_bindings::structs::StyleImageLayerRepeat;
 
         fn to_ns(repeat: BackgroundRepeatKeyword) -> StyleImageLayerRepeat {
             match repeat {
                 BackgroundRepeatKeyword::Repeat => StyleImageLayerRepeat::Repeat,
                 BackgroundRepeatKeyword::Space => StyleImageLayerRepeat::Space,
                 BackgroundRepeatKeyword::Round => StyleImageLayerRepeat::Round,
                 BackgroundRepeatKeyword::NoRepeat => StyleImageLayerRepeat::NoRepeat,
             }
@@ -3830,19 +3830,19 @@ fn static_assert() {
         let repeat_y = to_ns(servo.1);
         nsStyleImageLayers_Repeat {
               mXRepeat: repeat_x,
               mYRepeat: repeat_y,
         }
     </%self:simple_image_array_property>
 
     pub fn clone_${shorthand}_repeat(&self) -> longhands::${shorthand}_repeat::computed_value::T {
-        use properties::longhands::${shorthand}_repeat::single_value::computed_value::T;
-        use values::specified::background::BackgroundRepeatKeyword;
-        use gecko_bindings::structs::StyleImageLayerRepeat;
+        use crate::properties::longhands::${shorthand}_repeat::single_value::computed_value::T;
+        use crate::values::specified::background::BackgroundRepeatKeyword;
+        use crate::gecko_bindings::structs::StyleImageLayerRepeat;
 
         fn to_servo(repeat: StyleImageLayerRepeat) -> BackgroundRepeatKeyword {
             match repeat {
                 StyleImageLayerRepeat::Repeat => BackgroundRepeatKeyword::Repeat,
                 StyleImageLayerRepeat::Space => BackgroundRepeatKeyword::Space,
                 StyleImageLayerRepeat::Round => BackgroundRepeatKeyword::Round,
                 StyleImageLayerRepeat::NoRepeat => BackgroundRepeatKeyword::NoRepeat,
                 _ => panic!("Found unexpected value in style struct for ${shorthand}_repeat property"),
@@ -3858,17 +3858,17 @@ fn static_assert() {
         )
     }
 
     <% impl_simple_image_array_property("clip", shorthand, image_layers_field, "mClip", struct_name) %>
     <% impl_simple_image_array_property("origin", shorthand, image_layers_field, "mOrigin", struct_name) %>
 
     % for orientation in ["x", "y"]:
     pub fn copy_${shorthand}_position_${orientation}_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
 
         let count = other.gecko.${image_layers_field}.mPosition${orientation.upper()}Count;
 
         unsafe {
             Gecko_EnsureImageLayersLength(&mut self.gecko.${image_layers_field},
                                           count as usize,
                                           LayerType::${shorthand.capitalize()});
         }
@@ -3897,17 +3897,17 @@ fn static_assert() {
     }
 
     pub fn set_${shorthand}_position_${orientation[0]}<I>(&mut self,
                                      v: I)
         where I: IntoIterator<Item = longhands::${shorthand}_position_${orientation[0]}
                                               ::computed_value::single_value::T>,
               I::IntoIter: ExactSizeIterator
     {
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
 
         let v = v.into_iter();
 
         unsafe {
             Gecko_EnsureImageLayersLength(&mut self.gecko.${image_layers_field}, v.len(),
                                         LayerType::${shorthand.capitalize()});
         }
 
@@ -3915,20 +3915,20 @@ fn static_assert() {
         for (servo, geckolayer) in v.zip(self.gecko.${image_layers_field}
                                                            .mLayers.iter_mut()) {
             geckolayer.mPosition.m${orientation[0].upper()}Position = servo.into();
         }
     }
     % endfor
 
     <%self:simple_image_array_property name="size" shorthand="${shorthand}" field_name="mSize">
-        use gecko_bindings::structs::nsStyleImageLayers_Size_Dimension;
-        use gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType;
-        use gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImageLayers_Size};
-        use values::generics::background::BackgroundSize;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_Size_Dimension;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType;
+        use crate::gecko_bindings::structs::{nsStyleCoord_CalcValue, nsStyleImageLayers_Size};
+        use crate::values::generics::background::BackgroundSize;
 
         let mut width = nsStyleCoord_CalcValue::new();
         let mut height = nsStyleCoord_CalcValue::new();
 
         let (w_type, h_type) = match servo {
             BackgroundSize::Explicit { width: explicit_width, height: explicit_height } => {
                 let mut w_type = nsStyleImageLayers_Size_DimensionType::eAuto;
                 let mut h_type = nsStyleImageLayers_Size_DimensionType::eAuto;
@@ -3960,20 +3960,20 @@ fn static_assert() {
             mWidth: nsStyleImageLayers_Size_Dimension { _base: width },
             mHeight: nsStyleImageLayers_Size_Dimension { _base: height },
             mWidthType: w_type as u8,
             mHeightType: h_type as u8,
         }
     </%self:simple_image_array_property>
 
     pub fn clone_${shorthand}_size(&self) -> longhands::${shorthand}_size::computed_value::T {
-        use gecko_bindings::structs::nsStyleCoord_CalcValue as CalcValue;
-        use gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType as DimensionType;
-        use values::computed::NonNegativeLengthOrPercentageOrAuto;
-        use values::generics::background::BackgroundSize;
+        use crate::gecko_bindings::structs::nsStyleCoord_CalcValue as CalcValue;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_Size_DimensionType as DimensionType;
+        use crate::values::computed::NonNegativeLengthOrPercentageOrAuto;
+        use crate::values::generics::background::BackgroundSize;
 
         fn to_servo(value: CalcValue, ty: u8) -> NonNegativeLengthOrPercentageOrAuto {
             if ty == DimensionType::eAuto as u8 {
                 NonNegativeLengthOrPercentageOrAuto::auto()
             } else {
                 debug_assert_eq!(ty, DimensionType::eLengthPercentage as u8);
                 value.into()
             }
@@ -3993,17 +3993,17 @@ fn static_assert() {
                     width: to_servo(layer.mSize.mWidth._base, layer.mSize.mWidthType),
                     height: to_servo(layer.mSize.mHeight._base, layer.mSize.mHeightType),
                 }
             }).collect()
         )
     }
 
     pub fn copy_${shorthand}_image_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
         unsafe {
             let count = other.gecko.${image_layers_field}.mImageCount;
             Gecko_EnsureImageLayersLength(&mut self.gecko.${image_layers_field},
                                           count as usize,
                                           LayerType::${shorthand.capitalize()});
 
             for (layer, other) in self.gecko.${image_layers_field}.mLayers.iter_mut()
                                       .zip(other.gecko.${image_layers_field}.mLayers.iter())
@@ -4018,17 +4018,17 @@ fn static_assert() {
         self.copy_${shorthand}_image_from(other)
     }
 
     #[allow(unused_variables)]
     pub fn set_${shorthand}_image<I>(&mut self, images: I)
         where I: IntoIterator<Item = longhands::${shorthand}_image::computed_value::single_value::T>,
               I::IntoIter: ExactSizeIterator
     {
-        use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
 
         let images = images.into_iter();
 
         unsafe {
             // Prevent leaking of the last elements we did set
             for image in &mut self.gecko.${image_layers_field}.mLayers {
                 Gecko_SetNullImageValue(&mut image.mImage)
             }
@@ -4043,17 +4043,17 @@ fn static_assert() {
                                                   .mLayers.iter_mut()) {
             if let Either::Second(image) = image {
                 geckoimage.mImage.set(image)
             }
         }
     }
 
     pub fn clone_${shorthand}_image(&self) -> longhands::${shorthand}_image::computed_value::T {
-        use values::None_;
+        use crate::values::None_;
 
         longhands::${shorthand}_image::computed_value::List(
             self.gecko.${image_layers_field}.mLayers.iter()
                 .take(self.gecko.${image_layers_field}.mImageCount as usize)
                 .map(|ref layer| {
                     match unsafe { layer.mImage.into_image() } {
                         Some(image) => Either::Second(image),
                         None => Either::First(None_),
@@ -4066,17 +4066,17 @@ fn static_assert() {
         fill_fields = "mRepeat mClip mOrigin mPositionX mPositionY mImage mSize"
         if shorthand == "background":
             fill_fields += " mAttachment mBlendMode"
         else:
             # mSourceURI uses mImageCount
             fill_fields += " mMaskMode mComposite"
     %>
     pub fn fill_arrays(&mut self) {
-        use gecko_bindings::bindings::Gecko_FillAllImageLayers;
+        use crate::gecko_bindings::bindings::Gecko_FillAllImageLayers;
         use std::cmp;
         let mut max_len = 1;
         % for member in fill_fields.split():
             max_len = cmp::max(max_len, self.gecko.${image_layers_field}.${member}Count);
         % endfor
         unsafe {
             // While we could do this manually, we'd need to also manually
             // run all the copy constructors, so we just delegate to gecko
@@ -4128,30 +4128,30 @@ fn static_assert() {
         unsafe { Gecko_CopyListStyleImageFrom(&mut self.gecko, &other.gecko); }
     }
 
     pub fn reset_list_style_image(&mut self, other: &Self) {
         self.copy_list_style_image_from(other)
     }
 
     pub fn clone_list_style_image(&self) -> longhands::list_style_image::computed_value::T {
-        use values::computed::url::ComputedImageUrl;
+        use crate::values::computed::url::ComputedImageUrl;
 
         if self.gecko.mListStyleImage.mRawPtr.is_null() {
             return UrlOrNone::None;
         }
 
         unsafe {
             let ref gecko_image_request = *self.gecko.mListStyleImage.mRawPtr;
             UrlOrNone::Url(ComputedImageUrl::from_image_request(gecko_image_request))
         }
     }
 
     pub fn set_list_style_type(&mut self, v: longhands::list_style_type::computed_value::T, device: &Device) {
-        use gecko_bindings::bindings::Gecko_SetCounterStyleToString;
+        use crate::gecko_bindings::bindings::Gecko_SetCounterStyleToString;
         use nsstring::{nsACString, nsCStr};
         use self::longhands::list_style_type::computed_value::T;
         match v {
             T::CounterStyle(s) => s.to_gecko_value(&mut self.gecko.mCounterStyle, device),
             T::String(s) => unsafe {
                 Gecko_SetCounterStyleToString(&mut self.gecko.mCounterStyle,
                                               &nsCStr::from(&s) as &nsACString)
             }
@@ -4165,18 +4165,18 @@ fn static_assert() {
     }
 
     pub fn reset_list_style_type(&mut self, other: &Self) {
         self.copy_list_style_type_from(other)
     }
 
     pub fn clone_list_style_type(&self) -> longhands::list_style_type::computed_value::T {
         use self::longhands::list_style_type::computed_value::T;
-        use values::Either;
-        use values::generics::CounterStyleOrNone;
+        use crate::values::Either;
+        use crate::values::generics::CounterStyleOrNone;
 
         let result = CounterStyleOrNone::from_gecko_value(&self.gecko.mCounterStyle);
         match result {
             Either::First(counter_style) => T::CounterStyle(counter_style),
             Either::Second(string) => T::String(string),
         }
     }
 
@@ -4199,17 +4199,17 @@ fn static_assert() {
         let quote_pairs = unsafe { &*self.gecko.mQuotes.mRawPtr };
         longhands::quotes::computed_value::T(
             Box::<[QuotePair]>::as_arc(&quote_pairs).clone_arc()
         )
     }
 
     #[allow(non_snake_case)]
     pub fn set__moz_image_region(&mut self, v: longhands::_moz_image_region::computed_value::T) {
-        use values::Either;
+        use crate::values::Either;
 
         match v {
             Either::Second(_auto) => {
                 self.gecko.mImageRegion.x = 0;
                 self.gecko.mImageRegion.y = 0;
                 self.gecko.mImageRegion.width = 0;
                 self.gecko.mImageRegion.height = 0;
             }
@@ -4225,18 +4225,18 @@ fn static_assert() {
                     None => 0,
                 };
             }
         }
     }
 
     #[allow(non_snake_case)]
     pub fn clone__moz_image_region(&self) -> longhands::_moz_image_region::computed_value::T {
-        use values::{Auto, Either};
-        use values::computed::ClipRect;
+        use crate::values::{Auto, Either};
+        use crate::values::computed::ClipRect;
 
         // There is no ideal way to detect auto type for structs::nsRect and its components, so
         // if all components are zero, we use Auto.
         if self.gecko.mImageRegion.x == 0 &&
            self.gecko.mImageRegion.y == 0 &&
            self.gecko.mImageRegion.width == 0 &&
            self.gecko.mImageRegion.height == 0 {
            return Either::Second(Auto);
@@ -4292,23 +4292,23 @@ fn static_assert() {
     }
 
     pub fn clone_box_shadow(&self) -> longhands::box_shadow::computed_value::T {
         let buf = self.gecko.mBoxShadow.iter().map(|v| v.to_box_shadow()).collect();
         longhands::box_shadow::computed_value::List(buf)
     }
 
     pub fn set_clip(&mut self, v: longhands::clip::computed_value::T) {
-        use gecko_bindings::structs::NS_STYLE_CLIP_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_RECT;
-        use gecko_bindings::structs::NS_STYLE_CLIP_LEFT_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_TOP_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_RIGHT_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_BOTTOM_AUTO;
-        use values::Either;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_RECT;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_LEFT_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_TOP_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_RIGHT_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_BOTTOM_AUTO;
+        use crate::values::Either;
 
         match v {
             Either::First(rect) => {
                 self.gecko.mClipFlags = NS_STYLE_CLIP_RECT as u8;
                 if let Some(left) = rect.left {
                     self.gecko.mClip.x = left.to_i32_au();
                 } else {
                     self.gecko.mClip.x = 0;
@@ -4351,23 +4351,23 @@ fn static_assert() {
         self.gecko.mClipFlags = other.gecko.mClipFlags;
     }
 
     pub fn reset_clip(&mut self, other: &Self) {
         self.copy_clip_from(other)
     }
 
     pub fn clone_clip(&self) -> longhands::clip::computed_value::T {
-        use gecko_bindings::structs::NS_STYLE_CLIP_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_BOTTOM_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_LEFT_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_RIGHT_AUTO;
-        use gecko_bindings::structs::NS_STYLE_CLIP_TOP_AUTO;
-        use values::computed::{ClipRect, ClipRectOrAuto};
-        use values::Either;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_BOTTOM_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_LEFT_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_RIGHT_AUTO;
+        use crate::gecko_bindings::structs::NS_STYLE_CLIP_TOP_AUTO;
+        use crate::values::computed::{ClipRect, ClipRectOrAuto};
+        use crate::values::Either;
 
         if self.gecko.mClipFlags == NS_STYLE_CLIP_AUTO as u8 {
             ClipRectOrAuto::auto()
         } else {
             let left = if self.gecko.mClipFlags & NS_STYLE_CLIP_LEFT_AUTO as u8 != 0 {
                 debug_assert_eq!(self.gecko.mClip.x, 0);
                 None
             } else {
@@ -4408,29 +4408,29 @@ fn static_assert() {
                          'Opacity', 'Saturate', 'Sepia' ]
      %>
 
     pub fn set_filter<I>(&mut self, v: I)
     where
         I: IntoIterator<Item = Filter>,
         I::IntoIter: ExactSizeIterator,
     {
-        use values::generics::effects::Filter::*;
-        use gecko_bindings::structs::nsCSSShadowArray;
-        use gecko_bindings::structs::nsStyleFilter;
-        use gecko_bindings::structs::NS_STYLE_FILTER_BLUR;
-        use gecko_bindings::structs::NS_STYLE_FILTER_BRIGHTNESS;
-        use gecko_bindings::structs::NS_STYLE_FILTER_CONTRAST;
-        use gecko_bindings::structs::NS_STYLE_FILTER_GRAYSCALE;
-        use gecko_bindings::structs::NS_STYLE_FILTER_INVERT;
-        use gecko_bindings::structs::NS_STYLE_FILTER_OPACITY;
-        use gecko_bindings::structs::NS_STYLE_FILTER_SATURATE;
-        use gecko_bindings::structs::NS_STYLE_FILTER_SEPIA;
-        use gecko_bindings::structs::NS_STYLE_FILTER_HUE_ROTATE;
-        use gecko_bindings::structs::NS_STYLE_FILTER_DROP_SHADOW;
+        use crate::values::generics::effects::Filter::*;
+        use crate::gecko_bindings::structs::nsCSSShadowArray;
+        use crate::gecko_bindings::structs::nsStyleFilter;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_BLUR;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_BRIGHTNESS;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_CONTRAST;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_GRAYSCALE;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_INVERT;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_OPACITY;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_SATURATE;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_SEPIA;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_HUE_ROTATE;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_DROP_SHADOW;
 
         fn fill_filter(m_type: u32, value: CoordDataValue, gecko_filter: &mut nsStyleFilter){
             gecko_filter.mType = m_type;
             gecko_filter.mFilterParameter.set_value(value);
         }
 
         let v = v.into_iter();
         unsafe {
@@ -4484,29 +4484,29 @@ fn static_assert() {
         }
     }
 
     pub fn reset_filter(&mut self, other: &Self) {
         self.copy_filter_from(other)
     }
 
     pub fn clone_filter(&self) -> longhands::filter::computed_value::T {
-        use values::generics::effects::Filter;
-        use values::computed::url::ComputedUrl;
-        use gecko_bindings::structs::NS_STYLE_FILTER_BLUR;
-        use gecko_bindings::structs::NS_STYLE_FILTER_BRIGHTNESS;
-        use gecko_bindings::structs::NS_STYLE_FILTER_CONTRAST;
-        use gecko_bindings::structs::NS_STYLE_FILTER_GRAYSCALE;
-        use gecko_bindings::structs::NS_STYLE_FILTER_INVERT;
-        use gecko_bindings::structs::NS_STYLE_FILTER_OPACITY;
-        use gecko_bindings::structs::NS_STYLE_FILTER_SATURATE;
-        use gecko_bindings::structs::NS_STYLE_FILTER_SEPIA;
-        use gecko_bindings::structs::NS_STYLE_FILTER_HUE_ROTATE;
-        use gecko_bindings::structs::NS_STYLE_FILTER_DROP_SHADOW;
-        use gecko_bindings::structs::NS_STYLE_FILTER_URL;
+        use crate::values::generics::effects::Filter;
+        use crate::values::computed::url::ComputedUrl;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_BLUR;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_BRIGHTNESS;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_CONTRAST;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_GRAYSCALE;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_INVERT;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_OPACITY;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_SATURATE;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_SEPIA;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_HUE_ROTATE;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_DROP_SHADOW;
+        use crate::gecko_bindings::structs::NS_STYLE_FILTER_URL;
 
         let mut filters = Vec::new();
         for filter in self.gecko.mFilters.iter(){
             match filter.mType {
                 % for func in FILTER_FUNCTIONS:
                 NS_STYLE_FILTER_${func.upper()} => {
                     filters.push(Filter::${func}(
                         GeckoStyleCoordConvertible::from_gecko_style_coord(
@@ -4601,75 +4601,75 @@ fn static_assert() {
     }
 
     pub fn clone_text_shadow(&self) -> longhands::text_shadow::computed_value::T {
         let buf = self.gecko.mTextShadow.iter().map(|v| v.to_simple_shadow()).collect();
         longhands::text_shadow::computed_value::List(buf)
     }
 
     pub fn set_line_height(&mut self, v: longhands::line_height::computed_value::T) {
-        use values::generics::text::LineHeight;
+        use crate::values::generics::text::LineHeight;
         // FIXME: Align binary representations and ditch |match| for cast + static_asserts
         let en = match v {
             LineHeight::Normal => CoordDataValue::Normal,
             LineHeight::Length(val) => CoordDataValue::Coord(val.0.to_i32_au()),
             LineHeight::Number(val) => CoordDataValue::Factor(val.0),
             LineHeight::MozBlockHeight =>
                     CoordDataValue::Enumerated(structs::NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT),
         };
         self.gecko.mLineHeight.set_value(en);
     }
 
     pub fn clone_line_height(&self) -> longhands::line_height::computed_value::T {
-        use values::generics::text::LineHeight;
+        use crate::values::generics::text::LineHeight;
         return match self.gecko.mLineHeight.as_value() {
             CoordDataValue::Normal => LineHeight::Normal,
             CoordDataValue::Coord(coord) => LineHeight::Length(Au(coord).into()),
             CoordDataValue::Factor(n) => LineHeight::Number(n.into()),
             CoordDataValue::Enumerated(val) if val == structs::NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT =>
                 LineHeight::MozBlockHeight,
             _ => panic!("this should not happen"),
         }
     }
 
     <%call expr="impl_coord_copy('line_height', 'mLineHeight')"></%call>
 
     pub fn set_letter_spacing(&mut self, v: longhands::letter_spacing::computed_value::T) {
-        use values::generics::text::Spacing;
+        use crate::values::generics::text::Spacing;
         match v {
             Spacing::Value(value) => self.gecko.mLetterSpacing.set(value),
             Spacing::Normal => self.gecko.mLetterSpacing.set_value(CoordDataValue::Normal)
         }
     }
 
     pub fn clone_letter_spacing(&self) -> longhands::letter_spacing::computed_value::T {
-        use values::computed::Length;
-        use values::generics::text::Spacing;
+        use crate::values::computed::Length;
+        use crate::values::generics::text::Spacing;
         debug_assert!(
             matches!(self.gecko.mLetterSpacing.as_value(),
                      CoordDataValue::Normal |
                      CoordDataValue::Coord(_)),
             "Unexpected computed value for letter-spacing");
         Length::from_gecko_style_coord(&self.gecko.mLetterSpacing).map_or(Spacing::Normal, Spacing::Value)
     }
 
     <%call expr="impl_coord_copy('letter_spacing', 'mLetterSpacing')"></%call>
 
     pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) {
-        use values::generics::text::Spacing;
+        use crate::values::generics::text::Spacing;
         match v {
             Spacing::Value(lop) => self.gecko.mWordSpacing.set(lop),
             // https://drafts.csswg.org/css-text-3/#valdef-word-spacing-normal
             Spacing::Normal => self.gecko.mWordSpacing.set_value(CoordDataValue::Coord(0)),
         }
     }
 
     pub fn clone_word_spacing(&self) -> longhands::word_spacing::computed_value::T {
-        use values::computed::LengthOrPercentage;
-        use values::generics::text::Spacing;
+        use crate::values::computed::LengthOrPercentage;
+        use crate::values::generics::text::Spacing;
         debug_assert!(
             matches!(self.gecko.mWordSpacing.as_value(),
                      CoordDataValue::Normal |
                      CoordDataValue::Coord(_) |
                      CoordDataValue::Percent(_) |
                      CoordDataValue::Calc(_)),
             "Unexpected computed value for word-spacing");
         LengthOrPercentage::from_gecko_style_coord(&self.gecko.mWordSpacing).map_or(Spacing::Normal, Spacing::Value)
@@ -4682,18 +4682,18 @@ fn static_assert() {
             self.gecko.mTextEmphasisStyleString.truncate();
             self.gecko.mTextEmphasisStyle = structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE as u8;
         }
     }
 
     ${impl_simple_type_with_conversion("text_emphasis_position")}
 
     pub fn set_text_emphasis_style(&mut self, v: values::computed::TextEmphasisStyle) {
-        use values::computed::TextEmphasisStyle;
-        use values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
+        use crate::values::computed::TextEmphasisStyle;
+        use crate::values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
 
         self.clear_text_emphasis_style_if_string();
         let (te, s) = match v {
             TextEmphasisStyle::None => (structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE, ""),
             TextEmphasisStyle::Keyword(ref keyword) => {
                 let fill = match keyword.fill {
                     TextEmphasisFillMode::Filled => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_FILLED,
                     TextEmphasisFillMode::Open => structs::NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN,
@@ -4725,19 +4725,19 @@ fn static_assert() {
         self.gecko.mTextEmphasisStyle = other.gecko.mTextEmphasisStyle;
     }
 
     pub fn reset_text_emphasis_style(&mut self, other: &Self) {
         self.copy_text_emphasis_style_from(other)
     }
 
     pub fn clone_text_emphasis_style(&self) -> values::computed::TextEmphasisStyle {
-        use values::computed::TextEmphasisStyle;
-        use values::computed::text::TextEmphasisKeywordValue;
-        use values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
+        use crate::values::computed::TextEmphasisStyle;
+        use crate::values::computed::text::TextEmphasisKeywordValue;
+        use crate::values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
 
         if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_NONE as u8 {
             return TextEmphasisStyle::None;
         }
 
         if self.gecko.mTextEmphasisStyle == structs::NS_STYLE_TEXT_EMPHASIS_STYLE_STRING as u8 {
             return TextEmphasisStyle::String(self.gecko.mTextEmphasisStyleString.to_string());
         }
@@ -4788,30 +4788,30 @@ fn static_assert() {
 </%self:impl_trait>
 
 <%self:impl_trait style_struct_name="Text"
                   skip_longhands="text-decoration-line text-overflow initial-letter">
 
     ${impl_simple_type_with_conversion("text_decoration_line")}
 
     fn clear_overflow_sides_if_string(&mut self) {
-        use gecko_bindings::structs::nsStyleTextOverflowSide;
+        use crate::gecko_bindings::structs::nsStyleTextOverflowSide;
         fn clear_if_string(side: &mut nsStyleTextOverflowSide) {
             if side.mType == structs::NS_STYLE_TEXT_OVERFLOW_STRING as u8 {
                 side.mString.truncate();
                 side.mType = structs::NS_STYLE_TEXT_OVERFLOW_CLIP as u8;
             }
         }
         clear_if_string(&mut self.gecko.mTextOverflow.mLeft);
         clear_if_string(&mut self.gecko.mTextOverflow.mRight);
     }
 
     pub fn set_text_overflow(&mut self, v: longhands::text_overflow::computed_value::T) {
-        use gecko_bindings::structs::nsStyleTextOverflowSide;
-        use values::specified::text::TextOverflowSide;
+        use crate::gecko_bindings::structs::nsStyleTextOverflowSide;
+        use crate::values::specified::text::TextOverflowSide;
 
         fn set(side: &mut nsStyleTextOverflowSide, value: &TextOverflowSide) {
             let ty = match *value {
                 TextOverflowSide::Clip => structs::NS_STYLE_TEXT_OVERFLOW_CLIP,
                 TextOverflowSide::Ellipsis => structs::NS_STYLE_TEXT_OVERFLOW_ELLIPSIS,
                 TextOverflowSide::String(ref s) => {
                     side.mString.assign_str(s);
                     structs::NS_STYLE_TEXT_OVERFLOW_STRING
@@ -4823,17 +4823,17 @@ fn static_assert() {
         self.clear_overflow_sides_if_string();
         self.gecko.mTextOverflow.mLogicalDirections = v.sides_are_logical;
 
         set(&mut self.gecko.mTextOverflow.mLeft, &v.first);
         set(&mut self.gecko.mTextOverflow.mRight, &v.second);
     }
 
     pub fn copy_text_overflow_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleTextOverflowSide;
+        use crate::gecko_bindings::structs::nsStyleTextOverflowSide;
         fn set(side: &mut nsStyleTextOverflowSide, other: &nsStyleTextOverflowSide) {
             if other.mType == structs::NS_STYLE_TEXT_OVERFLOW_STRING as u8 {
                 side.mString.assign(&*other.mString)
             }
             side.mType = other.mType
         }
         self.clear_overflow_sides_if_string();
         set(&mut self.gecko.mTextOverflow.mLeft, &other.gecko.mTextOverflow.mLeft);
@@ -4841,18 +4841,18 @@ fn static_assert() {
         self.gecko.mTextOverflow.mLogicalDirections = other.gecko.mTextOverflow.mLogicalDirections;
     }
 
     pub fn reset_text_overflow(&mut self, other: &Self) {
         self.copy_text_overflow_from(other)
     }
 
     pub fn clone_text_overflow(&self) -> longhands::text_overflow::computed_value::T {
-        use gecko_bindings::structs::nsStyleTextOverflowSide;
-        use values::specified::text::TextOverflowSide;
+        use crate::gecko_bindings::structs::nsStyleTextOverflowSide;
+        use crate::values::specified::text::TextOverflowSide;
 
         fn to_servo(side: &nsStyleTextOverflowSide) -> TextOverflowSide {
             match side.mType as u32 {
                 structs::NS_STYLE_TEXT_OVERFLOW_CLIP => TextOverflowSide::Clip,
                 structs::NS_STYLE_TEXT_OVERFLOW_ELLIPSIS => TextOverflowSide::Ellipsis,
                 structs::NS_STYLE_TEXT_OVERFLOW_STRING =>
                     TextOverflowSide::String(side.mString.to_string().into_boxed_str()),
                 _ => panic!("Found unexpected value in style struct for text_overflow property"),
@@ -4862,17 +4862,17 @@ fn static_assert() {
         longhands::text_overflow::computed_value::T {
             first: to_servo(&self.gecko.mTextOverflow.mLeft),
             second: to_servo(&self.gecko.mTextOverflow.mRight),
             sides_are_logical: self.gecko.mTextOverflow.mLogicalDirections
         }
     }
 
     pub fn set_initial_letter(&mut self, v: longhands::initial_letter::computed_value::T) {
-        use values::generics::text::InitialLetter;
+        use crate::values::generics::text::InitialLetter;
         match v {
             InitialLetter::Normal => {
                 self.gecko.mInitialLetterSize = 0.;
                 self.gecko.mInitialLetterSink = 0;
             },
             InitialLetter::Specified(size, sink) => {
                 self.gecko.mInitialLetterSize = size;
                 if let Some(sink) = sink {
@@ -4889,17 +4889,17 @@ fn static_assert() {
         self.gecko.mInitialLetterSink = other.gecko.mInitialLetterSink;
     }
 
     pub fn reset_initial_letter(&mut self, other: &Self) {
         self.copy_initial_letter_from(other)
     }
 
     pub fn clone_initial_letter(&self) -> longhands::initial_letter::computed_value::T {
-        use values::generics::text::InitialLetter;
+        use crate::values::generics::text::InitialLetter;
 
         if self.gecko.mInitialLetterSize == 0. && self.gecko.mInitialLetterSink == 0 {
             InitialLetter::Normal
         } else if self.gecko.mInitialLetterSize.floor() as i32 == self.gecko.mInitialLetterSink {
             InitialLetter::Specified(self.gecko.mInitialLetterSize, None)
         } else {
             InitialLetter::Specified(self.gecko.mInitialLetterSize, Some(self.gecko.mInitialLetterSink))
         }
@@ -4922,18 +4922,18 @@ fn static_assert() {
 </%self:impl_trait>
 
 // Set SVGPathData to StyleShapeSource.
 fn set_style_svg_path(
     shape_source: &mut structs::mozilla::StyleShapeSource,
     servo_path: &values::specified::svg_path::SVGPathData,
     fill: values::generics::basic_shape::FillRule,
 ) {
-    use gecko_bindings::bindings::Gecko_NewStyleSVGPath;
-    use gecko_bindings::structs::StyleShapeSourceType;
+    use crate::gecko_bindings::bindings::Gecko_NewStyleSVGPath;
+    use crate::gecko_bindings::structs::StyleShapeSourceType;
 
     // Setup type.
     shape_source.mType = StyleShapeSourceType::Path;
 
     // Setup path.
     let gecko_path = unsafe {
         Gecko_NewStyleSVGPath(shape_source);
         &mut shape_source.__bindgen_anon_1.mSVGPath.as_mut().mPtr.as_mut().unwrap()
@@ -4942,22 +4942,22 @@ fn set_style_svg_path(
     gecko_path.mPath.assign_from_iter_pod(servo_path.commands().iter().cloned());
 
     // Setup fill-rule.
     gecko_path.mFillRule = fill;
 }
 
 <%def name="impl_shape_source(ident, gecko_ffi_name)">
     pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
-        use gecko_bindings::bindings::{Gecko_NewBasicShape, Gecko_DestroyShapeSource};
-        use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType};
-        use gecko_bindings::structs::{StyleGeometryBox, StyleShapeSource};
-        use gecko::conversions::basic_shape::set_corners_from_radius;
-        use gecko::values::GeckoStyleCoordConvertible;
-        use values::generics::basic_shape::{BasicShape, ShapeSource};
+        use crate::gecko_bindings::bindings::{Gecko_NewBasicShape, Gecko_DestroyShapeSource};
+        use crate::gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType, StyleShapeSourceType};
+        use crate::gecko_bindings::structs::{StyleGeometryBox, StyleShapeSource};
+        use crate::gecko::conversions::basic_shape::set_corners_from_radius;
+        use crate::gecko::values::GeckoStyleCoordConvertible;
+        use crate::values::generics::basic_shape::{BasicShape, ShapeSource};
 
         let ref mut ${ident} = self.gecko.${gecko_ffi_name};
 
         // clean up existing struct
         unsafe { Gecko_DestroyShapeSource(${ident}) };
         ${ident}.mType = StyleShapeSourceType::None;
 
         match v {
@@ -5059,17 +5059,17 @@ fn set_style_svg_path(
 
     }
 
     pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
         (&self.gecko.${gecko_ffi_name}).into()
     }
 
     pub fn copy_${ident}_from(&mut self, other: &Self) {
-        use gecko_bindings::bindings::Gecko_CopyShapeSourceFrom;
+        use crate::gecko_bindings::bindings::Gecko_CopyShapeSourceFrom;
         unsafe {
             Gecko_CopyShapeSourceFrom(&mut self.gecko.${gecko_ffi_name}, &other.gecko.${gecko_ffi_name});
         }
     }
 
     pub fn reset_${ident}(&mut self, other: &Self) {
         self.copy_${ident}_from(other)
     }
@@ -5093,23 +5093,23 @@ clip-path
                   skip_longhands="paint-order stroke-dasharray -moz-context-properties">
     pub fn set_paint_order(&mut self, v: longhands::paint_order::computed_value::T) {
         self.gecko.mPaintOrder = v.0;
     }
 
     ${impl_simple_copy('paint_order', 'mPaintOrder')}
 
     pub fn clone_paint_order(&self) -> longhands::paint_order::computed_value::T {
-        use properties::longhands::paint_order::computed_value::T;
+        use crate::properties::longhands::paint_order::computed_value::T;
         T(self.gecko.mPaintOrder)
     }
 
     pub fn set_stroke_dasharray(&mut self, v: longhands::stroke_dasharray::computed_value::T) {
-        use gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
-        use values::generics::svg::{SVGStrokeDashArray, SvgLengthOrPercentageOrNumber};
+        use crate::gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
+        use crate::values::generics::svg::{SVGStrokeDashArray, SvgLengthOrPercentageOrNumber};
 
         match v {
             SVGStrokeDashArray::Values(v) => {
                 let v = v.into_iter();
                 self.gecko.mContextFlags &= !CONTEXT_VALUE;
                 unsafe {
                     bindings::Gecko_nsStyleSVG_SetDashArrayLength(&mut self.gecko, v.len() as u32);
                 }
@@ -5127,33 +5127,33 @@ clip-path
                 unsafe {
                     bindings::Gecko_nsStyleSVG_SetDashArrayLength(&mut self.gecko, 0);
                 }
             }
         }
     }
 
     pub fn copy_stroke_dasharray_from(&mut self, other: &Self) {
-        use gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
+        use crate::gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
         unsafe {
             bindings::Gecko_nsStyleSVG_CopyDashArray(&mut self.gecko, &other.gecko);
         }
         self.gecko.mContextFlags =
             (self.gecko.mContextFlags & !CONTEXT_VALUE) |
             (other.gecko.mContextFlags & CONTEXT_VALUE);
     }
 
     pub fn reset_stroke_dasharray(&mut self, other: &Self) {
         self.copy_stroke_dasharray_from(other)
     }
 
     pub fn clone_stroke_dasharray(&self) -> longhands::stroke_dasharray::computed_value::T {
-        use gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
-        use values::computed::LengthOrPercentage;
-        use values::generics::svg::{SVGStrokeDashArray, SvgLengthOrPercentageOrNumber};
+        use crate::gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
+        use crate::values::computed::LengthOrPercentage;
+        use crate::values::generics::svg::{SVGStrokeDashArray, SvgLengthOrPercentageOrNumber};
 
         if self.gecko.mContextFlags & CONTEXT_VALUE != 0 {
             debug_assert_eq!(self.gecko.mStrokeDasharray.len(), 0);
             return SVGStrokeDashArray::ContextValue;
         }
         let mut vec = vec![];
         for gecko in self.gecko.mStrokeDasharray.iter() {
             match gecko.as_value() {
@@ -5325,18 +5325,18 @@ clip-path
         }
     }
 
     pub fn reset_cursor(&mut self, other: &Self) {
         self.copy_cursor_from(other)
     }
 
     pub fn clone_cursor(&self) -> longhands::cursor::computed_value::T {
-        use values::computed::ui::CursorImage;
-        use values::computed::url::ComputedImageUrl;
+        use crate::values::computed::ui::CursorImage;
+        use crate::values::computed::url::ComputedImageUrl;
         use style_traits::cursor::CursorKind;
 
         let keyword = match self.gecko.mCursor as u32 {
             structs::NS_STYLE_CURSOR_AUTO => CursorKind::Auto,
             structs::NS_STYLE_CURSOR_NONE => CursorKind::None,
             structs::NS_STYLE_CURSOR_DEFAULT => CursorKind::Default,
             structs::NS_STYLE_CURSOR_POINTER => CursorKind::Pointer,
             structs::NS_STYLE_CURSOR_CONTEXT_MENU => CursorKind::ContextMenu,
@@ -5389,18 +5389,18 @@ clip-path
 
             CursorImage { url, hotspot }
         }).collect::<Vec<_>>().into_boxed_slice();
 
         longhands::cursor::computed_value::T { images, keyword }
     }
 
     pub fn set_scrollbar_color(&mut self, v: longhands::scrollbar_color::computed_value::T) {
-        use gecko_bindings::structs::StyleComplexColor;
-        use values::generics::ui::ScrollbarColor;
+        use crate::gecko_bindings::structs::StyleComplexColor;
+        use crate::values::generics::ui::ScrollbarColor;
         match v {
             ScrollbarColor::Auto => {
                 self.gecko.mScrollbarFaceColor = StyleComplexColor::auto();
                 self.gecko.mScrollbarTrackColor = StyleComplexColor::auto();
             }
             ScrollbarColor::Colors { thumb, track } => {
                 self.gecko.mScrollbarFaceColor = thumb.into();
                 self.gecko.mScrollbarTrackColor = track.into();
@@ -5413,18 +5413,18 @@ clip-path
         self.gecko.mScrollbarTrackColor = other.gecko.mScrollbarTrackColor;
     }
 
     pub fn reset_scrollbar_color(&mut self, other: &Self) {
         self.copy_scrollbar_color_from(other);
     }
 
     pub fn clone_scrollbar_color(&self) -> longhands::scrollbar_color::computed_value::T {
-        use gecko_bindings::structs::StyleComplexColor_Tag as Tag;
-        use values::generics::ui::ScrollbarColor;
+        use crate::gecko_bindings::structs::StyleComplexColor_Tag as Tag;
+        use crate::values::generics::ui::ScrollbarColor;
         debug_assert!(
             (self.gecko.mScrollbarFaceColor.mTag == Tag::eAuto) ==
             (self.gecko.mScrollbarTrackColor.mTag == Tag::eAuto),
             "Whether the two colors are `auto` should match",
         );
         if self.gecko.mScrollbarFaceColor.mTag == Tag::eAuto {
             ScrollbarColor::Auto
         } else {
@@ -5436,30 +5436,30 @@ clip-path
     }
 </%self:impl_trait>
 
 <%self:impl_trait style_struct_name="Column"
                   skip_longhands="column-count column-rule-width">
 
     #[allow(unused_unsafe)]
     pub fn set_column_count(&mut self, v: longhands::column_count::computed_value::T) {
-        use gecko_bindings::structs::{nsStyleColumn_kColumnCountAuto, nsStyleColumn_kMaxColumnCount};
+        use crate::gecko_bindings::structs::{nsStyleColumn_kColumnCountAuto, nsStyleColumn_kMaxColumnCount};
 
         self.gecko.mColumnCount = match v {
             ColumnCount::Integer(integer) => {
                 cmp::min(integer.0 as u32, unsafe { nsStyleColumn_kMaxColumnCount })
             },
             ColumnCount::Auto => nsStyleColumn_kColumnCountAuto
         };
     }
 
     ${impl_simple_copy('column_count', 'mColumnCount')}
 
     pub fn clone_column_count(&self) -> longhands::column_count::computed_value::T {
-        use gecko_bindings::structs::{nsStyleColumn_kColumnCountAuto, nsStyleColumn_kMaxColumnCount};
+        use crate::gecko_bindings::structs::{nsStyleColumn_kColumnCountAuto, nsStyleColumn_kMaxColumnCount};
         if self.gecko.mColumnCount != nsStyleColumn_kColumnCountAuto {
             debug_assert!(self.gecko.mColumnCount >= 1 &&
                           self.gecko.mColumnCount <= nsStyleColumn_kMaxColumnCount);
             ColumnCount::Integer((self.gecko.mColumnCount as i32).into())
         } else {
             ColumnCount::Auto
         }
     }
@@ -5470,23 +5470,23 @@ clip-path
 
 <%self:impl_trait style_struct_name="Counters"
                   skip_longhands="content counter-increment counter-reset">
     pub fn ineffective_content_property(&self) -> bool {
         self.gecko.mContents.is_empty()
     }
 
     pub fn set_content(&mut self, v: longhands::content::computed_value::T, device: &Device) {
-        use values::CustomIdent;
-        use values::generics::counters::{Content, ContentItem};
-        use values::generics::CounterStyleOrNone;
-        use gecko_bindings::structs::nsStyleContentData;
-        use gecko_bindings::structs::nsStyleContentAttr;
-        use gecko_bindings::structs::StyleContentType;
-        use gecko_bindings::bindings::Gecko_ClearAndResizeStyleContents;
+        use crate::values::CustomIdent;
+        use crate::values::generics::counters::{Content, ContentItem};
+        use crate::values::generics::CounterStyleOrNone;
+        use crate::gecko_bindings::structs::nsStyleContentData;
+        use crate::gecko_bindings::structs::nsStyleContentAttr;
+        use crate::gecko_bindings::structs::StyleContentType;
+        use crate::gecko_bindings::bindings::Gecko_ClearAndResizeStyleContents;
 
         // Converts a string as utf16, and returns an owned, zero-terminated raw buffer.
         fn as_utf16_and_forget(s: &str) -> *mut u16 {
             use std::mem;
             let mut vec = s.encode_utf16().collect::<Vec<_>>();
             vec.push(0u16);
             let ptr = vec.as_mut_ptr();
             mem::forget(vec);
@@ -5608,35 +5608,35 @@ clip-path
                         }
                     }
                 }
             }
         }
     }
 
     pub fn copy_content_from(&mut self, other: &Self) {
-        use gecko_bindings::bindings::Gecko_CopyStyleContentsFrom;
+        use crate::gecko_bindings::bindings::Gecko_CopyStyleContentsFrom;
         unsafe {
             Gecko_CopyStyleContentsFrom(&mut self.gecko, &other.gecko)
         }
     }
 
     pub fn reset_content(&mut self, other: &Self) {
         self.copy_content_from(other)
     }
 
     pub fn clone_content(&self) -> longhands::content::computed_value::T {
         use {Atom, Namespace};
-        use gecko::conversions::string_from_chars_pointer;
-        use gecko_bindings::structs::StyleContentType;
-        use values::generics::counters::{Content, ContentItem};
-        use values::computed::url::ComputedImageUrl;
-        use values::{CustomIdent, Either};
-        use values::generics::CounterStyleOrNone;
-        use values::specified::Attr;
+        use crate::gecko::conversions::string_from_chars_pointer;
+        use crate::gecko_bindings::structs::StyleContentType;
+        use crate::values::generics::counters::{Content, ContentItem};
+        use crate::values::computed::url::ComputedImageUrl;
+        use crate::values::{CustomIdent, Either};
+        use crate::values::generics::CounterStyleOrNone;
+        use crate::values::specified::Attr;
 
         if self.gecko.mContents.is_empty() {
             return Content::None;
         }
 
         if self.gecko.mContents.len() == 1 &&
            self.gecko.mContents[0].mType == StyleContentType::AltContent {
             return Content::MozAltContent;
@@ -5723,18 +5723,18 @@ clip-path
 
         pub fn reset_counter_${counter_property.lower()}(&mut self, other: &Self) {
             self.copy_counter_${counter_property.lower()}_from(other)
         }
 
         pub fn clone_counter_${counter_property.lower()}(
             &self
         ) -> longhands::counter_${counter_property.lower()}::computed_value::T {
-            use values::generics::counters::CounterPair;
-            use values::CustomIdent;
+            use crate::values::generics::counters::CounterPair;
+            use crate::values::CustomIdent;
 
             longhands::counter_${counter_property.lower()}::computed_value::T::new(
                 self.gecko.m${counter_property}s.iter().map(|ref gecko_counter| {
                     CounterPair {
                         name: CustomIdent(Atom::from(gecko_counter.mCounter.to_string())),
                         value: gecko_counter.mValue,
                     }
                 }).collect()
--- a/servo/components/style/properties/helpers.mako.rs
+++ b/servo/components/style/properties/helpers.mako.rs
@@ -12,25 +12,25 @@
             computed_type=None, initial_specified_value=None,
             allow_quirks=False, allow_empty=False, **kwargs)">
     <%def name="predefined_type_inner(name, type, initial_value, parse_method)">
         #[allow(unused_imports)]
         use app_units::Au;
         #[allow(unused_imports)]
         use cssparser::{Color as CSSParserColor, RGBA};
         #[allow(unused_imports)]
-        use values::specified::AllowQuirks;
+        use crate::values::specified::AllowQuirks;
         #[allow(unused_imports)]
         use smallvec::SmallVec;
-        pub use values::specified::${type} as SpecifiedValue;
+        pub use crate::values::specified::${type} as SpecifiedValue;
         pub mod computed_value {
             % if computed_type:
             pub use ${computed_type} as T;
             % else:
-            pub use values::computed::${type} as T;
+            pub use crate::values::computed::${type} as T;
             % endif
         }
         % if initial_value:
         #[inline] pub fn get_initial_value() -> computed_value::T { ${initial_value} }
         % endif
         % if initial_specified_value:
         #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { ${initial_specified_value} }
         % endif
@@ -86,42 +86,42 @@
                           **kwargs)">
         #[allow(unused_imports)]
         use smallvec::SmallVec;
 
         pub mod single_value {
             #[allow(unused_imports)]
             use cssparser::{Parser, BasicParseError};
             #[allow(unused_imports)]
-            use parser::{Parse, ParserContext};
+            use crate::parser::{Parse, ParserContext};
             #[allow(unused_imports)]
-            use properties::ShorthandId;
+            use crate::properties::ShorthandId;
             #[allow(unused_imports)]
             use selectors::parser::SelectorParseErrorKind;
             #[allow(unused_imports)]
             use style_traits::{ParseError, StyleParseErrorKind};
             #[allow(unused_imports)]
-            use values::computed::{Context, ToComputedValue};
+            use crate::values::computed::{Context, ToComputedValue};
             #[allow(unused_imports)]
-            use values::{computed, specified};
+            use crate::values::{computed, specified};
             #[allow(unused_imports)]
-            use values::{Auto, Either, None_, Normal};
+            use crate::values::{Auto, Either, None_, Normal};
             ${caller.body()}
         }
 
         /// The definition of the computed value for ${name}.
         pub mod computed_value {
             pub use super::single_value::computed_value as single_value;
             pub use self::single_value::T as SingleComputedValue;
             % if allow_empty and allow_empty != "NotInitial":
             use std::vec::IntoIter;
             % else:
             use smallvec::{IntoIter, SmallVec};
             % endif
-            use values::computed::ComputedVecIter;
+            use crate::values::computed::ComputedVecIter;
 
             /// The generic type defining the value for this property.
             ///
             /// Making this type generic allows the compiler to figure out the
             /// animated value for us, instead of having to implement it
             /// manually for every type we care about.
             % if separator == "Comma":
             #[css(comma)]
@@ -143,19 +143,19 @@
 
 
             /// The computed value, effectively a list of single values.
             % if vector_animation_type:
             % if not animation_value_type:
                 Sorry, this is stupid but needed for now.
             % endif
 
-            use properties::animated_properties::ListAnimation;
-            use values::animated::{Animate, ToAnimatedValue, ToAnimatedZero, Procedure};
-            use values::distance::{SquaredDistance, ComputeSquaredDistance};
+            use crate::properties::animated_properties::ListAnimation;
+            use crate::values::animated::{Animate, ToAnimatedValue, ToAnimatedZero, Procedure};
+            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
 
             // FIXME(emilio): For some reason rust thinks that this alias is
             // unused, even though it's clearly used below?
             #[allow(unused)]
             type AnimatedList = <List<single_value::T> as ToAnimatedValue>::AnimatedValue;
 
             impl ToAnimatedZero for AnimatedList {
                 fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
@@ -230,17 +230,17 @@
             use style_traits::Separator;
 
             % if allow_empty:
                 if input.try(|input| input.expect_ident_matching("none")).is_ok() {
                     return Ok(SpecifiedValue(Vec::new()))
                 }
             % endif
 
-            ::style_traits::${separator}::parse(input, |parser| {
+            style_traits::${separator}::parse(input, |parser| {
                 single_value::parse(context, parser)
             }).map(SpecifiedValue)
         }
 
         pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
 
         impl SpecifiedValue {
             pub fn compute_iter<'a, 'cx, 'cx_a>(
@@ -274,43 +274,43 @@
         if property is None:
             return ""
     %>
     /// ${property.spec}
     pub mod ${property.ident} {
         #[allow(unused_imports)]
         use cssparser::{Parser, BasicParseError, Token};
         #[allow(unused_imports)]
-        use parser::{Parse, ParserContext};
+        use crate::parser::{Parse, ParserContext};
         #[allow(unused_imports)]
-        use properties::{UnparsedValue, ShorthandId};
+        use crate::properties::{UnparsedValue, ShorthandId};
         #[allow(unused_imports)]
-        use values::{Auto, Either, None_, Normal};
+        use crate::values::{Auto, Either, None_, Normal};
         #[allow(unused_imports)]
-        use error_reporting::ParseErrorReporter;
+        use crate::error_reporting::ParseErrorReporter;
         #[allow(unused_imports)]
-        use properties::longhands;
+        use crate::properties::longhands;
         #[allow(unused_imports)]
-        use properties::{LonghandId, LonghandIdSet};
+        use crate::properties::{LonghandId, LonghandIdSet};
         #[allow(unused_imports)]
-        use properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
+        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
         #[allow(unused_imports)]
-        use properties::style_structs;
+        use crate::properties::style_structs;
         #[allow(unused_imports)]
         use selectors::parser::SelectorParseErrorKind;
         #[allow(unused_imports)]
         use servo_arc::Arc;
         #[allow(unused_imports)]
         use style_traits::{ParseError, StyleParseErrorKind};
         #[allow(unused_imports)]
-        use values::computed::{Context, ToComputedValue};
+        use crate::values::computed::{Context, ToComputedValue};
         #[allow(unused_imports)]
-        use values::{computed, generics, specified};
+        use crate::values::{computed, generics, specified};
         #[allow(unused_imports)]
-        use Atom;
+        use crate::Atom;
         ${caller.body()}
         #[allow(unused_variables)]
         pub fn cascade_property(
             declaration: &PropertyDeclaration,
             context: &mut computed::Context,
         ) {
             context.for_non_inherited_property =
                 % if property.style_struct.inherited:
@@ -423,17 +423,17 @@
         keyword_kwargs = {a: kwargs.pop(a, None) for a in [
             'gecko_constant_prefix', 'gecko_enum_prefix',
             'extra_gecko_values', 'extra_servo_values',
             'custom_consts', 'gecko_inexhaustive',
         ]}
         keyword = keyword=Keyword(name, values, **keyword_kwargs)
     %>
     <%call expr="longhand(name, keyword=Keyword(name, values, **keyword_kwargs), **kwargs)">
-        use properties::longhands::system_font::SystemFont;
+        use crate::properties::longhands::system_font::SystemFont;
 
         pub mod computed_value {
             #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
             #[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse,
                      PartialEq, SpecifiedValueInfo, ToCss)]
             pub enum T {
             % for value in keyword.values_for(product):
                 ${to_camel_case(value)},
@@ -506,17 +506,17 @@
         const_type = cast_to if cast_to else "u32"
     %>
     #[cfg(feature = "gecko")]
     impl ${type} {
         /// Obtain a specified value from a Gecko keyword value
         ///
         /// Intended for use with presentation attributes, not style structs
         pub fn from_gecko_keyword(kw: u32) -> Self {
-            use gecko_bindings::structs;
+            use crate::gecko_bindings::structs;
             % for value in values:
                 // We can't match on enum values if we're matching on a u32
                 const ${to_rust_ident(value).upper()}: ${const_type}
                     = structs::${keyword.gecko_constant(value)} as ${const_type};
             % endfor
             match kw ${maybe_cast} {
                 % for value in values:
                     ${to_rust_ident(value).upper()} => ${type}::${to_camel_case(value)},
@@ -530,31 +530,31 @@
 <%def name="gecko_bitflags_conversion(bit_map, gecko_bit_prefix, type, kw_type='u8')">
     #[cfg(feature = "gecko")]
     impl ${type} {
         /// Obtain a specified value from a Gecko keyword value
         ///
         /// Intended for use with presentation attributes, not style structs
         pub fn from_gecko_keyword(kw: ${kw_type}) -> Self {
             % for gecko_bit in bit_map.values():
-            use gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit};
+            use crate::gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit};
             % endfor
 
             let mut bits = ${type}::empty();
             % for servo_bit, gecko_bit in bit_map.iteritems():
                 if kw & (${gecko_bit_prefix}${gecko_bit} as ${kw_type}) != 0 {
                     bits |= ${servo_bit};
                 }
             % endfor
             bits
         }
 
         pub fn to_gecko_keyword(self) -> ${kw_type} {
             % for gecko_bit in bit_map.values():
-            use gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit};
+            use crate::gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit};
             % endfor
 
             let mut bits: ${kw_type} = 0;
             // FIXME: if we ensure that the Servo bitflags storage is the same
             // as Gecko's one, we can just copy it.
             % for servo_bit, gecko_bit in bit_map.iteritems():
                 if self.contains(${servo_bit}) {
                     bits |= ${gecko_bit_prefix}${gecko_bit} as ${kw_type};
@@ -663,18 +663,18 @@
     # we have to workaround it this way.
     if not isinstance(derive_value_info, bool):
         derive_value_info = eval(derive_value_info)
 %>
     % if shorthand:
     /// ${shorthand.spec}
     pub mod ${shorthand.ident} {
         use cssparser::Parser;
-        use parser::ParserContext;
-        use properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
+        use crate::parser::ParserContext;
+        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
         #[allow(unused_imports)]
         use selectors::parser::SelectorParseErrorKind;
         #[allow(unused_imports)]
         use std::fmt::{self, Write};
         #[allow(unused_imports)]
         use style_traits::{ParseError, StyleParseErrorKind};
         #[allow(unused_imports)]
         use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
@@ -767,17 +767,17 @@
         /// Parse the given shorthand and fill the result into the
         /// `declarations` vector.
         pub fn parse_into<'i, 't>(
             declarations: &mut SourcePropertyDeclaration,
             context: &ParserContext,
             input: &mut Parser<'i, 't>,
         ) -> Result<(), ParseError<'i>> {
             #[allow(unused_imports)]
-            use properties::{NonCustomPropertyId, LonghandId};
+            use crate::properties::{NonCustomPropertyId, LonghandId};
             input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
                 % for sub_property in shorthand.sub_properties:
                 % if sub_property.may_be_disabled_in(shorthand, product):
                 if NonCustomPropertyId::from(LonghandId::${sub_property.camel_case}).allowed_in(context) {
                 % endif
                     declarations.push(PropertyDeclaration::${sub_property.camel_case}(
                         longhands.${sub_property.ident}
                     ));
@@ -793,19 +793,19 @@
     % endif
 </%def>
 
 <%def name="four_sides_shorthand(name, sub_property_pattern, parser_function,
                                  needs_context=True, allow_quirks=False, **kwargs)">
     <% sub_properties=' '.join(sub_property_pattern % side for side in PHYSICAL_SIDES) %>
     <%call expr="self.shorthand(name, sub_properties=sub_properties, **kwargs)">
         #[allow(unused_imports)]
-        use parser::Parse;
-        use values::generics::rect::Rect;
-        use values::specified;
+        use crate::parser::Parse;
+        use crate::values::generics::rect::Rect;
+        use crate::values::specified;
 
         pub fn parse_value<'i, 't>(
             context: &ParserContext,
             input: &mut Parser<'i, 't>,
         ) -> Result<Longhands, ParseError<'i>> {
             let rect = Rect::parse_with(context, input, |_c, i| {
             % if allow_quirks:
                 ${parser_function}_quirky(_c, i, specified::AllowQuirks::Yes)
@@ -847,17 +847,17 @@
         if len(maybe_side) == 1:
             side = maybe_side[0]
         elif len(maybe_size) == 1:
             size = maybe_size[0]
         def phys_ident(side, phy_side):
             return to_rust_ident(name.replace(side, phy_side).replace("inset-", ""))
     %>
     % if side is not None:
-        use logical_geometry::PhysicalSide;
+        use crate::logical_geometry::PhysicalSide;
         match wm.${to_rust_ident(side)}_physical_side() {
             % for phy_side in PHYSICAL_SIDES:
                 PhysicalSide::${phy_side.title()} => {
                     ${caller.inner(physical_ident=phys_ident(side, phy_side))}
                 }
             % endfor
         }
     % elif size is not None:
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -4,50 +4,50 @@
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%
     from data import to_idl_name, SYSTEM_FONT_LONGHANDS, to_camel_case
     from itertools import groupby
 %>
 
-#[cfg(feature = "gecko")] use gecko_bindings::structs::RawServoAnimationValueMap;
-#[cfg(feature = "gecko")] use gecko_bindings::structs::RawGeckoGfxMatrix4x4;
-#[cfg(feature = "gecko")] use gecko_bindings::structs::nsCSSPropertyID;
-#[cfg(feature = "gecko")] use gecko_bindings::sugar::ownership::{HasFFI, HasSimpleFFI};
+#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::RawServoAnimationValueMap;
+#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::RawGeckoGfxMatrix4x4;
+#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::nsCSSPropertyID;
+#[cfg(feature = "gecko")] use crate::gecko_bindings::sugar::ownership::{HasFFI, HasSimpleFFI};
 use itertools::{EitherOrBoth, Itertools};
 use num_traits::Zero;
-use properties::{CSSWideKeyword, PropertyDeclaration};
-use properties::longhands;
-use properties::longhands::visibility::computed_value::T as Visibility;
-use properties::LonghandId;
+use crate::properties::{CSSWideKeyword, PropertyDeclaration};
+use crate::properties::longhands;
+use crate::properties::longhands::visibility::computed_value::T as Visibility;
+use crate::properties::LonghandId;
 use servo_arc::Arc;
 use smallvec::SmallVec;
 use std::{cmp, ptr};
 use std::mem::{self, ManuallyDrop};
-use hash::FxHashMap;
+use crate::hash::FxHashMap;
 use super::ComputedValues;
-use values::CSSFloat;
-use values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero};
-use values::animated::effects::Filter as AnimatedFilter;
-#[cfg(feature = "gecko")] use values::computed::TransitionProperty;
-use values::computed::Angle;
-use values::computed::{ClipRect, Context};
-use values::computed::{Length, LengthOrPercentage};
-use values::computed::{Number, Percentage};
-use values::computed::ToComputedValue;
-use values::computed::transform::{DirectionVector, Matrix, Matrix3D};
-use values::computed::transform::TransformOperation as ComputedTransformOperation;
-use values::computed::transform::Transform as ComputedTransform;
-use values::computed::transform::Rotate as ComputedRotate;
-use values::computed::transform::Translate as ComputedTranslate;
-use values::computed::transform::Scale as ComputedScale;
-use values::generics::transform::{self, Rotate, Translate, Scale, Transform, TransformOperation};
-use values::distance::{ComputeSquaredDistance, SquaredDistance};
-use values::generics::effects::Filter;
+use crate::values::CSSFloat;
+use crate::values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero};
+use crate::values::animated::effects::Filter as AnimatedFilter;
+#[cfg(feature = "gecko")] use crate::values::computed::TransitionProperty;
+use crate::values::computed::Angle;
+use crate::values::computed::{ClipRect, Context};
+use crate::values::computed::{Length, LengthOrPercentage};
+use crate::values::computed::{Number, Percentage};
+use crate::values::computed::ToComputedValue;
+use crate::values::computed::transform::{DirectionVector, Matrix, Matrix3D};
+use crate::values::computed::transform::TransformOperation as ComputedTransformOperation;
+use crate::values::computed::transform::Transform as ComputedTransform;
+use crate::values::computed::transform::Rotate as ComputedRotate;
+use crate::values::computed::transform::Translate as ComputedTranslate;
+use crate::values::computed::transform::Scale as ComputedScale;
+use crate::values::generics::transform::{self, Rotate, Translate, Scale, Transform, TransformOperation};
+use crate::values::distance::{ComputeSquaredDistance, SquaredDistance};
+use crate::values::generics::effects::Filter;
 use void::{self, Void};
 
 /// Convert nsCSSPropertyID to TransitionProperty
 #[cfg(feature = "gecko")]
 #[allow(non_upper_case_globals)]
 impl From<nsCSSPropertyID> for TransitionProperty {
     fn from(property: nsCSSPropertyID) -> TransitionProperty {
         use properties::ShorthandId;
@@ -352,17 +352,17 @@ impl AnimationValue {
             % endfor
         });
         id
     }
 
     /// "Uncompute" this animation value in order to be used inside the CSS
     /// cascade.
     pub fn uncompute(&self) -> PropertyDeclaration {
-        use properties::longhands;
+        use crate::properties::longhands;
         use self::AnimationValue::*;
 
         use super::PropertyDeclarationVariantRepr;
 
         match *self {
             <% keyfunc = lambda x: (x.base_type(), x.specified_type(), x.boxed, x.is_animatable_with_computed_value) %>
             % for (ty, specified, boxed, computed), props in groupby(animated, key=keyfunc):
             <% props = list(props) %>
@@ -396,17 +396,17 @@ impl AnimationValue {
             }
         }
     }
 
     /// Construct an AnimationValue from a property declaration.
     pub fn from_declaration(
         decl: &PropertyDeclaration,
         context: &mut Context,
-        extra_custom_properties: Option<<&Arc<::custom_properties::CustomPropertiesMap>>,
+        extra_custom_properties: Option<<&Arc<crate::custom_properties::CustomPropertiesMap>>,
         initial: &ComputedValues
     ) -> Option<Self> {
         use super::PropertyDeclarationVariantRepr;
 
         <%
             keyfunc = lambda x: (
                 x.specified_type(),
                 x.animated_type(),
@@ -810,17 +810,17 @@ impl ToAnimatedZero for Visibility {
         Err(())
     }
 }
 
 /// <https://drafts.csswg.org/css-transitions/#animtype-rect>
 impl Animate for ClipRect {
     #[inline]
     fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
-        use values::computed::Length;
+        use crate::values::computed::Length;
         let animate_component = |this: &Option<Length>, other: &Option<Length>| {
             match (this.animate(other, procedure)?, procedure) {
                 (None, Procedure::Interpolate { .. }) => Ok(None),
                 (None, _) => Err(()),
                 (result, _) => Ok(result),
             }
         };
 
@@ -1065,18 +1065,18 @@ impl Animate for ComputedTransformOperat
                 Ok(TransformOperation::Rotate(
                     fa.animate(&ta, procedure)?
                 ))
             },
             (
                 &TransformOperation::Perspective(ref fd),
                 &TransformOperation::Perspective(ref td),
             ) => {
-                use values::computed::CSSPixelLength;
-                use values::generics::transform::create_perspective_matrix;
+                use crate::values::computed::CSSPixelLength;
+                use crate::values::generics::transform::create_perspective_matrix;
 
                 // From https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions:
                 //
                 //    The transform functions matrix(), matrix3d() and
                 //    perspective() get converted into 4x4 matrices first and
                 //    interpolated as defined in section Interpolation of
                 //    Matrices afterwards.
                 //
@@ -1241,17 +1241,17 @@ impl Animate for MatrixDecomposed2D {
         })
     }
 }
 
 impl ComputeSquaredDistance for MatrixDecomposed2D {
     #[inline]
     fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
         // Use Radian to compute the distance.
-        const RAD_PER_DEG: f64 = ::std::f64::consts::PI / 180.0;
+        const RAD_PER_DEG: f64 = std::f64::consts::PI / 180.0;
         let angle1 = self.angle as f64 * RAD_PER_DEG;
         let angle2 = other.angle as f64 * RAD_PER_DEG;
         Ok(self.translate.compute_squared_distance(&other.translate)? +
            self.scale.compute_squared_distance(&other.scale)? +
            angle1.compute_squared_distance(&angle2)? +
            self.matrix.compute_squared_distance(&other.matrix)?)
     }
 }
--- a/servo/components/style/properties/longhands/border.mako.rs
+++ b/servo/components/style/properties/longhands/border.mako.rs
@@ -43,33 +43,33 @@
         logical=is_logical,
         logical_group="border-style",
         needs_context=False,
     )}
 
     ${helpers.predefined_type(
         "border-%s-width" % side_name,
         "BorderSideWidth",
-        "::values::computed::NonNegativeLength::new(3.)",
-        computed_type="::values::computed::NonNegativeLength",
+        "crate::values::computed::NonNegativeLength::new(3.)",
+        computed_type="crate::values::computed::NonNegativeLength",
         alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-width"),
         spec=maybe_logical_spec(side, "width"),
         animation_value_type="NonNegativeLength",
         logical=is_logical,
         logical_group="border-width",
         flags="APPLIES_TO_FIRST_LETTER GETCS_NEEDS_LAYOUT_FLUSH",
         allow_quirks=not is_logical,
         servo_restyle_damage="reflow rebuild_and_reflow_inline"
     )}
 % endfor
 
 ${helpers.gecko_keyword_conversion(
     Keyword('border-style',
     "none solid double dotted dashed hidden groove ridge inset outset"),
-    type="::values::specified::BorderStyle",
+    type="crate::values::specified::BorderStyle",
 )}
 
 // FIXME(#4126): when gfx supports painting it, make this Size2D<LengthOrPercentage>
 % for corner in ["top-left", "top-right", "bottom-right", "bottom-left"]:
     ${helpers.predefined_type(
         "border-" + corner + "-radius",
         "BorderCornerRadius",
         "computed::BorderCornerRadius::zero()",
@@ -155,21 +155,21 @@
     initial_specified_value="specified::NumberOrPercentage::Percentage(specified::Percentage::new(1.)).into()",
     spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",
     animation_value_type="discrete",
     flags="APPLIES_TO_FIRST_LETTER",
     boxed=True,
 )}
 
 #[cfg(feature = "gecko")]
-impl ::values::computed::BorderImageWidth {
-    pub fn to_gecko_rect(&self, sides: &mut ::gecko_bindings::structs::nsStyleSides) {
-        use gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
-        use gecko::values::GeckoStyleCoordConvertible;
-        use values::generics::border::BorderImageSideWidth;
+impl crate::values::computed::BorderImageWidth {
+    pub fn to_gecko_rect(&self, sides: &mut crate::gecko_bindings::structs::nsStyleSides) {
+        use crate::gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
+        use crate::gecko::values::GeckoStyleCoordConvertible;
+        use crate::values::generics::border::BorderImageSideWidth;
 
         % for i in range(0, 4):
         match self.${i} {
             BorderImageSideWidth::Auto => {
                 sides.data_at_mut(${i}).set_value(CoordDataValue::Auto)
             },
             BorderImageSideWidth::Length(l) => {
                 l.to_gecko_style_coord(&mut sides.data_at_mut(${i}))
@@ -177,26 +177,26 @@ impl ::values::computed::BorderImageWidt
             BorderImageSideWidth::Number(n) => {
                 sides.data_at_mut(${i}).set_value(CoordDataValue::Factor(n))
             },
         }
         % endfor
     }
 
     pub fn from_gecko_rect(
-        sides: &::gecko_bindings::structs::nsStyleSides,
-    ) -> Option<::values::computed::BorderImageWidth> {
-        use gecko_bindings::structs::nsStyleUnit::{eStyleUnit_Factor, eStyleUnit_Auto};
-        use gecko_bindings::sugar::ns_style_coord::CoordData;
-        use gecko::values::GeckoStyleCoordConvertible;
-        use values::computed::{LengthOrPercentage, Number};
-        use values::generics::border::BorderImageSideWidth;
+        sides: &crate::gecko_bindings::structs::nsStyleSides,
+    ) -> Option<crate::values::computed::BorderImageWidth> {
+        use crate::gecko_bindings::structs::nsStyleUnit::{eStyleUnit_Factor, eStyleUnit_Auto};
+        use crate::gecko_bindings::sugar::ns_style_coord::CoordData;
+        use crate::gecko::values::GeckoStyleCoordConvertible;
+        use crate::values::computed::{LengthOrPercentage, Number};
+        use crate::values::generics::border::BorderImageSideWidth;
 
         Some(
-            ::values::computed::BorderImageWidth::new(
+            crate::values::computed::BorderImageWidth::new(
                 % for i in range(0, 4):
                 match sides.data_at(${i}).unit() {
                     eStyleUnit_Auto => {
                         BorderImageSideWidth::Auto
                     },
                     eStyleUnit_Factor => {
                         BorderImageSideWidth::Number(
                             Number::from_gecko_style_coord(&sides.data_at(${i}))
--- a/servo/components/style/properties/longhands/color.mako.rs
+++ b/servo/components/style/properties/longhands/color.mako.rs
@@ -58,21 +58,21 @@ pub mod system_colors {
                           TextSelectForegroundCustom TextSelectBackgroundDisabled TextSelectBackgroundAttention
                           TextHighlightBackground TextHighlightForeground IMERawInputBackground
                           IMERawInputForeground IMERawInputUnderline IMESelectedRawTextBackground
                           IMESelectedRawTextForeground IMESelectedRawTextUnderline
                           IMEConvertedTextBackground IMEConvertedTextForeground IMEConvertedTextUnderline
                           IMESelectedConvertedTextBackground IMESelectedConvertedTextForeground
                           IMESelectedConvertedTextUnderline SpellCheckerUnderline""".split()
     %>
-    use gecko_bindings::bindings::Gecko_GetLookAndFeelSystemColor;
-    use gecko_bindings::structs::root::mozilla::LookAndFeel_ColorID;
+    use crate::gecko_bindings::bindings::Gecko_GetLookAndFeelSystemColor;
+    use crate::gecko_bindings::structs::root::mozilla::LookAndFeel_ColorID;
     use std::fmt::{self, Write};
     use style_traits::{CssWriter, ToCss};
-    use values::computed::{Context, ToComputedValue};
+    use crate::values::computed::{Context, ToComputedValue};
 
     pub type SystemColor = LookAndFeel_ColorID;
 
     // It's hard to implement MallocSizeOf for LookAndFeel_ColorID because it
     // is a bindgen type. So we implement it on the typedef instead.
     malloc_size_of_is_0!(SystemColor);
 
     impl ToCss for SystemColor {
--- a/servo/components/style/properties/longhands/column.mako.rs
+++ b/servo/components/style/properties/longhands/column.mako.rs
@@ -38,19 +38,19 @@
     animation_value_type="discrete",
     gecko_enum_prefix="StyleColumnFill",
     spec="https://drafts.csswg.org/css-multicol/#propdef-column-fill",
 )}
 
 ${helpers.predefined_type(
     "column-rule-width",
     "BorderSideWidth",
-    "::values::computed::NonNegativeLength::new(3.)",
+    "crate::values::computed::NonNegativeLength::new(3.)",
     initial_specified_value="specified::BorderSideWidth::Medium",
-    computed_type="::values::computed::NonNegativeLength",
+    computed_type="crate::values::computed::NonNegativeLength",
     products="gecko",
     spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width",
     animation_value_type="NonNegativeLength",
     extra_prefixes="moz",
 )}
 
 // https://drafts.csswg.org/css-multicol-1/#crc
 ${helpers.predefined_type(
--- a/servo/components/style/properties/longhands/font.mako.rs
+++ b/servo/components/style/properties/longhands/font.mako.rs
@@ -321,22 +321,22 @@ https://drafts.csswg.org/css-fonts-4/#lo
         //!
         //! When a longhand property is holding a SystemFont, it's serialized
         //! to an empty string as if its value comes from a shorthand with
         //! variable reference. We may want to improve this behavior at some
         //! point. See also https://github.com/w3c/csswg-drafts/issues/1586.
 
         use app_units::Au;
         use cssparser::{Parser, ToCss};
-        use gecko_bindings::structs::FontFamilyType;
-        use properties::longhands;
+        use crate::gecko_bindings::structs::FontFamilyType;
+        use crate::properties::longhands;
         use std::fmt;
         use std::hash::{Hash, Hasher};
         use style_traits::ParseError;
-        use values::computed::{ToComputedValue, Context};
+        use crate::values::computed::{ToComputedValue, Context};
 
         <%
             system_fonts = """caption icon menu message-box small-caption status-bar
                               -moz-window -moz-document -moz-workspace -moz-desktop
                               -moz-info -moz-dialog -moz-button -moz-pull-down-menu
                               -moz-list -moz-field""".split()
             kw_font_props = """font_variant_caps
                                font_kerning font_variant_position font_variant_ligatures
@@ -370,22 +370,22 @@ https://drafts.csswg.org/css-fonts-4/#lo
                 self.system_font.hash(hasher)
             }
         }
 
         impl ToComputedValue for SystemFont {
             type ComputedValue = ComputedSystemFont;
 
             fn to_computed_value(&self, cx: &Context) -> Self::ComputedValue {
-                use gecko_bindings::bindings;
-                use gecko_bindings::structs::{LookAndFeel_FontID, nsFont};
+                use crate::gecko_bindings::bindings;
+                use crate::gecko_bindings::structs::{LookAndFeel_FontID, nsFont};
                 use std::mem;
-                use values::computed::Percentage;
-                use values::computed::font::{FontSize, FontStretch, FontStyle, FontFamilyList};
-                use values::generics::NonNegative;
+                use crate::values::computed::Percentage;
+                use crate::values::computed::font::{FontSize, FontStretch, FontStyle, FontFamilyList};
+                use crate::values::generics::NonNegative;
 
                 let id = match *self {
                     % for font in system_fonts:
                         SystemFont::${to_camel_case(font)} => {
                             LookAndFeel_FontID::eFont_${to_camel_case(font.replace("-moz-", ""))}
                         }
                     % endfor
                 };
--- a/servo/components/style/properties/longhands/inherited_svg.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_svg.mako.rs
@@ -34,17 +34,17 @@
     gecko_constant_prefix="NS_STYLE_COLOR_INTERPOLATION",
     animation_value_type="discrete",
     spec="https://www.w3.org/TR/SVG11/painting.html#ColorInterpolationFiltersProperty",
 )}
 
 ${helpers.predefined_type(
     "fill",
     "SVGPaint",
-    "::values::computed::SVGPaint::black()",
+    "crate::values::computed::SVGPaint::black()",
     products="gecko",
     animation_value_type="IntermediateSVGPaint",
     boxed=True,
     spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingFillPaint",
 )}
 
 ${helpers.predefined_type(
     "fill-opacity",
@@ -82,17 +82,17 @@
     boxed=True,
     spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint",
 )}
 
 ${helpers.predefined_type(
     "stroke-width", "SVGWidth",
     "computed::SVGWidth::one()",
     products="gecko",
-    animation_value_type="::values::computed::SVGWidth",
+    animation_value_type="crate::values::computed::SVGWidth",
     spec="https://www.w3.org/TR/SVG2/painting.html#StrokeWidth",
 )}
 
 ${helpers.single_keyword(
     "stroke-linecap",
     "butt round square",
     products="gecko",
     animation_value_type="discrete",
@@ -107,17 +107,17 @@
     spec="https://www.w3.org/TR/SVG11/painting.html#StrokeLinejoinProperty",
 )}
 
 ${helpers.predefined_type(
     "stroke-miterlimit",
     "GreaterThanOrEqualToOneNumber",
     "From::from(4.0)",
     products="gecko",
-    animation_value_type="::values::computed::GreaterThanOrEqualToOneNumber",
+    animation_value_type="crate::values::computed::GreaterThanOrEqualToOneNumber",
     spec="https://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty",
 )}
 
 ${helpers.predefined_type(
     "stroke-opacity",
     "SVGOpacity",
     "Default::default()",
     products="gecko",
@@ -125,17 +125,17 @@
     spec="https://www.w3.org/TR/SVG11/painting.html#StrokeOpacityProperty",
 )}
 
 ${helpers.predefined_type(
     "stroke-dasharray",
     "SVGStrokeDashArray",
     "Default::default()",
     products="gecko",
-    animation_value_type="::values::computed::SVGStrokeDashArray",
+    animation_value_type="crate::values::computed::SVGStrokeDashArray",
     spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing",
 )}
 
 ${helpers.predefined_type(
     "stroke-dashoffset",
     "SVGLength",
     "computed::SVGLength::zero()",
     products="gecko",
--- a/servo/components/style/properties/longhands/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_text.mako.rs
@@ -289,19 +289,19 @@
     gecko_pref="layout.css.prefixes.webkit",
     flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
     spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color",
 )}
 
 ${helpers.predefined_type(
     "-webkit-text-stroke-width",
     "BorderSideWidth",
-    "::values::computed::NonNegativeLength::new(0.)",
+    "crate::values::computed::NonNegativeLength::new(0.)",
     initial_specified_value="specified::BorderSideWidth::Length(specified::Length::zero())",
-    computed_type="::values::computed::NonNegativeLength",
+    computed_type="crate::values::computed::NonNegativeLength",
     products="gecko",
     gecko_pref="layout.css.prefixes.webkit",
     flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
     spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-width",
     animation_value_type="discrete",
 )}
 
 // CSS Ruby Layout Module Level 1
--- a/servo/components/style/properties/longhands/outline.mako.rs
+++ b/servo/components/style/properties/longhands/outline.mako.rs
@@ -27,19 +27,19 @@
     initial_specified_value="specified::OutlineStyle::none()",
     animation_value_type="discrete",
     spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
 )}
 
 ${helpers.predefined_type(
     "outline-width",
     "BorderSideWidth",
-    "::values::computed::NonNegativeLength::new(3.)",
+    "crate::values::computed::NonNegativeLength::new(3.)",
     initial_specified_value="specified::BorderSideWidth::Medium",
-    computed_type="::values::computed::NonNegativeLength",
+    computed_type="crate::values::computed::NonNegativeLength",
     animation_value_type="NonNegativeLength",
     spec="https://drafts.csswg.org/css-ui/#propdef-outline-width",
 )}
 
 // The -moz-outline-radius-* properties are non-standard and not on a standards track.
 % for corner in ["topleft", "topright", "bottomright", "bottomleft"]:
     ${helpers.predefined_type(
         "-moz-outline-radius-" + corner,
@@ -50,13 +50,13 @@
         animation_value_type="BorderCornerRadius",
         spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)",
     )}
 % endfor
 
 ${helpers.predefined_type(
     "outline-offset",
     "Length",
-    "::values::computed::Length::new(0.)",
+    "crate::values::computed::Length::new(0.)",
     products="servo gecko",
     animation_value_type="ComputedValue",
     spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset",
 )}
--- a/servo/components/style/properties/longhands/position.mako.rs
+++ b/servo/components/style/properties/longhands/position.mako.rs
@@ -37,17 +37,17 @@
     )}
 % endfor
 
 #[cfg(feature = "gecko")]
 macro_rules! impl_align_conversions {
     ($name: path) => {
         impl From<u8> for $name {
             fn from(bits: u8) -> $name {
-                $name(::values::specified::align::AlignFlags::from_bits(bits)
+                $name(crate::values::specified::align::AlignFlags::from_bits(bits)
                       .expect("bits contain valid flag"))
             }
         }
 
         impl From<$name> for u8 {
             fn from(v: $name) -> u8 {
                 v.0.bits()
             }
@@ -144,28 +144,28 @@ macro_rules! impl_align_conversions {
         "specified::AlignItems::normal()",
         spec="https://drafts.csswg.org/css-align/#propdef-align-items",
         extra_prefixes="webkit",
         animation_value_type="discrete",
         servo_restyle_damage="reflow",
     )}
 
     #[cfg(feature = "gecko")]
-    impl_align_conversions!(::values::specified::align::AlignItems);
+    impl_align_conversions!(crate::values::specified::align::AlignItems);
 
     ${helpers.predefined_type(
         "justify-items",
         "JustifyItems",
         "computed::JustifyItems::legacy()",
         spec="https://drafts.csswg.org/css-align/#propdef-justify-items",
         animation_value_type="discrete",
     )}
 
     #[cfg(feature = "gecko")]
-    impl_align_conversions!(::values::specified::align::JustifyItems);
+    impl_align_conversions!(crate::values::specified::align::JustifyItems);
 % endif
 
 // Flex item properties
 ${helpers.predefined_type(
     "flex-grow",
     "NonNegativeNumber",
     "From::from(0.0)",
     spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
@@ -209,17 +209,17 @@ macro_rules! impl_align_conversions {
         "justify-self",
         "JustifySelf",
         "specified::JustifySelf(specified::SelfAlignment::auto())",
         spec="https://drafts.csswg.org/css-align/#justify-self-property",
         animation_value_type="discrete",
     )}
 
     #[cfg(feature = "gecko")]
-    impl_align_conversions!(::values::specified::align::SelfAlignment);
+    impl_align_conversions!(crate::values::specified::align::SelfAlignment);
 % endif
 
 // https://drafts.csswg.org/css-flexbox/#propdef-order
 ${helpers.predefined_type(
     "order",
     "Integer",
     "0",
     extra_prefixes="webkit",
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -17,38 +17,38 @@ use servo_arc::{Arc, UniqueArc};
 use std::borrow::Cow;
 use std::{ops, ptr};
 use std::fmt::{self, Write};
 use std::mem::{self, ManuallyDrop};
 
 use cssparser::{Parser, RGBA, TokenSerializationType};
 use cssparser::ParserInput;
 #[cfg(feature = "servo")] use euclid::SideOffsets2D;
-use context::QuirksMode;
-#[cfg(feature = "gecko")] use gecko_bindings::structs::{self, nsCSSPropertyID};
-#[cfg(feature = "servo")] use logical_geometry::LogicalMargin;
-#[cfg(feature = "servo")] use computed_values;
-use logical_geometry::WritingMode;
+use crate::context::QuirksMode;
+#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::{self, nsCSSPropertyID};
+#[cfg(feature = "servo")] use crate::logical_geometry::LogicalMargin;
+#[cfg(feature = "servo")] use crate::computed_values;
+use crate::logical_geometry::WritingMode;
 #[cfg(feature = "gecko")] use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
-use media_queries::Device;
-use parser::ParserContext;
-use properties::longhands::system_font::SystemFont;
-use selector_parser::PseudoElement;
+use crate::media_queries::Device;
+use crate::parser::ParserContext;
+use crate::properties::longhands::system_font::SystemFont;
+use crate::selector_parser::PseudoElement;
 use selectors::parser::SelectorParseErrorKind;
 #[cfg(feature = "servo")] use servo_config::prefs::PREFS;
 use style_traits::{CssWriter, KeywordsCollectFn, ParseError, ParsingMode};
 use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
-use stylesheets::{CssRuleType, Origin, UrlExtraData};
-use values::generics::text::LineHeight;
-use values::computed;
-use values::computed::NonNegativeLength;
-use values::serialize_atom_name;
-use rule_tree::StrongRuleNode;
+use crate::stylesheets::{CssRuleType, Origin, UrlExtraData};
+use crate::values::generics::text::LineHeight;
+use crate::values::computed;
+use crate::values::computed::NonNegativeLength;
+use crate::values::serialize_atom_name;
+use crate::rule_tree::StrongRuleNode;
 use self::computed_value_flags::*;
-use str::{CssString, CssStringBorrow, CssStringWriter};
+use crate::str::{CssString, CssStringBorrow, CssStringWriter};
 
 pub use self::declaration_block::*;
 pub use self::cascade::*;
 
 <%!
     from collections import defaultdict
     from data import Method, Keyword, to_rust_ident, to_camel_case, SYSTEM_FONT_LONGHANDS
     import os.path
@@ -105,22 +105,22 @@ macro_rules! unwrap_or_initial {
         ($expr.unwrap_or_else(|| $prop::get_initial_specified_value()));
 }
 
 /// A module with code for all the shorthand css properties, and a few
 /// serialization helpers.
 #[allow(missing_docs)]
 pub mod shorthands {
     use cssparser::Parser;
-    use parser::{Parse, ParserContext};
+    use crate::parser::{Parse, ParserContext};
     use style_traits::{ParseError, StyleParseErrorKind};
-    use values::specified;
+    use crate::values::specified;
 
     use style_traits::{CssWriter, ToCss};
-    use values::specified::{BorderStyle, Color};
+    use crate::values::specified::{BorderStyle, Color};
     use std::fmt::{self, Write};
 
     fn serialize_directional_border<W, I,>(
         dest: &mut CssWriter<W>,
         width: &I,
         style: &BorderStyle,
         color: &Color,
     ) -> fmt::Result
@@ -422,47 +422,47 @@ pub struct NonCustomPropertyId(usize);
 /// The length of all the non-custom properties.
 pub const NON_CUSTOM_PROPERTY_ID_COUNT: usize =
     ${len(data.longhands) + len(data.shorthands) + len(data.all_aliases())};
 
 % if product == "gecko":
 #[allow(dead_code)]
 unsafe fn static_assert_nscsspropertyid() {
     % for i, property in enumerate(data.longhands + data.shorthands + data.all_aliases()):
-    ::std::mem::transmute::<[u8; ${i}], [u8; ${property.nscsspropertyid()} as usize]>([0; ${i}]); // ${property.name}
+    std::mem::transmute::<[u8; ${i}], [u8; ${property.nscsspropertyid()} as usize]>([0; ${i}]); // ${property.name}
     % endfor
 }
 % endif
 
 impl NonCustomPropertyId {
     /// Returns the underlying index, used for use counter.
     pub fn bit(self) -> usize {
         self.0
     }
 
     #[cfg(feature = "gecko")]
     #[inline]
     fn to_nscsspropertyid(self) -> nsCSSPropertyID {
         // unsafe: guaranteed by static_assert_nscsspropertyid above.
-        unsafe { ::std::mem::transmute(self.0 as i32) }
+        unsafe { std::mem::transmute(self.0 as i32) }
     }
 
     /// Convert an `nsCSSPropertyID` into a `NonCustomPropertyId`.
     #[cfg(feature = "gecko")]
     #[inline]
     pub fn from_nscsspropertyid(prop: nsCSSPropertyID) -> Result<Self, ()> {
         let prop = prop as i32;
         if prop < 0 {
             return Err(());
         }
         if prop >= NON_CUSTOM_PROPERTY_ID_COUNT as i32 {
             return Err(());
         }
         // unsafe: guaranteed by static_assert_nscsspropertyid above.
-        Ok(unsafe { ::std::mem::transmute(prop as usize) })
+        Ok(unsafe { std::mem::transmute(prop as usize) })
     }
 
     /// Get the property name.
     #[inline]
     pub fn name(self) -> &'static str {
         static MAP: [&'static str; NON_CUSTOM_PROPERTY_ID_COUNT] = [
             % for property in data.longhands + data.shorthands + data.all_aliases():
             "${property.name}",
@@ -1296,17 +1296,17 @@ impl LonghandId {
         % endif
     }
 }
 
 /// An iterator over all the property ids that are enabled for a given
 /// shorthand, if that shorthand is enabled for all content too.
 pub struct NonCustomPropertyIterator<Item: 'static> {
     filter: bool,
-    iter: ::std::slice::Iter<'static, Item>,
+    iter: std::slice::Iter<'static, Item>,
 }
 
 impl<Item> Iterator for NonCustomPropertyIterator<Item>
 where
     Item: 'static + Copy + Into<NonCustomPropertyId>,
 {
     type Item = Item;
 
@@ -1529,21 +1529,21 @@ impl ToCss for UnparsedValue {
         Ok(())
     }
 }
 
 impl UnparsedValue {
     fn substitute_variables(
         &self,
         longhand_id: LonghandId,
-        custom_properties: Option<<&Arc<::custom_properties::CustomPropertiesMap>>,
+        custom_properties: Option<<&Arc<crate::custom_properties::CustomPropertiesMap>>,
         quirks_mode: QuirksMode,
         environment: &::custom_properties::CssEnvironment,
     ) -> PropertyDeclaration {
-        ::custom_properties::substitute(
+        crate::custom_properties::substitute(
             &self.css,
             self.first_token_type,
             custom_properties,
             environment,
         ).ok().and_then(|css| {
             // As of this writing, only the base URL is used for property
             // values.
             //
@@ -1612,17 +1612,17 @@ impl UnparsedValue {
 /// An identifier for a given property declaration, which can be either a
 /// longhand or a custom property.
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(MallocSizeOf))]
 pub enum PropertyDeclarationId<'a> {
     /// A longhand.
     Longhand(LonghandId),
     /// A custom property declaration.
-    Custom(&'a ::custom_properties::Name),
+    Custom(&'a crate::custom_properties::Name),
 }
 
 impl<'a> ToCss for PropertyDeclarationId<'a> {
     fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
     where
         W: Write,
     {
         match *self {
@@ -1694,17 +1694,17 @@ pub enum PropertyId {
     Longhand(LonghandId),
     /// A shorthand property.
     Shorthand(ShorthandId),
     /// An alias for a longhand property.
     LonghandAlias(LonghandId, AliasId),
     /// An alias for a shorthand property.
     ShorthandAlias(ShorthandId, AliasId),
     /// A custom property.
-    Custom(::custom_properties::Name),
+    Custom(crate::custom_properties::Name),
 }
 
 impl fmt::Debug for PropertyId {
     fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         self.to_css(&mut CssWriter::new(formatter))
     }
 }
 
@@ -1758,18 +1758,18 @@ impl PropertyId {
                 % endfor
             }
         }
 
         if let Some(id) = property_id(property_name) {
             return Ok(id.clone())
         }
 
-        let name = ::custom_properties::parse_name(property_name)?;
-        Ok(PropertyId::Custom(::custom_properties::Name::from(name)))
+        let name = crate::custom_properties::parse_name(property_name)?;
+        Ok(PropertyId::Custom(crate::custom_properties::Name::from(name)))
     }
 
     /// Parses a property name, and returns an error if it's unknown or isn't
     /// enabled for all content.
     #[inline]
     pub fn parse_enabled_for_all_content(name: &str) -> Result<Self, ()> {
         let id = Self::parse_unchecked(name)?;
 
@@ -1943,28 +1943,28 @@ pub struct VariableDeclaration {
     value: Arc<UnparsedValue>,
 }
 
 /// A custom property declaration value is either an unparsed value or a CSS
 /// wide-keyword.
 #[derive(Clone, PartialEq, ToCss)]
 pub enum CustomDeclarationValue {
     /// A value.
-    Value(Arc<::custom_properties::SpecifiedValue>),
+    Value(Arc<crate::custom_properties::SpecifiedValue>),
     /// A wide keyword.
     CSSWideKeyword(CSSWideKeyword),
 }
 
 /// A custom property declaration with the property name and the declared value.
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
 #[derive(Clone, PartialEq, ToCss)]
 pub struct CustomDeclaration {
     /// The name of the custom property.
     #[css(skip)]
-    pub name: ::custom_properties::Name,
+    pub name: crate::custom_properties::Name,
     /// The value of the custom property.
     #[cfg_attr(feature = "gecko", ignore_malloc_size_of = "XXX: how to handle this?")]
     pub value: CustomDeclarationValue,
 }
 
 impl fmt::Debug for PropertyDeclaration {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         self.id().to_css(&mut CssWriter::new(f))?;
@@ -2191,17 +2191,17 @@ impl PropertyDeclaration {
         let start = input.state();
         match id {
             PropertyId::Custom(property_name) => {
                 // FIXME: fully implement https://github.com/w3c/csswg-drafts/issues/774
                 // before adding skip_whitespace here.
                 // This probably affects some test results.
                 let value = match input.try(CSSWideKeyword::parse) {
                     Ok(keyword) => CustomDeclarationValue::CSSWideKeyword(keyword),
-                    Err(()) => match ::custom_properties::SpecifiedValue::parse(input) {
+                    Err(()) => match crate::custom_properties::SpecifiedValue::parse(input) {
                         Ok(value) => CustomDeclarationValue::Value(value),
                         Err(e) => return Err(StyleParseErrorKind::new_invalid(
                             format!("--{}", property_name),
                             e,
                         )),
                     }
                 };
                 declarations.push(PropertyDeclaration::Custom(CustomDeclaration {
@@ -2225,17 +2225,17 @@ impl PropertyDeclaration {
                         if !input.seen_var_or_env_functions() {
                             return Err(StyleParseErrorKind::new_invalid(
                                 non_custom_id.unwrap().name(),
                                 err,
                             ));
                         }
                         input.reset(&start);
                         let (first_token_type, css) =
-                            ::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
+                            crate::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
                                 StyleParseErrorKind::new_invalid(
                                     non_custom_id.unwrap().name(),
                                     e,
                                 )
                             })?;
                         Ok(PropertyDeclaration::WithVariables(VariableDeclaration {
                             id,
                             value: Arc::new(UnparsedValue {
@@ -2277,17 +2277,17 @@ impl PropertyDeclaration {
                             return Err(StyleParseErrorKind::new_invalid(
                                 non_custom_id.unwrap().name(),
                                 err,
                             ));
                         }
 
                         input.reset(&start);
                         let (first_token_type, css) =
-                            ::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
+                            crate::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
                                 StyleParseErrorKind::new_invalid(
                                     non_custom_id.unwrap().name(),
                                     e,
                                 )
                             })?;
                         let unparsed = Arc::new(UnparsedValue {
                             css: css.into_owned(),
                             first_token_type: first_token_type,
@@ -2419,27 +2419,27 @@ impl<'a> Iterator for AllShorthandDeclar
                     }
                 ))
             }
         }
     }
 }
 
 #[cfg(feature = "gecko")]
-pub use gecko_properties::style_structs;
+pub use crate::gecko_properties::style_structs;
 
 /// The module where all the style structs are defined.
 #[cfg(feature = "servo")]
 pub mod style_structs {
     use fxhash::FxHasher;
     use super::longhands;
     use std::hash::{Hash, Hasher};
-    use logical_geometry::WritingMode;
-    use media_queries::Device;
-    use values::computed::NonNegativeLength;
+    use crate::logical_geometry::WritingMode;
+    use crate::media_queries::Device;
+    use crate::values::computed::NonNegativeLength;
 
     % for style_struct in data.active_style_structs():
         % if style_struct.name == "Font":
         #[derive(Clone, Debug, MallocSizeOf)]
         % else:
         #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
         % endif
         /// The ${style_struct.name} style struct.
@@ -2448,17 +2448,17 @@ pub mod style_structs {
                 /// The ${longhand.name} computed value.
                 pub ${longhand.ident}: longhands::${longhand.ident}::computed_value::T,
             % endfor
             % if style_struct.name == "InheritedText":
                 /// The "used" text-decorations that apply to this box.
                 ///
                 /// FIXME(emilio): This is technically a box-tree concept, and
                 /// would be nice to move away from style.
-                pub text_decorations_in_effect: ::values::computed::text::TextDecorationsInEffect,
+                pub text_decorations_in_effect: crate::values::computed::text::TextDecorationsInEffect,
             % endif
             % if style_struct.name == "Font":
                 /// The font hash, used for font caching.
                 pub hash: u64,
             % endif
             % if style_struct.name == "Box":
                 /// The display value specified by the CSS stylesheets (without any style adjustments),
                 /// which is needed for hypothetical layout boxes.
@@ -2695,17 +2695,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 values::Either;
+                use crate::values::Either;
                 match self.column_width {
                     Either::First(_width) => true,
                     Either::Second(_auto) => !self.column_count.is_auto(),
                 }
             }
         % endif
     }
 
@@ -2731,26 +2731,26 @@ pub mod style_structs {
                 }
             }
         % endif
     % endfor
 % endfor
 
 
 #[cfg(feature = "gecko")]
-pub use gecko_properties::{ComputedValues, ComputedValuesInner};
+pub use crate::gecko_properties::{ComputedValues, ComputedValuesInner};
 
 #[cfg(feature = "servo")]
 #[cfg_attr(feature = "servo", derive(Clone, Debug))]
 /// Actual data of ComputedValues, to match up with Gecko
 pub struct ComputedValuesInner {
     % for style_struct in data.active_style_structs():
         ${style_struct.ident}: Arc<style_structs::${style_struct.name}>,
     % endfor
-    custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
+    custom_properties: Option<Arc<crate::custom_properties::CustomPropertiesMap>>,
     /// The writing mode of this computed values struct.
     pub writing_mode: WritingMode,
 
     /// A set of flags we use to store misc information regarding this style.
     pub flags: ComputedValueFlags,
 
     /// The rule node representing the ordered list of rules matched for this
     /// node.  Can be None for default values and text nodes.  This is
@@ -2799,17 +2799,17 @@ impl ComputedValues {
     }
 
     /// Returns the visited rules, if applicable.
     pub fn visited_rules(&self) -> Option<<&StrongRuleNode> {
         self.visited_style.as_ref().and_then(|s| s.rules.as_ref())
     }
 
     /// Gets a reference to the custom properties map (if one exists).
-    pub fn custom_properties(&self) -> Option<<&Arc<::custom_properties::CustomPropertiesMap>> {
+    pub fn custom_properties(&self) -> Option<<&Arc<crate::custom_properties::CustomPropertiesMap>> {
         self.custom_properties.as_ref()
     }
 
 % for prop in data.longhands:
     /// Gets the computed value of a given property.
     #[inline(always)]
     #[allow(non_snake_case)]
     pub fn clone_${prop.ident}(
@@ -2869,17 +2869,17 @@ impl ComputedValues {
 }
 
 #[cfg(feature = "servo")]
 impl ComputedValues {
     /// Create a new refcounted `ComputedValues`
     pub fn new(
         _: &Device,
         _: Option<<&PseudoElement>,
-        custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
+        custom_properties: Option<Arc<crate::custom_properties::CustomPropertiesMap>>,
         writing_mode: WritingMode,
         flags: ComputedValueFlags,
         rules: Option<StrongRuleNode>,
         visited_style: Option<Arc<ComputedValues>>,
         % for style_struct in data.active_style_structs():
         ${style_struct.ident}: Arc<style_structs::${style_struct.name}>,
         % endfor
     ) -> Arc<Self> {
@@ -2973,17 +2973,17 @@ impl ComputedValuesInner {
     /// Servo for obvious reasons.
     pub fn has_moz_binding(&self) -> bool { false }
 
     #[inline]
     /// Returns whether the "content" property for the given style is completely
     /// ineffective, and would yield an empty `::before` or `::after`
     /// pseudo-element.
     pub fn ineffective_content_property(&self) -> bool {
-        use values::generics::counters::Content;
+        use crate::values::generics::counters::Content;
         match self.get_counters().content {
             Content::Normal | Content::None => true,
             Content::Items(ref items) => items.is_empty(),
         }
     }
 
     /// Whether the current style or any of its ancestors is multicolumn.
     #[inline]
@@ -3095,44 +3095,44 @@ impl ComputedValuesInner {
             position_style.right,
             position_style.bottom,
             position_style.left,
         ))
     }
 
     /// Return true if the effects force the transform style to be Flat
     pub fn overrides_transform_style(&self) -> bool {
-        use computed_values::mix_blend_mode::T as MixBlendMode;
+        use crate::computed_values::mix_blend_mode::T as MixBlendMode;
 
         let effects = self.get_effects();
         // TODO(gw): Add clip-path, isolation, mask-image, mask-border-source when supported.
         effects.opacity < 1.0 ||
            !effects.filter.0.is_empty() ||
            !effects.clip.is_auto() ||
            effects.mix_blend_mode != MixBlendMode::Normal
     }
 
     /// <https://drafts.csswg.org/css-transforms/#grouping-property-values>
     pub fn get_used_transform_style(&self) -> computed_values::transform_style::T {
-        use computed_values::transform_style::T as TransformStyle;
+        use crate::computed_values::transform_style::T as TransformStyle;
 
         let box_ = self.get_box();
 
         if self.overrides_transform_style() {
             TransformStyle::Flat
         } else {
             // Return the computed value if not overridden by the above exceptions
             box_.transform_style
         }
     }
 
     /// Whether given this transform value, the compositor would require a
     /// layer.
     pub fn transform_requires_layer(&self) -> bool {
-        use values::generics::transform::TransformOperation;
+        use crate::values::generics::transform::TransformOperation;
         // Check if the transform matrix is 2D or 3D
         for transform in &self.get_box().transform.0 {
             match *transform {
                 TransformOperation::Perspective(..) => {
                     return true;
                 }
                 TransformOperation::Matrix3D(m) => {
                     // See http://dev.w3.org/csswg/css-transforms/#2d-matrix
@@ -3155,23 +3155,23 @@ impl ComputedValuesInner {
         }
 
         // Neither perspective nor transform present
         false
     }
 }
 
 % if product == "gecko":
-    pub use ::servo_arc::RawOffsetArc as BuilderArc;
+    pub use crate::servo_arc::RawOffsetArc as BuilderArc;
     /// Clone an arc, returning a regular arc
     fn clone_arc<T: 'static>(x: &BuilderArc<T>) -> Arc<T> {
         Arc::from_raw_offset(x.clone())
     }
 % else:
-    pub use ::servo_arc::Arc as BuilderArc;
+    pub use crate::servo_arc::Arc as BuilderArc;
     /// Clone an arc, returning a regular arc
     fn clone_arc<T: 'static>(x: &BuilderArc<T>) -> Arc<T> {
         x.clone()
     }
 % endif
 
 /// A reference to a style struct of the parent, or our own style struct.
 pub enum StyleStructRef<'a, T: 'static> {
@@ -3296,17 +3296,17 @@ pub struct StyleBuilder<'a> {
 
     /// The style we're getting reset structs from.
     reset_style: &'a ComputedValues,
 
     /// The rule node representing the ordered list of rules matched for this
     /// node.
     pub rules: Option<StrongRuleNode>,
 
-    custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
+    custom_properties: Option<Arc<crate::custom_properties::CustomPropertiesMap>>,
 
     /// The pseudo-element this style will represent.
     pub pseudo: Option<<&'a PseudoElement>,
 
     /// Whether we have mutated any reset structs since the the last time
     /// `clear_modified_reset` was called.  This is used to tell whether the
     /// `StyleAdjuster` did any work.
     modified_reset: bool,
@@ -3329,22 +3329,22 @@ pub struct StyleBuilder<'a> {
 impl<'a> StyleBuilder<'a> {
     /// Trivially construct a `StyleBuilder`.
     fn new(
         device: &'a Device,
         parent_style: Option<<&'a ComputedValues>,
         parent_style_ignoring_first_line: Option<<&'a ComputedValues>,
         pseudo: Option<<&'a PseudoElement>,
         rules: Option<StrongRuleNode>,
-        custom_properties: Option<Arc<::custom_properties::CustomPropertiesMap>>,
+        custom_properties: Option<Arc<crate::custom_properties::CustomPropertiesMap>>,
     ) -> Self {
         debug_assert_eq!(parent_style.is_some(), parent_style_ignoring_first_line.is_some());
         #[cfg(feature = "gecko")]
         debug_assert!(parent_style.is_none() ||
-                      ::std::ptr::eq(parent_style.unwrap(),
+                      std::ptr::eq(parent_style.unwrap(),
                                      parent_style_ignoring_first_line.unwrap()) ||
                       parent_style.unwrap().pseudo() == Some(PseudoElement::FirstLine));
         let reset_style = device.default_computed_values();
         let inherited_style = parent_style.unwrap_or(reset_style);
         let inherited_style_ignoring_first_line = parent_style_ignoring_first_line.unwrap_or(reset_style);
 
         let flags = inherited_style.flags.inherited();
 
@@ -3599,17 +3599,17 @@ impl<'a> StyleBuilder<'a> {
     /// Returns whether this computed style represents a floated object.
     pub fn floated(&self) -> bool {
         self.get_box().clone_float() != longhands::float::computed_value::T::None
     }
 
     /// Returns whether this computed style represents an out of flow-positioned
     /// object.
     pub fn out_of_flow_positioned(&self) -> bool {
-        use properties::longhands::position::computed_value::T as Position;
+        use crate::properties::longhands::position::computed_value::T as Position;
         matches!(self.get_box().clone_position(),
                  Position::Absolute | Position::Fixed)
     }
 
     /// Whether this style has a top-layer style. That's implemented in Gecko
     /// via the -moz-top-layer property, but servo doesn't have any concept of a
     /// top layer (yet, it's needed for fullscreen).
     #[cfg(feature = "servo")]
@@ -3648,17 +3648,17 @@ impl<'a> StyleBuilder<'a> {
             % endfor
         )
     }
 
     /// Get the custom properties map if necessary.
     ///
     /// Cloning the Arc here is fine because it only happens in the case where
     /// we have custom properties, and those are both rare and expensive.
-    fn custom_properties(&self) -> Option<<&Arc<::custom_properties::CustomPropertiesMap>> {
+    fn custom_properties(&self) -> Option<<&Arc<crate::custom_properties::CustomPropertiesMap>> {
         self.custom_properties.as_ref()
     }
 
     /// Access to various information about our inherited styles.  We don't
     /// expose an inherited ComputedValues directly, because in the
     /// ::first-line case some of the inherited information needs to come from
     /// one ComputedValues instance and some from a different one.
 
@@ -3692,32 +3692,33 @@ impl<'a> StyleBuilder<'a> {
 
 #[cfg(feature = "servo")]
 pub use self::lazy_static_module::INITIAL_SERVO_VALUES;
 
 // Use a module to work around #[cfg] on lazy_static! not being applied to every generated item.
 #[cfg(feature = "servo")]
 #[allow(missing_docs)]
 mod lazy_static_module {
-    use logical_geometry::WritingMode;
+    use crate::logical_geometry::WritingMode;
     use servo_arc::Arc;
     use super::{ComputedValues, ComputedValuesInner, longhands, style_structs};
     use super::computed_value_flags::ComputedValueFlags;
 
     /// The initial values for all style structs as defined by the specification.
     lazy_static! {
         pub static ref INITIAL_SERVO_VALUES: ComputedValues = ComputedValues {
             inner: ComputedValuesInner {
                 % for style_struct in data.active_style_structs():
                     ${style_struct.ident}: Arc::new(style_structs::${style_struct.name} {
                         % for longhand in style_struct.longhands:
                             ${longhand.ident}: longhands::${longhand.ident}::get_initial_value(),
                         % endfor
                         % if style_struct.name == "InheritedText":
-                            text_decorations_in_effect: ::values::computed::text::TextDecorationsInEffect::default(),
+                            text_decorations_in_effect:
+                                crate::values::computed::text::TextDecorationsInEffect::default(),
                         % endif
                         % if style_struct.name == "Font":
                             hash: 0,
                         % endif
                         % if style_struct.name == "Box":
                             original_display: longhands::display::get_initial_value(),
                         % endif
                     }),
--- a/servo/components/style/properties/shorthands/background.mako.rs
+++ b/servo/components/style/properties/shorthands/background.mako.rs
@@ -5,23 +5,23 @@
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 // TODO: other background-* properties
 <%helpers:shorthand name="background"
                     sub_properties="background-color background-position-x background-position-y background-repeat
                                     background-attachment background-image background-size background-origin
                                     background-clip"
                     spec="https://drafts.csswg.org/css-backgrounds/#the-background">
-    use properties::longhands::{background_position_x, background_position_y, background_repeat};
-    use properties::longhands::{background_attachment, background_image, background_size, background_origin};
-    use properties::longhands::background_clip;
-    use properties::longhands::background_clip::single_value::computed_value::T as Clip;
-    use properties::longhands::background_origin::single_value::computed_value::T as Origin;
-    use values::specified::{Color, Position, PositionComponent};
-    use parser::Parse;
+    use crate::properties::longhands::{background_position_x, background_position_y, background_repeat};
+    use crate::properties::longhands::{background_attachment, background_image, background_size, background_origin};
+    use crate::properties::longhands::background_clip;
+    use crate::properties::longhands::background_clip::single_value::computed_value::T as Clip;
+    use crate::properties::longhands::background_origin::single_value::computed_value::T as Origin;
+    use crate::values::specified::{Color, Position, PositionComponent};
+    use crate::parser::Parse;
 
     // FIXME(emilio): Should be the same type!
     impl From<background_origin::single_value::SpecifiedValue> for background_clip::single_value::SpecifiedValue {
         fn from(origin: background_origin::single_value::SpecifiedValue) ->
             background_clip::single_value::SpecifiedValue {
             match origin {
                 background_origin::single_value::SpecifiedValue::ContentBox =>
                     background_clip::single_value::SpecifiedValue::ContentBox,
@@ -194,19 +194,19 @@
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="background-position"
                     flags="SHORTHAND_IN_GETCS"
                     sub_properties="background-position-x background-position-y"
                     spec="https://drafts.csswg.org/css-backgrounds-4/#the-background-position">
-    use properties::longhands::{background_position_x, background_position_y};
-    use values::specified::AllowQuirks;
-    use values::specified::position::Position;
+    use crate::properties::longhands::{background_position_x, background_position_y};
+    use crate::values::specified::AllowQuirks;
+    use crate::values::specified::position::Position;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         // Vec grows from 0 to 4 by default on first push().  So allocate with
         // capacity 1, so in the common case of only one item we don't way
         // overallocate.  Note that we always push at least one item if parsing
--- a/servo/components/style/properties/shorthands/border.mako.rs
+++ b/servo/components/style/properties/shorthands/border.mako.rs
@@ -16,18 +16,18 @@
     needs_context=False,
     spec="https://drafts.csswg.org/css-backgrounds/#border-style",
 )}
 
 <%helpers:shorthand name="border-width" sub_properties="${
         ' '.join('border-%s-width' % side
                  for side in PHYSICAL_SIDES)}"
     spec="https://drafts.csswg.org/css-backgrounds/#border-width">
-    use values::generics::rect::Rect;
-    use values::specified::{AllowQuirks, BorderSideWidth};
+    use crate::values::generics::rect::Rect;
+    use crate::values::specified::{AllowQuirks, BorderSideWidth};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let rect = Rect::parse_with(context, input, |_, i| {
             BorderSideWidth::parse_quirky(context, i, AllowQuirks::Yes)
         })?;
@@ -49,17 +49,17 @@
     }
 </%helpers:shorthand>
 
 
 pub fn parse_border<'i, 't>(
     context: &ParserContext,
     input: &mut Parser<'i, 't>,
 ) -> Result<(specified::Color, specified::BorderStyle, specified::BorderSideWidth), ParseError<'i>> {
-    use values::specified::{Color, BorderStyle, BorderSideWidth};
+    use crate::values::specified::{Color, BorderStyle, BorderSideWidth};
     let _unused = context;
     let mut color = None;
     let mut style = None;
     let mut width = None;
     let mut any = false;
     loop {
         if color.is_none() {
             if let Ok(value) = input.try(|i| Color::parse(context, i)) {
@@ -142,18 +142,18 @@ pub fn parse_border<'i, 't>(
         for name in ['outset', 'repeat', 'slice', 'source', 'width'])}"
     derive_value_info="False"
     spec="https://drafts.csswg.org/css-backgrounds/#border">
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
-        use properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
-        use properties::longhands::{border_image_source, border_image_width};
+        use crate::properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
+        use crate::properties::longhands::{border_image_source, border_image_width};
 
         let (color, style, width) = super::parse_border(context, input)?;
         Ok(expanded! {
             % for side in PHYSICAL_SIDES:
                 border_${side}_color: color.clone(),
                 border_${side}_style: style,
                 border_${side}_width: width.clone(),
             % endfor
@@ -201,34 +201,34 @@ pub fn parse_border<'i, 't>(
                 Ok(())
             }
         }
     }
 
     // Just use the same as border-left. The border shorthand can't accept
     // any value that the sub-shorthand couldn't.
     <%
-        border_left = "<::properties::shorthands::border_left::Longhands as SpecifiedValueInfo>"
+        border_left = "<crate::properties::shorthands::border_left::Longhands as SpecifiedValueInfo>"
     %>
     impl SpecifiedValueInfo for Longhands {
         const SUPPORTED_TYPES: u8 = ${border_left}::SUPPORTED_TYPES;
         fn collect_completion_keywords(f: KeywordsCollectFn) {
             ${border_left}::collect_completion_keywords(f);
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="border-radius" sub_properties="${' '.join(
     'border-%s-radius' % (corner)
      for corner in ['top-left', 'top-right', 'bottom-right', 'bottom-left']
 )}" extra_prefixes="webkit" spec="https://drafts.csswg.org/css-backgrounds/#border-radius">
-    use values::generics::rect::Rect;
-    use values::generics::border::BorderCornerRadius;
-    use values::specified::border::BorderRadius;
-    use parser::Parse;
+    use crate::values::generics::rect::Rect;
+    use crate::values::generics::border::BorderCornerRadius;
+    use crate::values::specified::border::BorderRadius;
+    use crate::parser::Parse;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let radii = BorderRadius::parse(context, input)?;
         Ok(expanded! {
             border_top_left_radius: radii.top_left,
@@ -255,18 +255,18 @@ pub fn parse_border<'i, 't>(
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="border-image" sub_properties="border-image-outset
     border-image-repeat border-image-slice border-image-source border-image-width"
     extra_prefixes="moz:layout.css.prefixes.border-image webkit"
     spec="https://drafts.csswg.org/css-backgrounds-3/#border-image">
-    use properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
-    use properties::longhands::{border_image_source, border_image_width};
+    use crate::properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
+    use crate::properties::longhands::{border_image_source, border_image_width};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         % for name in "outset repeat slice source width".split():
             let mut border_image_${name} = border_image_${name}::get_initial_specified_value();
         % endfor
--- a/servo/components/style/properties/shorthands/box.mako.rs
+++ b/servo/components/style/properties/shorthands/box.mako.rs
@@ -5,27 +5,27 @@
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand
     name="overflow"
     flags="SHORTHAND_IN_GETCS"
     sub_properties="overflow-x overflow-y"
     spec="https://drafts.csswg.org/css-overflow/#propdef-overflow"
 >
-    use properties::longhands::overflow_x::parse as parse_overflow;
+    use crate::properties::longhands::overflow_x::parse as parse_overflow;
     % if product == "gecko":
-        use properties::longhands::overflow_x::SpecifiedValue;
+        use crate::properties::longhands::overflow_x::SpecifiedValue;
     % endif
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         % if product == "gecko":
-            use gecko_bindings::structs;
+            use crate::gecko_bindings::structs;
             let moz_kw_enabled = unsafe {
                 structs::StaticPrefs_sVarCache_layout_css_overflow_moz_scrollbars_enabled
             };
             if moz_kw_enabled {
                 let moz_kw_found = input.try(|input| {
                     try_match_ident_ignore_ascii_case! { input,
                         "-moz-scrollbars-horizontal" => {
                             Ok(expanded! {
@@ -77,17 +77,17 @@
     name="overflow-clip-box"
     sub_properties="overflow-clip-box-block overflow-clip-box-inline"
     enabled_in="ua"
     gecko_pref="layout.css.overflow-clip-box.enabled"
     spec="Internal, may be standardized in the future "
          "(https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)"
     products="gecko"
 >
-    use values::specified::OverflowClipBox;
+    use crate::values::specified::OverflowClipBox;
     pub fn parse_value<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let block_value = OverflowClipBox::parse(input)?;
         let inline_value =
             input.try(|input| OverflowClipBox::parse(input)).unwrap_or(block_value);
 
@@ -125,21 +125,21 @@ macro_rules! try_parse_one {
 }
 
 <%helpers:shorthand name="transition"
                     extra_prefixes="moz:layout.css.prefixes.transitions webkit"
                     sub_properties="transition-property transition-duration
                                     transition-timing-function
                                     transition-delay"
                     spec="https://drafts.csswg.org/css-transitions/#propdef-transition">
-    use parser::Parse;
+    use crate::parser::Parse;
     % for prop in "delay duration property timing_function".split():
-    use properties::longhands::transition_${prop};
+    use crate::properties::longhands::transition_${prop};
     % endfor
-    use values::specified::TransitionProperty;
+    use crate::values::specified::TransitionProperty;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         struct SingleTransition {
             % for prop in "duration timing_function delay".split():
             transition_${prop}: transition_${prop}::SingleSpecifiedValue,
@@ -277,17 +277,17 @@ macro_rules! try_parse_one {
                                     animation-fill-mode animation-play-state"
                     allowed_in_keyframe_block="False"
                     spec="https://drafts.csswg.org/css-animations/#propdef-animation">
     <%
         props = "name duration timing_function delay iteration_count \
                  direction fill_mode play_state".split()
     %>
     % for prop in props:
-    use properties::longhands::animation_${prop};
+    use crate::properties::longhands::animation_${prop};
     % endfor
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         struct SingleAnimation {
             % for prop in props:
@@ -386,17 +386,17 @@ macro_rules! try_parse_one {
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="scroll-snap-type" products="gecko"
                     gecko_pref="layout.css.scroll-snap.enabled"
                     sub_properties="scroll-snap-type-x scroll-snap-type-y"
                     spec="https://drafts.csswg.org/css-scroll-snap/#propdef-scroll-snap-type">
-    use properties::longhands::scroll_snap_type_x;
+    use crate::properties::longhands::scroll_snap_type_x;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let result = scroll_snap_type_x::parse(context, input)?;
         Ok(expanded! {
             scroll_snap_type_x: result,
@@ -420,17 +420,17 @@ macro_rules! try_parse_one {
 <%helpers:shorthand name="overscroll-behavior" products="gecko"
                     gecko_pref="layout.css.overscroll-behavior.enabled"
                     sub_properties="overscroll-behavior-x overscroll-behavior-y"
                     spec="https://wicg.github.io/overscroll-behavior/#overscroll-behavior-properties">
     pub fn parse_value<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
-        use values::specified::OverscrollBehavior;
+        use crate::values::specified::OverscrollBehavior;
         let behavior_x = OverscrollBehavior::parse(input)?;
         let behavior_y = input.try(OverscrollBehavior::parse).unwrap_or(behavior_x);
         Ok(expanded! {
             overscroll_behavior_x: behavior_x,
             overscroll_behavior_y: behavior_y,
         })
     }
 
--- a/servo/components/style/properties/shorthands/column.mako.rs
+++ b/servo/components/style/properties/shorthands/column.mako.rs
@@ -4,17 +4,17 @@
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="columns"
                     sub_properties="column-width column-count"
                     servo_pref="layout.columns.enabled",
                     derive_serialize="True"
                     extra_prefixes="moz" spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
-    use properties::longhands::{column_count, column_width};
+    use crate::properties::longhands::{column_count, column_width};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let mut column_count = None;
         let mut column_width = None;
         let mut autos = 0;
@@ -54,18 +54,18 @@
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="column-rule" products="gecko" extra_prefixes="moz"
     sub_properties="column-rule-width column-rule-style column-rule-color"
     derive_serialize="True"
     spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule">
-    use properties::longhands::{column_rule_width, column_rule_style};
-    use properties::longhands::column_rule_color;
+    use crate::properties::longhands::{column_rule_width, column_rule_style};
+    use crate::properties::longhands::column_rule_color;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         % for name in "width style color".split():
         let mut column_rule_${name} = None;
         % endfor
--- a/servo/components/style/properties/shorthands/font.mako.rs
+++ b/servo/components/style/properties/shorthands/font.mako.rs
@@ -16,35 +16,35 @@
                                     ${'font-variant-ligatures' if product == 'gecko' else ''}
                                     ${'font-variant-numeric' if product == 'gecko' else ''}
                                     ${'font-variant-position' if product == 'gecko' else ''}
                                     ${'font-language-override' if product == 'gecko' else ''}
                                     ${'font-feature-settings' if product == 'gecko' else ''}
                                     ${'font-variation-settings' if product == 'gecko' else ''}"
                     derive_value_info="False"
                     spec="https://drafts.csswg.org/css-fonts-3/#propdef-font">
-    use parser::Parse;
-    use properties::longhands::{font_family, font_style, font_weight, font_stretch};
-    use properties::longhands::font_variant_caps;
+    use crate::parser::Parse;
+    use crate::properties::longhands::{font_family, font_style, font_weight, font_stretch};
+    use crate::properties::longhands::font_variant_caps;
     #[cfg(feature = "gecko")]
-    use properties::longhands::system_font::SystemFont;
-    use values::specified::text::LineHeight;
-    use values::specified::FontSize;
-    use values::specified::font::{FontStretch, FontStretchKeyword};
+    use crate::properties::longhands::system_font::SystemFont;
+    use crate::values::specified::text::LineHeight;
+    use crate::values::specified::FontSize;
+    use crate::values::specified::font::{FontStretch, FontStretchKeyword};
 
     <%
         gecko_sub_properties = "kerning language_override size_adjust \
                                 variant_alternates variant_east_asian \
                                 variant_ligatures variant_numeric \
                                 variant_position feature_settings \
                                 variation_settings optical_sizing".split()
     %>
     % if product == "gecko":
         % for prop in gecko_sub_properties:
-            use properties::longhands::font_${prop};
+            use crate::properties::longhands::font_${prop};
         % endfor
     % endif
     use self::font_family::SpecifiedValue as FontFamily;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
@@ -296,20 +296,20 @@
     <% gecko_sub_properties = "alternates east_asian ligatures numeric position".split() %>
     <%
         sub_properties = ["caps"]
         if product == "gecko":
             sub_properties += gecko_sub_properties
     %>
 
 % for prop in sub_properties:
-    use properties::longhands::font_variant_${prop};
+    use crate::properties::longhands::font_variant_${prop};
 % endfor
     #[allow(unused_imports)]
-    use values::specified::FontVariantLigatures;
+    use crate::values::specified::FontVariantLigatures;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
     % for prop in sub_properties:
         let mut ${prop} = None;
     % endfor
--- a/servo/components/style/properties/shorthands/inherited_svg.mako.rs
+++ b/servo/components/style/properties/shorthands/inherited_svg.mako.rs
@@ -2,23 +2,23 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="marker" products="gecko"
     sub_properties="marker-start marker-end marker-mid"
     spec="https://www.w3.org/TR/SVG2/painting.html#MarkerShorthand">
-    use values::specified::url::UrlOrNone;
+    use crate::values::specified::url::UrlOrNone;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
-        use parser::Parse;
+        use crate::parser::Parse;
         let url = UrlOrNone::parse(context, input)?;
 
         Ok(expanded! {
             marker_start: url.clone(),
             marker_mid: url.clone(),
             marker_end: url,
         })
     }
--- a/servo/components/style/properties/shorthands/inherited_text.mako.rs
+++ b/servo/components/style/properties/shorthands/inherited_text.mako.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="text-emphasis" products="gecko"
     sub_properties="text-emphasis-style text-emphasis-color"
     derive_serialize="True"
     spec="https://drafts.csswg.org/css-text-decor-3/#text-emphasis-property">
-    use properties::longhands::{text_emphasis_color, text_emphasis_style};
+    use crate::properties::longhands::{text_emphasis_color, text_emphasis_style};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let mut color = None;
         let mut style = None;
 
@@ -47,17 +47,17 @@
 // https://compat.spec.whatwg.org/
 <%helpers:shorthand name="-webkit-text-stroke"
                     sub_properties="-webkit-text-stroke-width
                                     -webkit-text-stroke-color"
                     gecko_pref="layout.css.prefixes.webkit"
                     products="gecko"
                     derive_serialize="True"
                     spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke">
-    use properties::longhands::{_webkit_text_stroke_color, _webkit_text_stroke_width};
+    use crate::properties::longhands::{_webkit_text_stroke_color, _webkit_text_stroke_width};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let mut color = None;
         let mut width = None;
         loop {
--- a/servo/components/style/properties/shorthands/list.mako.rs
+++ b/servo/components/style/properties/shorthands/list.mako.rs
@@ -3,18 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="list-style"
                     sub_properties="list-style-position list-style-image list-style-type"
                     derive_serialize="True"
                     spec="https://drafts.csswg.org/css-lists/#propdef-list-style">
-    use properties::longhands::{list_style_image, list_style_position, list_style_type};
-    use values::specified::url::ImageUrlOrNone;
+    use crate::properties::longhands::{list_style_image, list_style_position, list_style_type};
+    use crate::values::specified::url::ImageUrlOrNone;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         // `none` is ambiguous until we've finished parsing the shorthands, so we count the number
         // of times we see it.
         let mut nones = 0u8;
@@ -59,17 +59,17 @@
         }
 
         let position = unwrap_or_initial!(list_style_position, position);
 
         fn list_style_type_none() -> list_style_type::SpecifiedValue {
             % if product == "servo":
             list_style_type::SpecifiedValue::None
             % else:
-            use values::generics::CounterStyleOrNone;
+            use crate::values::generics::CounterStyleOrNone;
             list_style_type::SpecifiedValue::CounterStyle(CounterStyleOrNone::None)
             % endif
         }
 
         // If there are two `none`s, then we can't have a type or image; if there is one `none`,
         // then we can't have both a type *and* an image; if there is no `none` then we're fine as
         // long as we parsed something.
         match (any, nones, list_style_type, image) {
--- a/servo/components/style/properties/shorthands/outline.mako.rs
+++ b/servo/components/style/properties/shorthands/outline.mako.rs
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="outline"
                     sub_properties="outline-color outline-style outline-width"
                     derive_serialize="True"
                     spec="https://drafts.csswg.org/css-ui/#propdef-outline">
-    use properties::longhands::{outline_color, outline_width, outline_style};
-    use values::specified;
-    use parser::Parse;
+    use crate::properties::longhands::{outline_color, outline_width, outline_style};
+    use crate::values::specified;
+    use crate::parser::Parse;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let _unused = context;
         let mut color = None;
         let mut style = None;
@@ -57,36 +57,36 @@
     }
 </%helpers:shorthand>
 
 // The -moz-outline-radius shorthand is non-standard and not on a standards track.
 <%helpers:shorthand name="-moz-outline-radius" sub_properties="${' '.join(
     '-moz-outline-radius-%s' % corner
     for corner in ['topleft', 'topright', 'bottomright', 'bottomleft']
 )}" products="gecko" spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)">
-    use values::generics::rect::Rect;
-    use values::specified::border::BorderRadius;
-    use parser::Parse;
+    use crate::values::generics::rect::Rect;
+    use crate::values::specified::border::BorderRadius;
+    use crate::parser::Parse;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let radii = BorderRadius::parse(context, input)?;
         Ok(expanded! {
             _moz_outline_radius_topleft: radii.top_left,
             _moz_outline_radius_topright: radii.top_right,
             _moz_outline_radius_bottomright: radii.bottom_right,
             _moz_outline_radius_bottomleft: radii.bottom_left,
         })
     }
 
     impl<'a> ToCss for LonghandsToSerialize<'a>  {
         fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
-            use values::generics::border::BorderCornerRadius;
+            use crate::values::generics::border::BorderCornerRadius;
 
             let LonghandsToSerialize {
                 _moz_outline_radius_topleft: &BorderCornerRadius(ref tl),
                 _moz_outline_radius_topright: &BorderCornerRadius(ref tr),
                 _moz_outline_radius_bottomright: &BorderCornerRadius(ref br),
                 _moz_outline_radius_bottomleft: &BorderCornerRadius(ref bl),
             } = *self;
 
--- a/servo/components/style/properties/shorthands/position.mako.rs
+++ b/servo/components/style/properties/shorthands/position.mako.rs
@@ -4,17 +4,17 @@
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="flex-flow"
                     sub_properties="flex-direction flex-wrap"
                     extra_prefixes="webkit"
                     derive_serialize="True"
                     spec="https://drafts.csswg.org/css-flexbox/#flex-flow-property">
-    use properties::longhands::{flex_direction, flex_wrap};
+    use crate::properties::longhands::{flex_direction, flex_wrap};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let mut direction = None;
         let mut wrap = None;
         loop {
@@ -43,19 +43,19 @@
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="flex"
                     sub_properties="flex-grow flex-shrink flex-basis"
                     extra_prefixes="webkit"
                     derive_serialize="True"
                     spec="https://drafts.csswg.org/css-flexbox/#flex-property">
-    use parser::Parse;
-    use values::specified::NonNegativeNumber;
-    use properties::longhands::flex_basis::SpecifiedValue as FlexBasis;
+    use crate::parser::Parse;
+    use crate::values::specified::NonNegativeNumber;
+    use crate::properties::longhands::flex_basis::SpecifiedValue as FlexBasis;
 
     fn parse_flexibility<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<(NonNegativeNumber, Option<NonNegativeNumber>),ParseError<'i>> {
         let grow = NonNegativeNumber::parse(context, input)?;
         let shrink = input.try(|i| NonNegativeNumber::parse(context, i)).ok();
         Ok((grow, shrink))
@@ -106,17 +106,17 @@
             flex_basis: basis.unwrap_or(FlexBasis::zero_percent()),
         })
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="gap" alias="grid-gap" sub_properties="row-gap column-gap"
                     spec="https://drafts.csswg.org/css-align-3/#gap-shorthand"
                     products="gecko">
-  use properties::longhands::{row_gap, column_gap};
+  use crate::properties::longhands::{row_gap, column_gap};
 
   pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                              -> Result<Longhands, ParseError<'i>> {
       let r_gap = row_gap::parse(context, input)?;
       let c_gap = input.try(|input| column_gap::parse(context, input)).unwrap_or(r_gap.clone());
 
       Ok(expanded! {
         row_gap: r_gap,
@@ -137,18 +137,18 @@
   }
 
 </%helpers:shorthand>
 
 % for kind in ["row", "column"]:
 <%helpers:shorthand name="grid-${kind}" sub_properties="grid-${kind}-start grid-${kind}-end"
                     spec="https://drafts.csswg.org/css-grid/#propdef-grid-${kind}"
                     products="gecko">
-    use values::specified::GridLine;
-    use parser::Parse;
+    use crate::values::specified::GridLine;
+    use crate::parser::Parse;
 
     // NOTE: Since both the shorthands have the same code, we should (re-)use code from one to implement
     // the other. This might not be a big deal for now, but we should consider looking into this in the future
     // to limit the amount of code generated.
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
@@ -179,18 +179,18 @@
     }
 </%helpers:shorthand>
 % endfor
 
 <%helpers:shorthand name="grid-area"
                     sub_properties="grid-row-start grid-row-end grid-column-start grid-column-end"
                     spec="https://drafts.csswg.org/css-grid/#propdef-grid-area"
                     products="gecko">
-    use values::specified::GridLine;
-    use parser::Parse;
+    use crate::values::specified::GridLine;
+    use crate::parser::Parse;
 
     // The code is the same as `grid-{row,column}` except that this can have four values at most.
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         fn line_with_ident_from(other: &GridLine) -> GridLine {
             let mut this = GridLine::auto();
@@ -246,24 +246,24 @@
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="grid-template"
                     sub_properties="grid-template-rows grid-template-columns grid-template-areas"
                     spec="https://drafts.csswg.org/css-grid/#propdef-grid-template"
                     products="gecko">
-    use parser::Parse;
+    use crate::parser::Parse;
     use servo_arc::Arc;
-    use values::{Either, None_};
-    use values::generics::grid::{LineNameList, TrackSize, TrackList, TrackListType};
-    use values::generics::grid::{TrackListValue, concat_serialize_idents};
-    use values::specified::{GridTemplateComponent, GenericGridTemplateComponent};
-    use values::specified::grid::parse_line_names;
-    use values::specified::position::{TemplateAreas, TemplateAreasArc};
+    use crate::values::{Either, None_};
+    use crate::values::generics::grid::{LineNameList, TrackSize, TrackList, TrackListType};
+    use crate::values::generics::grid::{TrackListValue, concat_serialize_idents};
+    use crate::values::specified::{GridTemplateComponent, GenericGridTemplateComponent};
+    use crate::values::specified::grid::parse_line_names;
+    use crate::values::specified::position::{TemplateAreas, TemplateAreasArc};
 
     /// Parsing for `<grid-template>` shorthand (also used by `grid` shorthand).
     pub fn parse_grid_template<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<(GridTemplateComponent, GridTemplateComponent, Either<TemplateAreasArc, None_>), ParseError<'i>> {
         // Other shorthand sub properties also parse `none` and `subgrid` keywords and this
         // shorthand should know after these keywords there is nothing to parse. Otherwise it
@@ -479,22 +479,22 @@
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="grid"
                     sub_properties="grid-template-rows grid-template-columns grid-template-areas
                                     grid-auto-rows grid-auto-columns grid-auto-flow"
                     spec="https://drafts.csswg.org/css-grid/#propdef-grid"
                     products="gecko">
-    use parser::Parse;
-    use properties::longhands::{grid_auto_columns, grid_auto_rows, grid_auto_flow};
-    use values::{Either, None_};
-    use values::generics::grid::{GridTemplateComponent, TrackListType};
-    use values::specified::{GenericGridTemplateComponent, TrackSize};
-    use values::specified::position::{AutoFlow, GridAutoFlow};
+    use crate::parser::Parse;
+    use crate::properties::longhands::{grid_auto_columns, grid_auto_rows, grid_auto_flow};
+    use crate::values::{Either, None_};
+    use crate::values::generics::grid::{GridTemplateComponent, TrackListType};
+    use crate::values::specified::{GenericGridTemplateComponent, TrackSize};
+    use crate::values::specified::position::{AutoFlow, GridAutoFlow};
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let mut temp_rows = GridTemplateComponent::None;
         let mut temp_cols = GridTemplateComponent::None;
         let mut temp_areas = Either::Second(None_);
@@ -631,17 +631,17 @@
             Ok(())
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="place-content" sub_properties="align-content justify-content"
                     spec="https://drafts.csswg.org/css-align/#propdef-place-content"
                     products="gecko">
-    use values::specified::align::{AlignContent, JustifyContent, ContentDistribution, AxisDirection};
+    use crate::values::specified::align::{AlignContent, JustifyContent, ContentDistribution, AxisDirection};
 
     pub fn parse_value<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let align_content =
             ContentDistribution::parse(input, AxisDirection::Block)?;
 
@@ -683,17 +683,17 @@
             Ok(())
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="place-self" sub_properties="align-self justify-self"
                     spec="https://drafts.csswg.org/css-align/#place-self-property"
                     products="gecko">
-    use values::specified::align::{AlignSelf, JustifySelf, SelfAlignment, AxisDirection};
+    use crate::values::specified::align::{AlignSelf, JustifySelf, SelfAlignment, AxisDirection};
 
     pub fn parse_value<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         let align = SelfAlignment::parse(input, AxisDirection::Block)?;
         let justify = input.try(|input| SelfAlignment::parse(input, AxisDirection::Inline));
 
@@ -721,18 +721,18 @@
             Ok(())
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="place-items" sub_properties="align-items justify-items"
                     spec="https://drafts.csswg.org/css-align/#place-items-property"
                     products="gecko">
-    use values::specified::align::{AlignItems, JustifyItems};
-    use parser::Parse;
+    use crate::values::specified::align::{AlignItems, JustifyItems};
+    use crate::parser::Parse;
 
     impl From<AlignItems> for JustifyItems {
         fn from(align: AlignItems) -> JustifyItems {
             JustifyItems(align.0)
         }
     }
 
     pub fn parse_value<'i, 't>(
--- a/servo/components/style/properties/shorthands/svg.mako.rs
+++ b/servo/components/style/properties/shorthands/svg.mako.rs
@@ -4,21 +4,21 @@
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <%helpers:shorthand name="mask" products="gecko" extra_prefixes="webkit"
                     flags="SHORTHAND_IN_GETCS"
                     sub_properties="mask-mode mask-repeat mask-clip mask-origin mask-composite mask-position-x
                                     mask-position-y mask-size mask-image"
                     spec="https://drafts.fxtf.org/css-masking/#propdef-mask">
-    use properties::longhands::{mask_mode, mask_repeat, mask_clip, mask_origin, mask_composite, mask_position_x,
+    use crate::properties::longhands::{mask_mode, mask_repeat, mask_clip, mask_origin, mask_composite, mask_position_x,
                                 mask_position_y};
-    use properties::longhands::{mask_size, mask_image};
-    use values::specified::{Position, PositionComponent};
-    use parser::Parse;
+    use crate::properties::longhands::{mask_size, mask_image};
+    use crate::values::specified::{Position, PositionComponent};
+    use crate::parser::Parse;
 
     // FIXME(emilio): These two mask types should be the same!
     impl From<mask_origin::single_value::SpecifiedValue> for mask_clip::single_value::SpecifiedValue {
         fn from(origin: mask_origin::single_value::SpecifiedValue) -> mask_clip::single_value::SpecifiedValue {
             match origin {
                 mask_origin::single_value::SpecifiedValue::ContentBox =>
                     mask_clip::single_value::SpecifiedValue::ContentBox,
                 mask_origin::single_value::SpecifiedValue::PaddingBox =>
@@ -120,18 +120,18 @@
             % for name in "image mode position_x position_y size repeat origin clip composite".split():
                 mask_${name}: mask_${name},
             % endfor
          })
     }
 
     impl<'a> ToCss for LonghandsToSerialize<'a>  {
         fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
-            use properties::longhands::mask_origin::single_value::computed_value::T as Origin;
-            use properties::longhands::mask_clip::single_value::computed_value::T as Clip;
+            use crate::properties::longhands::mask_origin::single_value::computed_value::T as Origin;
+            use crate::properties::longhands::mask_clip::single_value::computed_value::T as Clip;
 
             let len = self.mask_image.0.len();
             if len == 0 {
                 return Ok(());
             }
             % for name in "mode position_x position_y size repeat origin clip composite".split():
                 if self.mask_${name}.0.len() != len {
                     return Ok(());
@@ -181,19 +181,19 @@
         }
     }
 </%helpers:shorthand>
 
 <%helpers:shorthand name="mask-position" products="gecko" extra_prefixes="webkit"
                     flags="SHORTHAND_IN_GETCS"
                     sub_properties="mask-position-x mask-position-y"
                     spec="https://drafts.csswg.org/css-masks-4/#the-mask-position">
-    use properties::longhands::{mask_position_x,mask_position_y};
-    use values::specified::position::Position;
-    use parser::Parse;
+    use crate::properties::longhands::{mask_position_x,mask_position_y};
+    use crate::values::specified::position::Position;
+    use crate::parser::Parse;
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         // Vec grows from 0 to 4 by default on first push().  So allocate with
         // capacity 1, so in the common case of only one item we don't way
         // overallocate.  Note that we always push at least one item if parsing
--- a/servo/components/style/properties/shorthands/text.mako.rs
+++ b/servo/components/style/properties/shorthands/text.mako.rs
@@ -6,20 +6,20 @@
 
 <%helpers:shorthand name="text-decoration"
                     flags="SHORTHAND_IN_GETCS"
                     sub_properties="text-decoration-line
                     ${' text-decoration-style text-decoration-color' if product == 'gecko' else ''}"
                     spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration">
 
     % if product == "gecko":
-        use values::specified;
-        use properties::longhands::{text_decoration_line, text_decoration_style, text_decoration_color};
+        use crate::values::specified;
+        use crate::properties::longhands::{text_decoration_line, text_decoration_style, text_decoration_color};
     % else:
-        use properties::longhands::text_decoration_line;
+        use crate::properties::longhands::text_decoration_line;
     % endif
 
     pub fn parse_value<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Longhands, ParseError<'i>> {
         % if product == "gecko":
             let (mut line, mut style, mut color, mut any) = (None, None, None, false);