Backed out 7 changesets (bug 1506391) for Btup bustages.
authorBrindusan Cristian <cbrindusan@mozilla.com>
Sun, 11 Nov 2018 01:08:20 +0200
changeset 445798 66b88241e436d9bc1ab0d1db79a3fb3789b10a0c
parent 445797 2d231a84c946db9dbc31e3e9f00e9804918ffbee
child 445799 129a6628b7d662c1d117c80a01dedbfec796bb2e
push id109770
push usercbrindusan@mozilla.com
push dateSat, 10 Nov 2018 23:09:04 +0000
treeherdermozilla-inbound@66b88241e436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1506391
milestone65.0a1
backs outb8216171101c98e1bbd1268fb537c3a14cc65716
03d2309b737d152fbc42b1e58fe789a151f907e6
7b63f31498521f74a7cbe0de4e664a6fdd1ce2d6
be88680421db1ac86856b7d10e8dfa664d059a6f
3840ce1ebfb092d38e97a2787f019050e161986a
94517e21621cb1d7ab513592f1931f13c1b6682e
32bde6f52a32516059ad1226549abd0fbceff17e
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 7 changesets (bug 1506391) for Btup bustages. Backed out changeset b8216171101c (bug 1506391) Backed out changeset 03d2309b737d (bug 1506391) Backed out changeset 7b63f3149852 (bug 1506391) Backed out changeset be88680421db (bug 1506391) Backed out changeset 3840ce1ebfb0 (bug 1506391) Backed out changeset 94517e21621c (bug 1506391) Backed out changeset 32bde6f52a32 (bug 1506391)
servo/components/hashglobe/src/fake.rs
servo/components/hashglobe/src/hash_map.rs
servo/components/hashglobe/src/table.rs
servo/components/selectors/attr.rs
servo/components/selectors/builder.rs
servo/components/selectors/context.rs
servo/components/selectors/lib.rs
servo/components/selectors/matching.rs
servo/components/selectors/nth_index_cache.rs
servo/components/selectors/parser.rs
servo/components/selectors/tree.rs
servo/components/selectors/visitor.rs
servo/components/servo_arc/lib.rs
servo/components/style/animation.rs
servo/components/style/applicable_declarations.rs
servo/components/style/attr.rs
servo/components/style/author_styles.rs
servo/components/style/bezier.rs
servo/components/style/bloom.rs
servo/components/style/context.rs
servo/components/style/counter_style/mod.rs
servo/components/style/custom_properties.rs
servo/components/style/data.rs
servo/components/style/dom.rs
servo/components/style/dom_apis.rs
servo/components/style/driver.rs
servo/components/style/encoding_support.rs
servo/components/style/error_reporting.rs
servo/components/style/font_face.rs
servo/components/style/font_metrics.rs
servo/components/style/gecko/arc_types.rs
servo/components/style/gecko/conversions.rs
servo/components/style/gecko/data.rs
servo/components/style/gecko/global_style_data.rs
servo/components/style/gecko/media_features.rs
servo/components/style/gecko/media_queries.rs
servo/components/style/gecko/pseudo_element.rs
servo/components/style/gecko/pseudo_element_definition.mako.rs
servo/components/style/gecko/restyle_damage.rs
servo/components/style/gecko/rules.rs
servo/components/style/gecko/selector_parser.rs
servo/components/style/gecko/snapshot.rs
servo/components/style/gecko/snapshot_helpers.rs
servo/components/style/gecko/traversal.rs
servo/components/style/gecko/url.rs
servo/components/style/gecko/values.rs
servo/components/style/gecko/wrapper.rs
servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs
servo/components/style/gecko_bindings/sugar/ns_compatibility.rs
servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs
servo/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs
servo/components/style/gecko_bindings/sugar/ns_css_value.rs
servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs
servo/components/style/gecko_bindings/sugar/ns_style_coord.rs
servo/components/style/gecko_bindings/sugar/ns_t_array.rs
servo/components/style/gecko_bindings/sugar/origin_flags.rs
servo/components/style/gecko_bindings/sugar/refptr.rs
servo/components/style/gecko_bindings/sugar/style_complex_color.rs
servo/components/style/gecko_string_cache/mod.rs
servo/components/style/gecko_string_cache/namespace.rs
servo/components/style/invalidation/element/document_state.rs
servo/components/style/invalidation/element/element_wrapper.rs
servo/components/style/invalidation/element/invalidation_map.rs
servo/components/style/invalidation/element/invalidator.rs
servo/components/style/invalidation/element/restyle_hints.rs
servo/components/style/invalidation/element/state_and_attributes.rs
servo/components/style/invalidation/media_queries.rs
servo/components/style/invalidation/stylesheets.rs
servo/components/style/lib.rs
servo/components/style/logical_geometry.rs
servo/components/style/matching.rs
servo/components/style/media_queries/media_condition.rs
servo/components/style/media_queries/media_feature.rs
servo/components/style/media_queries/media_feature_expression.rs
servo/components/style/media_queries/media_list.rs
servo/components/style/media_queries/media_query.rs
servo/components/style/media_queries/mod.rs
servo/components/style/parallel.rs
servo/components/style/parser.rs
servo/components/style/properties/cascade.rs
servo/components/style/properties/data.py
servo/components/style/properties/declaration_block.rs
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
servo/components/style/rule_cache.rs
servo/components/style/rule_collector.rs
servo/components/style/rule_tree/mod.rs
servo/components/style/selector_map.rs
servo/components/style/selector_parser.rs
servo/components/style/servo/media_queries.rs
servo/components/style/servo/restyle_damage.rs
servo/components/style/servo/selector_parser.rs
servo/components/style/servo/url.rs
servo/components/style/shared_lock.rs
servo/components/style/sharing/checks.rs
servo/components/style/sharing/mod.rs
servo/components/style/style_adjuster.rs
servo/components/style/style_resolver.rs
servo/components/style/stylesheet_set.rs
servo/components/style/stylesheets/counter_style_rule.rs
servo/components/style/stylesheets/document_rule.rs
servo/components/style/stylesheets/font_face_rule.rs
servo/components/style/stylesheets/font_feature_values_rule.rs
servo/components/style/stylesheets/import_rule.rs
servo/components/style/stylesheets/keyframes_rule.rs
servo/components/style/stylesheets/loader.rs
servo/components/style/stylesheets/media_rule.rs
servo/components/style/stylesheets/mod.rs
servo/components/style/stylesheets/namespace_rule.rs
servo/components/style/stylesheets/page_rule.rs
servo/components/style/stylesheets/rule_list.rs
servo/components/style/stylesheets/rule_parser.rs
servo/components/style/stylesheets/rules_iterator.rs
servo/components/style/stylesheets/style_rule.rs
servo/components/style/stylesheets/stylesheet.rs
servo/components/style/stylesheets/supports_rule.rs
servo/components/style/stylesheets/viewport_rule.rs
servo/components/style/stylist.rs
servo/components/style/traversal.rs
servo/components/style/traversal_flags.rs
servo/components/style/use_counters/mod.rs
servo/components/style/values/animated/color.rs
servo/components/style/values/animated/effects.rs
servo/components/style/values/animated/font.rs
servo/components/style/values/animated/length.rs
servo/components/style/values/animated/mod.rs
servo/components/style/values/animated/svg.rs
servo/components/style/values/computed/align.rs
servo/components/style/values/computed/angle.rs
servo/components/style/values/computed/background.rs
servo/components/style/values/computed/basic_shape.rs
servo/components/style/values/computed/border.rs
servo/components/style/values/computed/box.rs
servo/components/style/values/computed/color.rs
servo/components/style/values/computed/column.rs
servo/components/style/values/computed/counters.rs
servo/components/style/values/computed/easing.rs
servo/components/style/values/computed/effects.rs
servo/components/style/values/computed/flex.rs
servo/components/style/values/computed/font.rs
servo/components/style/values/computed/gecko.rs
servo/components/style/values/computed/image.rs
servo/components/style/values/computed/length.rs
servo/components/style/values/computed/list.rs
servo/components/style/values/computed/mod.rs
servo/components/style/values/computed/motion.rs
servo/components/style/values/computed/outline.rs
servo/components/style/values/computed/percentage.rs
servo/components/style/values/computed/position.rs
servo/components/style/values/computed/rect.rs
servo/components/style/values/computed/resolution.rs
servo/components/style/values/computed/svg.rs
servo/components/style/values/computed/table.rs
servo/components/style/values/computed/text.rs
servo/components/style/values/computed/time.rs
servo/components/style/values/computed/transform.rs
servo/components/style/values/computed/ui.rs
servo/components/style/values/computed/url.rs
servo/components/style/values/generics/background.rs
servo/components/style/values/generics/basic_shape.rs
servo/components/style/values/generics/border.rs
servo/components/style/values/generics/box.rs
servo/components/style/values/generics/counters.rs
servo/components/style/values/generics/easing.rs
servo/components/style/values/generics/font.rs
servo/components/style/values/generics/grid.rs
servo/components/style/values/generics/image.rs
servo/components/style/values/generics/length.rs
servo/components/style/values/generics/mod.rs
servo/components/style/values/generics/rect.rs
servo/components/style/values/generics/size.rs
servo/components/style/values/generics/svg.rs
servo/components/style/values/generics/text.rs
servo/components/style/values/generics/transform.rs
servo/components/style/values/generics/url.rs
servo/components/style/values/mod.rs
servo/components/style/values/specified/align.rs
servo/components/style/values/specified/angle.rs
servo/components/style/values/specified/background.rs
servo/components/style/values/specified/basic_shape.rs
servo/components/style/values/specified/border.rs
servo/components/style/values/specified/box.rs
servo/components/style/values/specified/calc.rs
servo/components/style/values/specified/color.rs
servo/components/style/values/specified/column.rs
servo/components/style/values/specified/counters.rs
servo/components/style/values/specified/easing.rs
servo/components/style/values/specified/effects.rs
servo/components/style/values/specified/flex.rs
servo/components/style/values/specified/font.rs
servo/components/style/values/specified/gecko.rs
servo/components/style/values/specified/grid.rs
servo/components/style/values/specified/image.rs
servo/components/style/values/specified/length.rs
servo/components/style/values/specified/list.rs
servo/components/style/values/specified/mod.rs
servo/components/style/values/specified/motion.rs
servo/components/style/values/specified/outline.rs
servo/components/style/values/specified/percentage.rs
servo/components/style/values/specified/position.rs
servo/components/style/values/specified/rect.rs
servo/components/style/values/specified/resolution.rs
servo/components/style/values/specified/source_size_list.rs
servo/components/style/values/specified/svg.rs
servo/components/style/values/specified/svg_path.rs
servo/components/style/values/specified/table.rs
servo/components/style/values/specified/text.rs
servo/components/style/values/specified/time.rs
servo/components/style/values/specified/transform.rs
servo/components/style/values/specified/ui.rs
servo/components/style/values/specified/url.rs
servo/components/style_derive/animate.rs
servo/components/style_derive/cg.rs
servo/components/style_derive/compute_squared_distance.rs
servo/components/style_derive/parse.rs
servo/components/style_derive/specified_value_info.rs
servo/components/style_derive/to_animated_value.rs
servo/components/style_derive/to_animated_zero.rs
servo/components/style_derive/to_computed_value.rs
servo/components/style_derive/to_css.rs
servo/components/style_traits/lib.rs
servo/components/style_traits/values.rs
servo/components/style_traits/viewport.rs
--- a/servo/components/hashglobe/src/fake.rs
+++ b/servo/components/hashglobe/src/fake.rs
@@ -21,17 +21,17 @@ use std::hash::{BuildHasher, Hash};
 use std::ops::{Deref, DerefMut};
 
 pub use std::collections::hash_map::{Entry, Iter as MapIter, IterMut as MapIterMut, RandomState};
 pub use std::collections::hash_set::{IntoIter as SetIntoIter, Iter as SetIter};
 
 #[derive(Clone)]
 pub struct HashMap<K, V, S = RandomState>(StdMap<K, V, S>);
 
-use crate::FailedAllocationError;
+use FailedAllocationError;
 
 impl<K, V, S> Deref for HashMap<K, V, S> {
     type Target = StdMap<K, V, S>;
     fn deref(&self) -> &Self::Target {
         &self.0
     }
 }
 
--- a/servo/components/hashglobe/src/hash_map.rs
+++ b/servo/components/hashglobe/src/hash_map.rs
@@ -18,17 +18,17 @@ use std::fmt::{self, Debug};
 use std::hash::{BuildHasher, Hash};
 use std::iter::FromIterator;
 use std::mem::{self, replace};
 use std::ops::{Deref, Index};
 
 use super::table::BucketState::{Empty, Full};
 use super::table::{self, Bucket, EmptyBucket, FullBucket, FullBucketMut, RawTable, SafeHash};
 
-use crate::FailedAllocationError;
+use FailedAllocationError;
 
 const MIN_NONZERO_RAW_CAPACITY: usize = 32; // must be a power of two
 
 /// The default behavior of HashMap implements a maximum load factor of 90.9%.
 #[derive(Clone)]
 struct DefaultResizePolicy;
 
 impl DefaultResizePolicy {
--- a/servo/components/hashglobe/src/table.rs
+++ b/servo/components/hashglobe/src/table.rs
@@ -3,27 +3,27 @@
 // http://rust-lang.org/COPYRIGHT.
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use crate::alloc::{alloc, dealloc};
-use crate::shim::{Shared, Unique};
+use alloc::{alloc, dealloc};
+use shim::{Shared, Unique};
 use std::cmp;
 use std::hash::{BuildHasher, Hash, Hasher};
 use std::marker;
 use std::mem::{self, align_of, size_of};
 use std::ops::{Deref, DerefMut};
 use std::ptr;
 
 use self::BucketState::*;
-use crate::FailedAllocationError;
+use FailedAllocationError;
 
 /// Integer type used for stored hash values.
 ///
 /// No more than bit_width(usize) bits are needed to select a bucket.
 ///
 /// The most significant bit is ours to use for tagging `SafeHash`.
 ///
 /// (Even if we could have usize::MAX bytes allocated for buckets,
@@ -790,17 +790,17 @@ impl<K, V> RawTable<K, V> {
                 "capacity overflow when allocating RawTable",
             ));
         }
 
         // FORK NOTE: Uses alloc shim instead of Heap.alloc
         let buffer = alloc(size, alignment);
 
         if buffer.is_null() {
-            use crate::AllocationInfo;
+            use AllocationInfo;
             return Err(FailedAllocationError {
                 reason: "out of memory when allocating RawTable",
                 allocation_info: Some(AllocationInfo { size, alignment }),
             });
         }
 
         let hashes = buffer.offset(hash_offset as isize) as *mut HashUint;
 
--- a/servo/components/selectors/attr.rs
+++ b/servo/components/selectors/attr.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-use crate::parser::SelectorImpl;
 use cssparser::ToCss;
+use parser::SelectorImpl;
 use std::fmt;
 
 #[derive(Clone, Eq, PartialEq)]
 pub struct AttrSelectorWithOptionalNamespace<Impl: SelectorImpl> {
     pub namespace: Option<NamespaceConstraint<(Impl::NamespacePrefix, Impl::NamespaceUrl)>>,
     pub local_name: Impl::LocalName,
     pub local_name_lower: Impl::LocalName,
     pub operation: ParsedAttrSelectorOperation<Impl::AttrValue>,
--- a/servo/components/selectors/builder.rs
+++ b/servo/components/selectors/builder.rs
@@ -12,19 +12,19 @@
 //!   matching order.
 //! * We store the simple selectors for each combinator from left to right, so
 //!   that we match the cheaper simple selectors first.
 //!
 //! Meeting all these constraints without extra memmove traffic during parsing
 //! is non-trivial. This module encapsulates those details and presents an
 //! easy-to-use API for the parser.
 
-use crate::parser::{Combinator, Component, SelectorImpl};
-use crate::sink::Push;
+use parser::{Combinator, Component, SelectorImpl};
 use servo_arc::{Arc, HeaderWithLength, ThinArc};
+use sink::Push;
 use smallvec::{self, SmallVec};
 use std::cmp;
 use std::iter;
 use std::ops::{Add, AddAssign};
 use std::ptr;
 use std::slice;
 
 /// Top-level SelectorBuilder struct. This should be stack-allocated by the
--- a/servo/components/selectors/context.rs
+++ b/servo/components/selectors/context.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-use crate::attr::CaseSensitivity;
-use crate::bloom::BloomFilter;
-use crate::nth_index_cache::NthIndexCache;
-use crate::parser::SelectorImpl;
-use crate::tree::{Element, OpaqueElement};
+use attr::CaseSensitivity;
+use bloom::BloomFilter;
+use nth_index_cache::NthIndexCache;
+use parser::SelectorImpl;
+use tree::{Element, OpaqueElement};
 
 /// What kind of selector matching mode we should use.
 ///
 /// There are two modes of selector matching. The difference is only noticeable
 /// in presence of pseudo-elements.
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub enum MatchingMode {
     /// Don't ignore any pseudo-element selectors.
--- a/servo/components/selectors/lib.rs
+++ b/servo/components/selectors/lib.rs
@@ -26,11 +26,11 @@ mod builder;
 pub mod context;
 pub mod matching;
 mod nth_index_cache;
 pub mod parser;
 pub mod sink;
 mod tree;
 pub mod visitor;
 
-pub use crate::nth_index_cache::NthIndexCache;
-pub use crate::parser::{Parser, SelectorImpl, SelectorList};
-pub use crate::tree::{Element, OpaqueElement};
+pub use nth_index_cache::NthIndexCache;
+pub use parser::{Parser, SelectorImpl, SelectorList};
+pub use tree::{Element, OpaqueElement};
--- a/servo/components/selectors/matching.rs
+++ b/servo/components/selectors/matching.rs
@@ -1,22 +1,22 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-use crate::attr::{AttrSelectorOperation, NamespaceConstraint, ParsedAttrSelectorOperation};
-use crate::bloom::{BloomFilter, BLOOM_HASH_MASK};
-use crate::nth_index_cache::NthIndexCacheInner;
-use crate::parser::{AncestorHashes, Combinator, Component, LocalName};
-use crate::parser::{NonTSPseudoClass, Selector, SelectorImpl, SelectorIter, SelectorList};
-use crate::tree::Element;
+use attr::{AttrSelectorOperation, NamespaceConstraint, ParsedAttrSelectorOperation};
+use bloom::{BloomFilter, BLOOM_HASH_MASK};
+use nth_index_cache::NthIndexCacheInner;
+use parser::{AncestorHashes, Combinator, Component, LocalName};
+use parser::{NonTSPseudoClass, Selector, SelectorImpl, SelectorIter, SelectorList};
 use std::borrow::Borrow;
 use std::iter;
+use tree::Element;
 
-pub use crate::context::*;
+pub use context::*;
 
 // The bloom filter for descendant CSS selectors will have a <1% false
 // positive rate until it has this many selectors in it, then it will
 // rapidly increase.
 pub static RECOMMENDED_SELECTOR_BLOOM_FILTER_SIZE: usize = 4096;
 
 bitflags! {
     /// Set of flags that are set on either the element or its parent (depending
@@ -673,49 +673,49 @@ where
             element.match_pseudo_element(pseudo, context.shared)
         },
         Component::LocalName(ref local_name) => matches_local_name(element, local_name),
         Component::ExplicitUniversalType | Component::ExplicitAnyNamespace => true,
         Component::Namespace(_, ref url) | Component::DefaultNamespace(ref url) => {
             element.namespace() == url.borrow()
         },
         Component::ExplicitNoNamespace => {
-            let ns = crate::parser::namespace_empty_string::<E::Impl>();
+            let ns = ::parser::namespace_empty_string::<E::Impl>();
             element.namespace() == ns.borrow()
         },
         Component::ID(ref id) => {
             element.has_id(id, context.shared.classes_and_ids_case_sensitivity())
         },
         Component::Class(ref class) => {
             element.has_class(class, context.shared.classes_and_ids_case_sensitivity())
         },
         Component::AttributeInNoNamespaceExists {
             ref local_name,
             ref local_name_lower,
         } => {
             let is_html = element.is_html_element_in_html_document();
             element.attr_matches(
-                &NamespaceConstraint::Specific(&crate::parser::namespace_empty_string::<E::Impl>()),
+                &NamespaceConstraint::Specific(&::parser::namespace_empty_string::<E::Impl>()),
                 select_name(is_html, local_name, local_name_lower),
                 &AttrSelectorOperation::Exists,
             )
         },
         Component::AttributeInNoNamespace {
             ref local_name,
             ref value,
             operator,
             case_sensitivity,
             never_matches,
         } => {
             if never_matches {
                 return false;
             }
             let is_html = element.is_html_element_in_html_document();
             element.attr_matches(
-                &NamespaceConstraint::Specific(&crate::parser::namespace_empty_string::<E::Impl>()),
+                &NamespaceConstraint::Specific(&::parser::namespace_empty_string::<E::Impl>()),
                 local_name,
                 &AttrSelectorOperation::WithValue {
                     operator: operator,
                     case_sensitivity: case_sensitivity.to_unconditional(is_html),
                     expected_value: value,
                 },
             )
         },
@@ -723,17 +723,17 @@ where
             if attr_sel.never_matches {
                 return false;
             }
             let is_html = element.is_html_element_in_html_document();
             let empty_string;
             let namespace = match attr_sel.namespace() {
                 Some(ns) => ns,
                 None => {
-                    empty_string = crate::parser::namespace_empty_string::<E::Impl>();
+                    empty_string = ::parser::namespace_empty_string::<E::Impl>();
                     NamespaceConstraint::Specific(&empty_string)
                 },
             };
             element.attr_matches(
                 &namespace,
                 select_name(is_html, &attr_sel.local_name, &attr_sel.local_name_lower),
                 &match attr_sel.operation {
                     ParsedAttrSelectorOperation::Exists => AttrSelectorOperation::Exists,
--- a/servo/components/selectors/nth_index_cache.rs
+++ b/servo/components/selectors/nth_index_cache.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-use crate::tree::OpaqueElement;
 use fxhash::FxHashMap;
+use tree::OpaqueElement;
 
 /// A cache to speed up matching of nth-index-like selectors.
 ///
 /// See [1] for some discussion around the design tradeoffs.
 ///
 /// [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1401855#c3
 #[derive(Default)]
 pub struct NthIndexCache {
--- a/servo/components/selectors/parser.rs
+++ b/servo/components/selectors/parser.rs
@@ -1,32 +1,32 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
-use crate::attr::{AttrSelectorOperator, AttrSelectorWithOptionalNamespace};
-use crate::attr::{NamespaceConstraint, ParsedAttrSelectorOperation};
-use crate::attr::{ParsedCaseSensitivity, SELECTOR_WHITESPACE};
-use crate::bloom::BLOOM_HASH_MASK;
-use crate::builder::{SelectorBuilder, SpecificityAndFlags};
-use crate::context::QuirksMode;
-use crate::sink::Push;
-pub use crate::visitor::{SelectorVisitor, Visit};
+use attr::{AttrSelectorOperator, AttrSelectorWithOptionalNamespace};
+use attr::{NamespaceConstraint, ParsedAttrSelectorOperation};
+use attr::{ParsedCaseSensitivity, SELECTOR_WHITESPACE};
+use bloom::BLOOM_HASH_MASK;
+use builder::{SelectorBuilder, SpecificityAndFlags};
+use context::QuirksMode;
 use cssparser::{parse_nth, serialize_identifier};
 use cssparser::{BasicParseError, BasicParseErrorKind, ParseError, ParseErrorKind};
 use cssparser::{CowRcStr, Delimiter, SourceLocation};
 use cssparser::{CssStringWriter, Parser as CssParser, ToCss, Token};
 use precomputed_hash::PrecomputedHash;
 use servo_arc::ThinArc;
+use sink::Push;
 use smallvec::SmallVec;
 use std::borrow::{Borrow, Cow};
 use std::fmt::{self, Debug, Display, Write};
 use std::iter::Rev;
 use std::slice;
 use thin_slice::ThinBoxedSlice;
+pub use visitor::{SelectorVisitor, Visit};
 
 /// A trait that represents a pseudo-element.
 pub trait PseudoElement: Sized + ToCss {
     /// The `SelectorImpl` this pseudo-element is used for.
     type Impl: SelectorImpl;
 
     /// Whether the pseudo-element supports a given state selector to the right
     /// of it.
@@ -460,17 +460,17 @@ where
                     return false;
                 }
             }
             AttributeOther(ref attr_selector) if !attr_selector.never_matches => {
                 let empty_string;
                 let namespace = match attr_selector.namespace() {
                     Some(ns) => ns,
                     None => {
-                        empty_string = crate::parser::namespace_empty_string::<Impl>();
+                        empty_string = ::parser::namespace_empty_string::<Impl>();
                         NamespaceConstraint::Specific(&empty_string)
                     },
                 };
                 if !visitor.visit_attribute_selector(
                     &namespace,
                     &attr_selector.local_name,
                     &attr_selector.local_name_lower,
                 ) {
@@ -2142,19 +2142,19 @@ where
         P::parse_non_ts_pseudo_class(parser, location, name).map(Component::NonTSPseudoClass)
     })
 }
 
 // NB: pub module in order to access the DummyParser
 #[cfg(test)]
 pub mod tests {
     use super::*;
-    use crate::builder::HAS_PSEUDO_BIT;
-    use crate::parser;
+    use builder::HAS_PSEUDO_BIT;
     use cssparser::{serialize_identifier, Parser as CssParser, ParserInput, ToCss};
+    use parser;
     use std::collections::HashMap;
     use std::fmt;
 
     #[derive(Clone, Debug, Eq, PartialEq)]
     pub enum PseudoClass {
         Hover,
         Active,
         Lang(String),
--- a/servo/components/selectors/tree.rs
+++ b/servo/components/selectors/tree.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Traits that nodes must implement. Breaks the otherwise-cyclic dependency
 //! between layout and style.
 
-use crate::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
-use crate::matching::{ElementSelectorFlags, MatchingContext};
-use crate::parser::SelectorImpl;
+use attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
+use matching::{ElementSelectorFlags, MatchingContext};
+use parser::SelectorImpl;
 use std::fmt::Debug;
 use std::ptr::NonNull;
 
 /// Opaque representation of an Element, for identity comparisons. We use
 /// NonZeroPtrMut to get the NonZero optimization.
 #[derive(Clone, Debug, Eq, Hash, PartialEq)]
 pub struct OpaqueElement(NonNull<()>);
 
--- a/servo/components/selectors/visitor.rs
+++ b/servo/components/selectors/visitor.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Visitor traits for selectors.
 
 #![deny(missing_docs)]
 
-use crate::attr::NamespaceConstraint;
-use crate::parser::{Combinator, Component, SelectorImpl};
+use attr::NamespaceConstraint;
+use parser::{Combinator, Component, SelectorImpl};
 
 /// A trait to visit selector properties.
 ///
 /// All the `visit_foo` methods return a boolean indicating whether the
 /// traversal should continue or not.
 pub trait SelectorVisitor {
     /// The selector implementation this visitor wants to visit.
     type Impl: SelectorImpl;
--- a/servo/components/servo_arc/lib.rs
+++ b/servo/components/servo_arc/lib.rs
@@ -1055,17 +1055,17 @@ pub struct ArcUnion<A, B> {
     phantom_b: PhantomData<B>,
 }
 
 unsafe impl<A: Sync + Send, B: Send + Sync> Send for ArcUnion<A, B> {}
 unsafe impl<A: Sync + Send, B: Send + Sync> Sync for ArcUnion<A, B> {}
 
 impl<A: PartialEq, B: PartialEq> PartialEq for ArcUnion<A, B> {
     fn eq(&self, other: &Self) -> bool {
-        use crate::ArcUnionBorrow::*;
+        use ArcUnionBorrow::*;
         match (self.borrow(), other.borrow()) {
             (First(x), First(y)) => x == y,
             (Second(x), Second(y)) => x == y,
             (_, _) => false,
         }
     }
 }
 
--- a/servo/components/style/animation.rs
+++ b/servo/components/style/animation.rs
@@ -3,39 +3,39 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! CSS transitions and animations.
 
 // NOTE(emilio): This code isn't really executed in Gecko, but we don't want to
 // compile it out so that people remember it exists, thus the cfg'd Sender
 // import.
 
-use crate::bezier::Bezier;
-use crate::context::SharedStyleContext;
-use crate::dom::{OpaqueNode, TElement};
-use crate::font_metrics::FontMetricsProvider;
-use crate::properties::animated_properties::AnimatedProperty;
-use crate::properties::longhands::animation_direction::computed_value::single_value::T as AnimationDirection;
-use crate::properties::longhands::animation_play_state::computed_value::single_value::T as AnimationPlayState;
-use crate::properties::{self, CascadeMode, ComputedValues, LonghandId};
-use crate::rule_tree::CascadeLevel;
-use crate::stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue};
-use crate::timer::Timer;
-use crate::values::computed::box_::TransitionProperty;
-use crate::values::computed::Time;
-use crate::values::computed::TimingFunction;
-use crate::values::generics::box_::AnimationIterationCount;
-use crate::values::generics::easing::{StepPosition, TimingFunction as GenericTimingFunction};
-use crate::Atom;
+use bezier::Bezier;
+use context::SharedStyleContext;
+use dom::{OpaqueNode, TElement};
+use font_metrics::FontMetricsProvider;
+use properties::animated_properties::AnimatedProperty;
+use properties::longhands::animation_direction::computed_value::single_value::T as AnimationDirection;
+use properties::longhands::animation_play_state::computed_value::single_value::T as AnimationPlayState;
+use properties::{self, CascadeMode, ComputedValues, LonghandId};
+use rule_tree::CascadeLevel;
 use servo_arc::Arc;
 #[cfg(feature = "servo")]
 use servo_channel::Sender;
 use std::fmt;
 #[cfg(feature = "gecko")]
 use std::sync::mpsc::Sender;
+use stylesheets::keyframes_rule::{KeyframesAnimation, KeyframesStep, KeyframesStepValue};
+use timer::Timer;
+use values::computed::box_::TransitionProperty;
+use values::computed::Time;
+use values::computed::TimingFunction;
+use values::generics::box_::AnimationIterationCount;
+use values::generics::easing::{StepPosition, TimingFunction as GenericTimingFunction};
+use Atom;
 
 /// This structure represents a keyframes animation current iteration state.
 ///
 /// If the iteration count is infinite, there's no other state, otherwise we
 /// have to keep track the current iteration and the max iteration count.
 #[derive(Clone, Debug)]
 pub enum KeyframesIterationState {
     /// Infinite iterations, so no need to track a state.
--- a/servo/components/style/applicable_declarations.rs
+++ b/servo/components/style/applicable_declarations.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Applicable declarations management.
 
-use crate::properties::PropertyDeclarationBlock;
-use crate::rule_tree::{CascadeLevel, ShadowCascadeOrder, StyleSource};
-use crate::shared_lock::Locked;
+use properties::PropertyDeclarationBlock;
+use rule_tree::{CascadeLevel, ShadowCascadeOrder, StyleSource};
 use servo_arc::Arc;
+use shared_lock::Locked;
 use smallvec::SmallVec;
 use std::fmt::{self, Debug};
 
 /// List of applicable declarations. This is a transient structure that shuttles
 /// declarations between selector matching and inserting into the rule tree, and
 /// therefore we want to avoid heap-allocation where possible.
 ///
 /// In measurements on wikipedia, we pretty much never have more than 8 applicable
--- a/servo/components/style/attr.rs
+++ b/servo/components/style/attr.rs
@@ -2,30 +2,30 @@
  * 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/. */
 
 //! Parsed representations of [DOM attributes][attr].
 //!
 //! [attr]: https://dom.spec.whatwg.org/#interface-attr
 
 use app_units::Au;
-use crate::properties::PropertyDeclarationBlock;
-use crate::shared_lock::Locked;
-use crate::str::str_join;
-use crate::str::{read_exponent, read_fraction, HTML_SPACE_CHARACTERS};
-use crate::str::{read_numbers, split_commas, split_html_space_chars};
-use crate::values::specified::Length;
-use crate::{Atom, LocalName, Namespace, Prefix};
 use cssparser::{self, Color, RGBA};
 use euclid::num::Zero;
 use num_traits::ToPrimitive;
+use properties::PropertyDeclarationBlock;
 use selectors::attr::AttrSelectorOperation;
 use servo_arc::Arc;
 use servo_url::ServoUrl;
+use shared_lock::Locked;
 use std::str::FromStr;
+use str::str_join;
+use str::{read_exponent, read_fraction, HTML_SPACE_CHARACTERS};
+use str::{read_numbers, split_commas, split_html_space_chars};
+use values::specified::Length;
+use {Atom, LocalName, Namespace, Prefix};
 
 // Duplicated from script::dom::values.
 const UNSIGNED_LONG_MAX: u32 = 2147483647;
 
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(MallocSizeOf))]
 pub enum LengthOrPercentageOrAuto {
     Auto,
--- a/servo/components/style/author_styles.rs
+++ b/servo/components/style/author_styles.rs
@@ -1,25 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! A set of author stylesheets and their computed representation, such as the
 //! ones used for ShadowRoot and XBL.
 
-use crate::context::QuirksMode;
-use crate::dom::TElement;
+use context::QuirksMode;
+use dom::TElement;
 #[cfg(feature = "gecko")]
-use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
-use crate::invalidation::media_queries::ToMediaListKey;
-use crate::media_queries::Device;
-use crate::shared_lock::SharedRwLockReadGuard;
-use crate::stylesheet_set::AuthorStylesheetSet;
-use crate::stylesheets::StylesheetInDocument;
-use crate::stylist::CascadeData;
+use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
+use invalidation::media_queries::ToMediaListKey;
+use media_queries::Device;
+use shared_lock::SharedRwLockReadGuard;
+use stylesheet_set::AuthorStylesheetSet;
+use stylesheets::StylesheetInDocument;
+use stylist::CascadeData;
 
 /// A set of author stylesheets and their computed representation, such as the
 /// ones used for ShadowRoot and XBL.
 pub struct AuthorStyles<S>
 where
     S: StylesheetInDocument + PartialEq + 'static,
 {
     /// The sheet collection, which holds the sheet pointers, the invalidations,
@@ -71,15 +71,15 @@ where
         // Ignore OOM.
         let _ = self
             .data
             .rebuild(device, quirks_mode, flusher.sheets, guard);
     }
 }
 
 #[cfg(feature = "gecko")]
-unsafe impl HasFFI for AuthorStyles<crate::gecko::data::GeckoStyleSheet> {
-    type FFIType = crate::gecko_bindings::bindings::RawServoAuthorStyles;
+unsafe impl HasFFI for AuthorStyles<::gecko::data::GeckoStyleSheet> {
+    type FFIType = ::gecko_bindings::bindings::RawServoAuthorStyles;
 }
 #[cfg(feature = "gecko")]
-unsafe impl HasSimpleFFI for AuthorStyles<crate::gecko::data::GeckoStyleSheet> {}
+unsafe impl HasSimpleFFI for AuthorStyles<::gecko::data::GeckoStyleSheet> {}
 #[cfg(feature = "gecko")]
-unsafe impl HasBoxFFI for AuthorStyles<crate::gecko::data::GeckoStyleSheet> {}
+unsafe impl HasBoxFFI for AuthorStyles<::gecko::data::GeckoStyleSheet> {}
--- a/servo/components/style/bezier.rs
+++ b/servo/components/style/bezier.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Parametric Bézier curves.
 //!
 //! This is based on `WebCore/platform/graphics/UnitBezier.h` in WebKit.
 
 #![deny(missing_docs)]
 
-use crate::values::CSSFloat;
+use values::CSSFloat;
 
 const NEWTON_METHOD_ITERATIONS: u8 = 8;
 
 /// A unit cubic Bézier curve, used for timing functions in CSS transitions and animations.
 pub struct Bezier {
     ax: f64,
     bx: f64,
     cx: f64,
--- a/servo/components/style/bloom.rs
+++ b/servo/components/style/bloom.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! The style bloom filter is used as an optimization when matching deep
 //! descendant selectors.
 
 #![deny(missing_docs)]
 
 use atomic_refcell::{AtomicRefCell, AtomicRefMut};
-use crate::dom::{SendElement, TElement};
+use dom::{SendElement, TElement};
 use owning_ref::OwningHandle;
 use selectors::bloom::BloomFilter;
 use servo_arc::Arc;
 use smallvec::SmallVec;
 
 /// Bloom filters are large allocations, so we store them in thread-local storage
 /// such that they can be reused across style traversals. StyleBloom is responsible
 /// for ensuring that the bloom filter is zeroed when it is dropped.
--- a/servo/components/style/context.rs
+++ b/servo/components/style/context.rs
@@ -1,60 +1,60 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! The context within which style is calculated.
 
-use app_units::Au;
-#[cfg(feature = "servo")]
-use crate::animation::Animation;
-use crate::bloom::StyleBloom;
-use crate::data::{EagerPseudoStyles, ElementData};
 #[cfg(feature = "servo")]
-use crate::dom::OpaqueNode;
-use crate::dom::{SendElement, TElement};
-use crate::font_metrics::FontMetricsProvider;
-#[cfg(feature = "gecko")]
-use crate::gecko_bindings::structs;
-use crate::parallel::{STACK_SAFETY_MARGIN_KB, STYLE_THREAD_STACK_SIZE_KB};
-use crate::properties::ComputedValues;
+use animation::Animation;
+use app_units::Au;
+use bloom::StyleBloom;
+use data::{EagerPseudoStyles, ElementData};
 #[cfg(feature = "servo")]
-use crate::properties::PropertyId;
-use crate::rule_cache::RuleCache;
-use crate::rule_tree::StrongRuleNode;
-use crate::selector_parser::{SnapshotMap, EAGER_PSEUDO_COUNT};
-use crate::shared_lock::StylesheetGuards;
-use crate::sharing::StyleSharingCache;
-use crate::stylist::Stylist;
-use crate::thread_state::{self, ThreadState};
-use crate::timer::Timer;
-use crate::traversal::DomTraversal;
-use crate::traversal_flags::TraversalFlags;
+use dom::OpaqueNode;
+use dom::{SendElement, TElement};
 use euclid::Size2D;
 use euclid::TypedScale;
+use font_metrics::FontMetricsProvider;
 use fxhash::FxHashMap;
+#[cfg(feature = "gecko")]
+use gecko_bindings::structs;
+use parallel::{STACK_SAFETY_MARGIN_KB, STYLE_THREAD_STACK_SIZE_KB};
 #[cfg(feature = "servo")]
 use parking_lot::RwLock;
+use properties::ComputedValues;
+#[cfg(feature = "servo")]
+use properties::PropertyId;
+use rule_cache::RuleCache;
+use rule_tree::StrongRuleNode;
+use selector_parser::{SnapshotMap, EAGER_PSEUDO_COUNT};
 use selectors::matching::ElementSelectorFlags;
 use selectors::NthIndexCache;
 use servo_arc::Arc;
 #[cfg(feature = "servo")]
 use servo_atoms::Atom;
 #[cfg(feature = "servo")]
 use servo_channel::Sender;
+use shared_lock::StylesheetGuards;
+use sharing::StyleSharingCache;
 use std::fmt;
 use std::ops;
 #[cfg(feature = "servo")]
 use std::sync::Mutex;
 use style_traits::CSSPixel;
 use style_traits::DevicePixel;
 #[cfg(feature = "servo")]
 use style_traits::SpeculativePainter;
+use stylist::Stylist;
+use thread_state::{self, ThreadState};
 use time;
+use timer::Timer;
+use traversal::DomTraversal;
+use traversal_flags::TraversalFlags;
 use uluru::{Entry, LRUCache};
 
 pub use selectors::matching::QuirksMode;
 
 /// This structure is used to create a local style context from a shared one.
 #[cfg(feature = "servo")]
 pub struct ThreadLocalStyleContextCreationInfo {
     new_animations_sender: Sender<Animation>,
--- a/servo/components/style/counter_style/mod.rs
+++ b/servo/components/style/counter_style/mod.rs
@@ -1,32 +1,32 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! The [`@counter-style`][counter-style] at-rule.
 //!
 //! [counter-style]: https://drafts.csswg.org/css-counter-styles/
 
-use crate::error_reporting::ContextualParseError;
-use crate::parser::{Parse, ParserContext};
-use crate::shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
-use crate::str::CssStringWriter;
-use crate::values::specified::Integer;
-use crate::values::CustomIdent;
-use crate::Atom;
 use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser};
 use cssparser::{CowRcStr, Parser, SourceLocation, Token};
+use error_reporting::ContextualParseError;
+use parser::{Parse, ParserContext};
 use selectors::parser::SelectorParseErrorKind;
+use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
 use std::fmt::{self, Write};
 use std::mem;
 use std::num::Wrapping;
 use std::ops::Range;
+use str::CssStringWriter;
 use style_traits::{Comma, CssWriter, OneOrMoreSeparated, ParseError};
 use style_traits::{StyleParseErrorKind, ToCss};
+use values::specified::Integer;
+use values::CustomIdent;
+use Atom;
 
 /// Parse a counter style name reference.
 ///
 /// This allows the reserved counter style names "decimal" and "disc".
 pub fn parse_counter_style_name<'i, 't>(
     input: &mut Parser<'i, 't>,
 ) -> Result<CustomIdent, ParseError<'i>> {
     macro_rules! predefined {
--- a/servo/components/style/custom_properties.rs
+++ b/servo/components/style/custom_properties.rs
@@ -1,30 +1,30 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Support for [custom properties for cascading variables][custom].
 //!
 //! [custom]: https://drafts.csswg.org/css-variables/
 
-use crate::hash::map::Entry;
-use crate::properties::{CSSWideKeyword, CustomDeclarationValue};
-use crate::selector_map::{PrecomputedHashMap, PrecomputedHashSet};
-use crate::Atom;
 use cssparser::{Delimiter, Parser, ParserInput, SourcePosition, Token, TokenSerializationType};
+use hash::map::Entry;
 use precomputed_hash::PrecomputedHash;
+use properties::{CSSWideKeyword, CustomDeclarationValue};
+use selector_map::{PrecomputedHashMap, PrecomputedHashSet};
 use selectors::parser::SelectorParseErrorKind;
 use servo_arc::Arc;
 use smallvec::SmallVec;
 use std::borrow::{Borrow, Cow};
 use std::cmp;
 use std::fmt::{self, Write};
 use std::hash::Hash;
 use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
+use Atom;
 
 /// The environment from which to get `env` function values.
 ///
 /// TODO(emilio): If this becomes a bit more complex we should probably move it
 /// to the `media_queries` module, or something.
 #[derive(Debug, MallocSizeOf)]
 pub struct CssEnvironment;
 
--- a/servo/components/style/data.rs
+++ b/servo/components/style/data.rs
@@ -1,30 +1,30 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Per-node data used in style calculation.
 
-use crate::context::{SharedStyleContext, StackLimitChecker};
-use crate::dom::TElement;
-use crate::invalidation::element::invalidator::InvalidationResult;
-use crate::invalidation::element::restyle_hints::RestyleHint;
-use crate::properties::ComputedValues;
-use crate::rule_tree::StrongRuleNode;
-use crate::selector_parser::{PseudoElement, RestyleDamage, EAGER_PSEUDO_COUNT};
-use crate::shared_lock::StylesheetGuards;
-use crate::style_resolver::{PrimaryStyle, ResolvedElementStyles, ResolvedStyle};
+use context::{SharedStyleContext, StackLimitChecker};
+use dom::TElement;
+use invalidation::element::invalidator::InvalidationResult;
+use invalidation::element::restyle_hints::RestyleHint;
 #[cfg(feature = "gecko")]
 use malloc_size_of::MallocSizeOfOps;
+use properties::ComputedValues;
+use rule_tree::StrongRuleNode;
+use selector_parser::{PseudoElement, RestyleDamage, EAGER_PSEUDO_COUNT};
 use selectors::NthIndexCache;
 use servo_arc::Arc;
+use shared_lock::StylesheetGuards;
 use std::fmt;
 use std::mem;
 use std::ops::{Deref, DerefMut};
+use style_resolver::{PrimaryStyle, ResolvedElementStyles, ResolvedStyle};
 
 bitflags! {
     /// Various flags stored on ElementData.
     #[derive(Default)]
     pub struct ElementDataFlags: u8 {
         /// Whether the styles changed for this restyle.
         const WAS_RESTYLED = 1 << 0;
         /// Whether the last traversal of this element did not do
@@ -250,18 +250,18 @@ impl ElementData {
         stack_limit_checker: Option<&StackLimitChecker>,
         nth_index_cache: &mut NthIndexCache,
     ) -> InvalidationResult {
         // In animation-only restyle we shouldn't touch snapshot at all.
         if shared_context.traversal_flags.for_animation_only() {
             return InvalidationResult::empty();
         }
 
-        use crate::invalidation::element::invalidator::TreeStyleInvalidator;
-        use crate::invalidation::element::state_and_attributes::StateAndAttrInvalidationProcessor;
+        use invalidation::element::invalidator::TreeStyleInvalidator;
+        use invalidation::element::state_and_attributes::StateAndAttrInvalidationProcessor;
 
         debug!(
             "invalidate_style_if_needed: {:?}, flags: {:?}, has_snapshot: {}, \
              handled_snapshot: {}, pseudo: {:?}",
             element,
             shared_context.traversal_flags,
             element.has_snapshot(),
             element.handled_snapshot(),
--- a/servo/components/style/dom.rs
+++ b/servo/components/style/dom.rs
@@ -2,40 +2,40 @@
  * 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/. */
 
 //! Types and traits used to access the DOM from style calculation.
 
 #![allow(unsafe_code)]
 #![deny(missing_docs)]
 
+use applicable_declarations::ApplicableDeclarationBlock;
 use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
-use crate::applicable_declarations::ApplicableDeclarationBlock;
 #[cfg(feature = "gecko")]
-use crate::context::PostAnimationTasks;
+use context::PostAnimationTasks;
 #[cfg(feature = "gecko")]
-use crate::context::UpdateAnimationsTasks;
-use crate::data::ElementData;
-use crate::element_state::ElementState;
-use crate::font_metrics::FontMetricsProvider;
-use crate::media_queries::Device;
-use crate::properties::{AnimationRules, ComputedValues, PropertyDeclarationBlock};
-use crate::selector_parser::{AttrValue, Lang, PseudoElement, SelectorImpl};
-use crate::shared_lock::Locked;
-use crate::stylist::CascadeData;
-use crate::traversal_flags::TraversalFlags;
-use crate::{Atom, LocalName, Namespace, WeakAtom};
+use context::UpdateAnimationsTasks;
+use data::ElementData;
+use element_state::ElementState;
+use font_metrics::FontMetricsProvider;
+use media_queries::Device;
+use properties::{AnimationRules, ComputedValues, PropertyDeclarationBlock};
+use selector_parser::{AttrValue, Lang, PseudoElement, SelectorImpl};
 use selectors::matching::{ElementSelectorFlags, QuirksMode, VisitedHandlingMode};
 use selectors::sink::Push;
 use selectors::Element as SelectorsElement;
 use servo_arc::{Arc, ArcBorrow};
+use shared_lock::Locked;
 use std::fmt;
 use std::fmt::Debug;
 use std::hash::Hash;
 use std::ops::Deref;
+use stylist::CascadeData;
+use traversal_flags::TraversalFlags;
+use {Atom, LocalName, Namespace, WeakAtom};
 
 /// An opaque handle to a node, which, unlike UnsafeNode, cannot be transformed
 /// back into a non-opaque representation. The only safe operation that can be
 /// performed on this node is to compare it to another opaque handle or to another
 /// OpaqueNode.
 ///
 /// Layout and Graphics use this to safely represent nodes for comparison purposes.
 /// Because the script task's GC does not trace layout, node data cannot be safely stored in layout
--- a/servo/components/style/dom_apis.rs
+++ b/servo/components/style/dom_apis.rs
@@ -1,26 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Generic implementations of some DOM APIs so they can be shared between Servo
 //! and Gecko.
 
-use crate::context::QuirksMode;
-use crate::dom::{TDocument, TElement, TNode, TShadowRoot};
-use crate::invalidation::element::invalidator::{DescendantInvalidationLists, Invalidation};
-use crate::invalidation::element::invalidator::{InvalidationProcessor, InvalidationVector};
-use crate::Atom;
+use context::QuirksMode;
+use dom::{TDocument, TElement, TNode, TShadowRoot};
+use invalidation::element::invalidator::{DescendantInvalidationLists, Invalidation};
+use invalidation::element::invalidator::{InvalidationProcessor, InvalidationVector};
 use selectors::attr::CaseSensitivity;
 use selectors::matching::{self, MatchingContext, MatchingMode};
 use selectors::parser::{Combinator, Component, LocalName, SelectorImpl};
 use selectors::{Element, NthIndexCache, SelectorList};
 use smallvec::SmallVec;
 use std::borrow::Borrow;
+use Atom;
 
 /// <https://dom.spec.whatwg.org/#dom-element-matches>
 pub fn element_matches<E>(
     element: &E,
     selector_list: &SelectorList<E::Impl>,
     quirks_mode: QuirksMode,
 ) -> bool
 where
@@ -589,17 +589,17 @@ pub fn query_selector<E, Q>(
     root: E::ConcreteNode,
     selector_list: &SelectorList<E::Impl>,
     results: &mut Q::Output,
     may_use_invalidation: MayUseInvalidation,
 ) where
     E: TElement,
     Q: SelectorQuery<E>,
 {
-    use crate::invalidation::element::invalidator::TreeStyleInvalidator;
+    use invalidation::element::invalidator::TreeStyleInvalidator;
 
     let quirks_mode = root.owner_doc().quirks_mode();
 
     let mut nth_index_cache = NthIndexCache::default();
     let mut matching_context = MatchingContext::new(
         MatchingMode::Normal,
         None,
         Some(&mut nth_index_cache),
--- a/servo/components/style/driver.rs
+++ b/servo/components/style/driver.rs
@@ -2,50 +2,50 @@
  * 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/. */
 
 //! Implements traversal over the DOM tree. The traversal starts in sequential
 //! mode, and optionally parallelizes as it discovers work.
 
 #![deny(missing_docs)]
 
-use crate::context::{PerThreadTraversalStatistics, StyleContext};
-use crate::context::{ThreadLocalStyleContext, TraversalStatistics};
-use crate::dom::{SendNode, TElement, TNode};
-use crate::parallel;
-use crate::parallel::{DispatchMode, WORK_UNIT_MAX};
-use crate::scoped_tls::ScopedTLS;
-use crate::traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken};
+use context::{PerThreadTraversalStatistics, StyleContext};
+use context::{ThreadLocalStyleContext, TraversalStatistics};
+use dom::{SendNode, TElement, TNode};
+use parallel;
+use parallel::{DispatchMode, WORK_UNIT_MAX};
 use rayon;
+use scoped_tls::ScopedTLS;
 use std::collections::VecDeque;
 use std::mem;
 use time;
+use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken};
 
 #[cfg(feature = "servo")]
 fn should_report_statistics() -> bool {
     false
 }
 
 #[cfg(feature = "gecko")]
 fn should_report_statistics() -> bool {
-    unsafe { crate::gecko_bindings::structs::ServoTraversalStatistics_sActive }
+    unsafe { ::gecko_bindings::structs::ServoTraversalStatistics_sActive }
 }
 
 #[cfg(feature = "servo")]
 fn report_statistics(_stats: &PerThreadTraversalStatistics) {
     unreachable!("Servo never report stats");
 }
 
 #[cfg(feature = "gecko")]
 fn report_statistics(stats: &PerThreadTraversalStatistics) {
     // This should only be called in the main thread, or it may be racy
     // to update the statistics in a global variable.
-    debug_assert!(unsafe { crate::gecko_bindings::bindings::Gecko_IsMainThread() });
+    debug_assert!(unsafe { ::gecko_bindings::bindings::Gecko_IsMainThread() });
     let gecko_stats =
-        unsafe { &mut crate::gecko_bindings::structs::ServoTraversalStatistics_sSingleton };
+        unsafe { &mut ::gecko_bindings::structs::ServoTraversalStatistics_sSingleton };
     gecko_stats.mElementsTraversed += stats.elements_traversed;
     gecko_stats.mElementsStyled += stats.elements_styled;
     gecko_stats.mElementsMatched += stats.elements_matched;
     gecko_stats.mStylesShared += stats.styles_shared;
     gecko_stats.mStylesReused += stats.styles_reused;
 }
 
 /// Do a DOM traversal for top-down and (optionally) bottom-up processing,
--- a/servo/components/style/encoding_support.rs
+++ b/servo/components/style/encoding_support.rs
@@ -1,25 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Parsing stylesheets from bytes (not `&str`).
 
 extern crate encoding_rs;
 
-use crate::context::QuirksMode;
-use crate::error_reporting::ParseErrorReporter;
-use crate::media_queries::MediaList;
-use crate::shared_lock::SharedRwLock;
-use crate::stylesheets::{Origin, Stylesheet, StylesheetLoader, UrlExtraData};
+use context::QuirksMode;
 use cssparser::{stylesheet_encoding, EncodingSupport};
+use error_reporting::ParseErrorReporter;
+use media_queries::MediaList;
 use servo_arc::Arc;
+use shared_lock::SharedRwLock;
 use std::borrow::Cow;
 use std::str;
+use stylesheets::{Origin, Stylesheet, StylesheetLoader, UrlExtraData};
 
 struct EncodingRs;
 
 impl EncodingSupport for EncodingRs {
     type Encoding = &'static encoding_rs::Encoding;
 
     fn utf8() -> Self::Encoding {
         encoding_rs::UTF_8
--- a/servo/components/style/error_reporting.rs
+++ b/servo/components/style/error_reporting.rs
@@ -1,20 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Types used to report parsing errors.
 
 #![deny(missing_docs)]
 
-use crate::stylesheets::UrlExtraData;
 use cssparser::{BasicParseErrorKind, ParseErrorKind, SourceLocation, Token};
 use std::fmt;
 use style_traits::ParseError;
+use stylesheets::UrlExtraData;
 
 /// Errors that can be encountered while parsing CSS.
 #[derive(Debug)]
 pub enum ContextualParseError<'a> {
     /// A property declaration was not recognized.
     UnsupportedPropertyDeclaration(&'a str, ParseError<'a>),
     /// A font face descriptor was not recognized.
     UnsupportedFontFaceDescriptor(&'a str, ParseError<'a>),
--- a/servo/components/style/font_face.rs
+++ b/servo/components/style/font_face.rs
@@ -1,41 +1,39 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! The [`@font-face`][ff] at-rule.
 //!
 //! [ff]: https://drafts.csswg.org/css-fonts/#at-font-face-rule
 
-use crate::error_reporting::ContextualParseError;
-use crate::parser::{Parse, ParserContext};
-#[cfg(feature = "gecko")]
-use crate::properties::longhands::font_language_override;
-use crate::shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
-use crate::str::CssStringWriter;
-use crate::values::computed::font::FamilyName;
-use crate::values::generics::font::FontStyle as GenericFontStyle;
-#[cfg(feature = "gecko")]
-use crate::values::specified::font::SpecifiedFontFeatureSettings;
-use crate::values::specified::font::SpecifiedFontStyle;
-#[cfg(feature = "gecko")]
-use crate::values::specified::font::SpecifiedFontVariationSettings;
-use crate::values::specified::font::{AbsoluteFontWeight, FontStretch};
-use crate::values::specified::url::SpecifiedUrl;
-use crate::values::specified::Angle;
 #[cfg(feature = "gecko")]
 use cssparser::UnicodeRange;
 use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser};
 use cssparser::{CowRcStr, SourceLocation};
+use error_reporting::ContextualParseError;
+use parser::{Parse, ParserContext};
+#[cfg(feature = "gecko")]
+use properties::longhands::font_language_override;
 use selectors::parser::SelectorParseErrorKind;
+use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
 use std::fmt::{self, Write};
+use str::CssStringWriter;
 use style_traits::values::SequenceWriter;
 use style_traits::{Comma, CssWriter, OneOrMoreSeparated, ParseError};
 use style_traits::{StyleParseErrorKind, ToCss};
+use values::computed::font::FamilyName;
+use values::generics::font::FontStyle as GenericFontStyle;
+use values::specified::font::SpecifiedFontStyle;
+use values::specified::font::{AbsoluteFontWeight, FontStretch};
+#[cfg(feature = "gecko")]
+use values::specified::font::{SpecifiedFontFeatureSettings, SpecifiedFontVariationSettings};
+use values::specified::url::SpecifiedUrl;
+use values::specified::Angle;
 
 /// A source for a font-face rule.
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 #[derive(Clone, Debug, Eq, PartialEq, ToCss)]
 pub enum Source {
     /// A `url()` source.
     Url(UrlSource),
     /// A `local()` source.
@@ -50,18 +48,18 @@ impl OneOrMoreSeparated for Source {
 /// A POD representation for Gecko. All pointers here are non-owned and as such
 /// can't outlive the rule they came from, but we can't enforce that via C++.
 ///
 /// All the strings are of course utf8.
 #[cfg(feature = "gecko")]
 #[repr(u8)]
 #[allow(missing_docs)]
 pub enum FontFaceSourceListComponent {
-    Url(*const crate::gecko_bindings::structs::mozilla::css::URLValue),
-    Local(*mut crate::gecko_bindings::structs::nsAtom),
+    Url(*const ::gecko_bindings::structs::mozilla::css::URLValue),
+    Local(*mut ::gecko_bindings::structs::nsAtom),
     FormatHint {
         length: usize,
         utf8_bytes: *const u8,
     },
 }
 
 /// A `UrlSource` represents a font-face source that has been specified with a
 /// `url()` function.
@@ -407,23 +405,23 @@ impl Parse for Source {
             format_hints: format_hints,
         }))
     }
 }
 
 macro_rules! is_descriptor_enabled {
     ("font-display") => {
         unsafe {
-            use crate::gecko_bindings::structs::mozilla;
+            use gecko_bindings::structs::mozilla;
             mozilla::StaticPrefs_sVarCache_layout_css_font_display_enabled
         }
     };
     ("font-variation-settings") => {
         unsafe {
-            use crate::gecko_bindings::structs::mozilla;
+            use gecko_bindings::structs::mozilla;
             mozilla::StaticPrefs_sVarCache_layout_css_font_variations_enabled != 0
         }
     };
     ($name:tt) => {
         true
     };
 }
 
--- a/servo/components/style/font_metrics.rs
+++ b/servo/components/style/font_metrics.rs
@@ -2,21 +2,21 @@
  * 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/. */
 
 //! Access to font metrics from the style system.
 
 #![deny(missing_docs)]
 
 use app_units::Au;
-use crate::context::SharedStyleContext;
-use crate::logical_geometry::WritingMode;
-use crate::media_queries::Device;
-use crate::properties::style_structs::Font;
-use crate::Atom;
+use context::SharedStyleContext;
+use logical_geometry::WritingMode;
+use media_queries::Device;
+use properties::style_structs::Font;
+use Atom;
 
 /// Represents the font metrics that style needs from a font to compute the
 /// value of certain CSS units like `ex`.
 #[derive(Clone, Debug, PartialEq)]
 pub struct FontMetrics {
     /// The x-height of the font.
     pub x_height: Au,
     /// The zero advance. This is usually writing mode dependent
@@ -81,17 +81,17 @@ impl FontMetricsProvider for ServoMetric
 }
 
 // Servo's font metrics provider will probably not live in this crate, so this will
 // have to be replaced with something else (perhaps a trait method on TElement)
 // when we get there
 
 #[cfg(feature = "gecko")]
 /// Construct a font metrics provider for the current product
-pub fn get_metrics_provider_for_product() -> crate::gecko::wrapper::GeckoFontMetricsProvider {
-    crate::gecko::wrapper::GeckoFontMetricsProvider::new()
+pub fn get_metrics_provider_for_product() -> ::gecko::wrapper::GeckoFontMetricsProvider {
+    ::gecko::wrapper::GeckoFontMetricsProvider::new()
 }
 
 #[cfg(feature = "servo")]
 /// Construct a font metrics provider for the current product
 pub fn get_metrics_provider_for_product() -> ServoMetricsProvider {
     ServoMetricsProvider
 }
--- a/servo/components/style/gecko/arc_types.rs
+++ b/servo/components/style/gecko/arc_types.rs
@@ -3,51 +3,50 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! This file lists all arc FFI types and defines corresponding addref
 //! and release functions. This list corresponds to ServoArcTypeList.h
 //! file in Gecko.
 
 #![allow(non_snake_case, missing_docs)]
 
-use crate::gecko::url::CssUrlData;
-use crate::gecko_bindings::bindings::RawServoCounterStyleRule;
-use crate::gecko_bindings::bindings::RawServoFontFeatureValuesRule;
-use crate::gecko_bindings::bindings::RawServoImportRule;
-use crate::gecko_bindings::bindings::RawServoKeyframe;
-use crate::gecko_bindings::bindings::RawServoKeyframesRule;
-use crate::gecko_bindings::bindings::RawServoMediaRule;
-use crate::gecko_bindings::bindings::RawServoMozDocumentRule;
-use crate::gecko_bindings::bindings::RawServoNamespaceRule;
-use crate::gecko_bindings::bindings::RawServoPageRule;
-use crate::gecko_bindings::bindings::RawServoRuleNode;
-use crate::gecko_bindings::bindings::RawServoRuleNodeStrong;
-use crate::gecko_bindings::bindings::RawServoSupportsRule;
-use crate::gecko_bindings::bindings::ServoCssRules;
-use crate::gecko_bindings::structs::RawServoAnimationValue;
-use crate::gecko_bindings::structs::RawServoCssUrlData;
-use crate::gecko_bindings::structs::RawServoDeclarationBlock;
-use crate::gecko_bindings::structs::RawServoFontFaceRule;
-use crate::gecko_bindings::structs::RawServoMediaList;
-use crate::gecko_bindings::structs::RawServoQuotes;
-use crate::gecko_bindings::structs::RawServoStyleRule;
-use crate::gecko_bindings::structs::RawServoStyleSheetContents;
-use crate::gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI, Strong};
-use crate::media_queries::MediaList;
-use crate::properties::animated_properties::AnimationValue;
-use crate::properties::{ComputedValues, PropertyDeclarationBlock};
-use crate::rule_tree::StrongRuleNode;
-use crate::shared_lock::Locked;
-use crate::stylesheets::keyframes_rule::Keyframe;
-use crate::stylesheets::{CounterStyleRule, CssRules, FontFaceRule, FontFeatureValuesRule};
-use crate::stylesheets::{DocumentRule, ImportRule, KeyframesRule, MediaRule};
-use crate::stylesheets::{NamespaceRule, PageRule};
-use crate::stylesheets::{StyleRule, StylesheetContents, SupportsRule};
+use gecko::url::CssUrlData;
+use gecko_bindings::bindings::RawServoCounterStyleRule;
+use gecko_bindings::bindings::RawServoFontFeatureValuesRule;
+use gecko_bindings::bindings::RawServoImportRule;
+use gecko_bindings::bindings::RawServoKeyframe;
+use gecko_bindings::bindings::RawServoKeyframesRule;
+use gecko_bindings::bindings::RawServoMediaRule;
+use gecko_bindings::bindings::RawServoMozDocumentRule;
+use gecko_bindings::bindings::RawServoNamespaceRule;
+use gecko_bindings::bindings::RawServoPageRule;
+use gecko_bindings::bindings::RawServoRuleNode;
+use gecko_bindings::bindings::RawServoRuleNodeStrong;
+use gecko_bindings::bindings::RawServoSupportsRule;
+use gecko_bindings::bindings::ServoCssRules;
+use gecko_bindings::structs::RawServoAnimationValue;
+use gecko_bindings::structs::RawServoCssUrlData;
+use gecko_bindings::structs::RawServoDeclarationBlock;
+use gecko_bindings::structs::RawServoFontFaceRule;
+use gecko_bindings::structs::RawServoMediaList;
+use gecko_bindings::structs::RawServoQuotes;
+use gecko_bindings::structs::RawServoStyleRule;
+use gecko_bindings::structs::RawServoStyleSheetContents;
+use gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI, Strong};
+use media_queries::MediaList;
+use properties::animated_properties::AnimationValue;
+use properties::{ComputedValues, PropertyDeclarationBlock};
+use rule_tree::StrongRuleNode;
 use servo_arc::{Arc, ArcBorrow};
+use shared_lock::Locked;
 use std::{mem, ptr};
+use stylesheets::keyframes_rule::Keyframe;
+use stylesheets::{CounterStyleRule, CssRules, FontFaceRule, FontFeatureValuesRule};
+use stylesheets::{DocumentRule, ImportRule, KeyframesRule, MediaRule, NamespaceRule, PageRule};
+use stylesheets::{StyleRule, StylesheetContents, SupportsRule};
 use values::computed::QuotePair;
 
 macro_rules! impl_arc_ffi {
     ($servo_type:ty => $gecko_type:ty[$addref:ident, $release:ident]) => {
         unsafe impl HasFFI for $servo_type {
             type FFIType = $gecko_type;
         }
         unsafe impl HasArcFFI for $servo_type {}
--- a/servo/components/style/gecko/conversions.rs
+++ b/servo/components/style/gecko/conversions.rs
@@ -4,33 +4,34 @@
 
 //! This module contains conversion helpers between Servo and Gecko types
 //! Ideally, it would be in geckolib itself, but coherence
 //! forces us to keep the traits and implementations here
 
 #![allow(unsafe_code)]
 
 use app_units::Au;
-use crate::gecko::values::GeckoStyleCoordConvertible;
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs::{self, nsStyleCoord_CalcValue};
-use crate::gecko_bindings::structs::{nsStyleImage, nsresult, SheetType};
-use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
-use crate::stylesheets::{Origin, RulesMutateError};
-use crate::values::computed::image::LineDirection;
-use crate::values::computed::url::ComputedImageUrl;
-use crate::values::computed::{Angle, CalcLengthOrPercentage, Gradient, Image};
-use crate::values::computed::{Integer, LengthOrPercentage};
-use crate::values::computed::{LengthOrPercentageOrAuto, NonNegativeLengthOrPercentageOrAuto};
-use crate::values::computed::{Percentage, TextAlign};
-use crate::values::generics::box_::VerticalAlign;
-use crate::values::generics::grid::{TrackListValue, TrackSize};
-use crate::values::generics::image::{CompatMode, GradientItem, Image as GenericImage};
-use crate::values::generics::rect::Rect;
+use gecko::values::GeckoStyleCoordConvertible;
+use gecko_bindings::bindings;
+use gecko_bindings::structs::{self, nsStyleCoord_CalcValue};
+use gecko_bindings::structs::{nsStyleImage, nsresult, SheetType};
+use gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
 use std::f32::consts::PI;
+use stylesheets::{Origin, RulesMutateError};
+use values::computed::image::LineDirection;
+use values::computed::url::ComputedImageUrl;
+use values::computed::{Angle, CalcLengthOrPercentage, Gradient, Image};
+use values::computed::{
+    Integer, LengthOrPercentage, LengthOrPercentageOrAuto, NonNegativeLengthOrPercentageOrAuto,
+};
+use values::computed::{Percentage, TextAlign};
+use values::generics::box_::VerticalAlign;
+use values::generics::grid::{TrackListValue, TrackSize};
+use values::generics::image::{CompatMode, GradientItem, Image as GenericImage};
+use values::generics::rect::Rect;
 
 impl From<CalcLengthOrPercentage> for nsStyleCoord_CalcValue {
     fn from(other: CalcLengthOrPercentage) -> nsStyleCoord_CalcValue {
         let has_percentage = other.percentage.is_some();
         nsStyleCoord_CalcValue {
             mLength: other.unclamped_length().to_i32_au(),
             mPercent: other.percentage.map_or(0., |p| p.0),
             mHasPercent: has_percentage,
@@ -106,18 +107,18 @@ impl From<nsStyleCoord_CalcValue> for Le
         }
     }
 }
 
 // FIXME(emilio): A lot of these impl From should probably become explicit or
 // disappear as we move more stuff to cbindgen.
 impl From<nsStyleCoord_CalcValue> for NonNegativeLengthOrPercentageOrAuto {
     fn from(other: nsStyleCoord_CalcValue) -> Self {
-        use crate::values::generics::NonNegative;
         use style_traits::values::specified::AllowedNumericType;
+        use values::generics::NonNegative;
         NonNegative(if other.mLength < 0 || other.mPercent < 0. {
             LengthOrPercentageOrAuto::Calc(CalcLengthOrPercentage::with_clamping_mode(
                 Au(other.mLength).into(),
                 if other.mHasPercent {
                     Some(Percentage(other.mPercent))
                 } else {
                     None
                 },
@@ -131,18 +132,18 @@ impl From<nsStyleCoord_CalcValue> for No
 
 impl From<Angle> for CoordDataValue {
     fn from(reference: Angle) -> Self {
         CoordDataValue::Degree(reference.degrees())
     }
 }
 
 fn line_direction(horizontal: LengthOrPercentage, vertical: LengthOrPercentage) -> LineDirection {
-    use crate::values::computed::position::Position;
-    use crate::values::specified::position::{X, Y};
+    use values::computed::position::Position;
+    use values::specified::position::{X, Y};
 
     let horizontal_percentage = match horizontal {
         LengthOrPercentage::Percentage(percentage) => Some(percentage.0),
         _ => None,
     };
 
     let vertical_percentage = match vertical {
         LengthOrPercentage::Percentage(percentage) => Some(percentage.0),
@@ -234,20 +235,18 @@ impl nsStyleImage {
 
     // FIXME(emilio): This is really complex, we should use cbindgen for this.
     fn set_gradient(&mut self, gradient: Gradient) {
         use self::structs::nsStyleCoord;
         use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER as CLOSEST_CORNER;
         use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE;
         use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER;
         use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE;
-        use crate::values::generics::image::{
-            Circle, Ellipse, EndingShape, GradientKind, ShapeExtent,
-        };
-        use crate::values::specified::position::{X, Y};
+        use values::generics::image::{Circle, Ellipse, EndingShape, GradientKind, ShapeExtent};
+        use values::specified::position::{X, Y};
 
         let stop_count = gradient.items.len();
         if stop_count >= ::std::u32::MAX as usize {
             warn!("stylo: Prevented overflow due to too many gradient stops");
             return;
         }
 
         let gecko_gradient = match gradient.kind {
@@ -433,18 +432,18 @@ impl nsStyleImage {
 
         unsafe {
             bindings::Gecko_SetGradientImageValue(self, gecko_gradient);
         }
     }
 
     /// Converts into Image.
     pub unsafe fn into_image(self: &nsStyleImage) -> Option<Image> {
-        use crate::gecko_bindings::structs::nsStyleImageType;
-        use crate::values::computed::{MozImageRect, NumberOrPercentage};
+        use gecko_bindings::structs::nsStyleImageType;
+        use values::computed::{MozImageRect, NumberOrPercentage};
 
         match self.mType {
             nsStyleImageType::eStyleImageType_Null => None,
             nsStyleImageType::eStyleImageType_Image => {
                 let url = self.get_image_url();
                 if self.mCropRect.mPtr.is_null() {
                     Some(GenericImage::Url(url))
                 } else {
@@ -473,17 +472,17 @@ impl nsStyleImage {
                         },
                     }
                 }
             },
             nsStyleImageType::eStyleImageType_Gradient => {
                 Some(GenericImage::Gradient(self.get_gradient()))
             },
             nsStyleImageType::eStyleImageType_Element => {
-                use crate::gecko_string_cache::Atom;
+                use gecko_string_cache::Atom;
                 let atom = bindings::Gecko_GetImageElement(self);
                 Some(GenericImage::Element(Atom::from_raw(atom)))
             },
             _ => panic!("Unexpected image type"),
         }
     }
 
     unsafe fn get_image_url(&self) -> ComputedImageUrl {
@@ -493,21 +492,21 @@ impl nsStyleImage {
         ComputedImageUrl::from_image_request(image_request)
     }
 
     unsafe fn get_gradient(self: &nsStyleImage) -> Box<Gradient> {
         use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER as CLOSEST_CORNER;
         use self::structs::NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE as CLOSEST_SIDE;
         use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER as FARTHEST_CORNER;
         use self::structs::NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE as FARTHEST_SIDE;
-        use crate::values::computed::image::LineDirection;
-        use crate::values::computed::position::Position;
-        use crate::values::computed::Length;
-        use crate::values::generics::image::{Circle, ColorStop, CompatMode, Ellipse};
-        use crate::values::generics::image::{EndingShape, GradientKind, ShapeExtent};
+        use values::computed::image::LineDirection;
+        use values::computed::position::Position;
+        use values::computed::Length;
+        use values::generics::image::{Circle, ColorStop, CompatMode, Ellipse};
+        use values::generics::image::{EndingShape, GradientKind, ShapeExtent};
 
         let gecko_gradient = bindings::Gecko_GetGradientImageValue(self)
             .as_ref()
             .unwrap();
         let angle = Angle::from_gecko_style_coord(&gecko_gradient.mAngle);
         let horizontal_style = LengthOrPercentage::from_gecko_style_coord(&gecko_gradient.mBgPosX);
         let vertical_style = LengthOrPercentage::from_gecko_style_coord(&gecko_gradient.mBgPosY);
 
@@ -648,42 +647,36 @@ impl nsStyleImage {
             compat_mode,
         })
     }
 }
 
 pub mod basic_shape {
     //! Conversions from and to CSS shape representations.
 
-    use crate::gecko::values::GeckoStyleCoordConvertible;
-    use crate::gecko_bindings::structs;
-    use crate::gecko_bindings::structs::{nsStyleCoord, nsStyleCorners};
-    use crate::gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType};
-    use crate::gecko_bindings::structs::{
-        StyleGeometryBox, StyleShapeSource, StyleShapeSourceType,
-    };
-    use crate::gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
-    use crate::gecko_bindings::sugar::refptr::RefPtr;
-    use crate::values::computed::basic_shape::{
-        BasicShape, ClippingShape, FloatAreaShape, ShapeRadius,
-    };
-    use crate::values::computed::border::{BorderCornerRadius, BorderRadius};
-    use crate::values::computed::length::LengthOrPercentage;
-    use crate::values::computed::motion::OffsetPath;
-    use crate::values::computed::position;
-    use crate::values::computed::url::ComputedUrl;
-    use crate::values::generics::basic_shape::{
-        BasicShape as GenericBasicShape, InsetRect, Polygon,
-    };
-    use crate::values::generics::basic_shape::{Circle, Ellipse, Path, PolygonCoord};
-    use crate::values::generics::basic_shape::{GeometryBox, ShapeBox, ShapeSource};
-    use crate::values::generics::border::BorderRadius as GenericBorderRadius;
-    use crate::values::generics::rect::Rect;
-    use crate::values::specified::SVGPathData;
+    use gecko::values::GeckoStyleCoordConvertible;
+    use gecko_bindings::structs;
+    use gecko_bindings::structs::{nsStyleCoord, nsStyleCorners};
+    use gecko_bindings::structs::{StyleBasicShape, StyleBasicShapeType};
+    use gecko_bindings::structs::{StyleGeometryBox, StyleShapeSource, StyleShapeSourceType};
+    use gecko_bindings::sugar::ns_style_coord::{CoordDataMut, CoordDataValue};
+    use gecko_bindings::sugar::refptr::RefPtr;
     use std::borrow::Borrow;
+    use values::computed::basic_shape::{BasicShape, ClippingShape, FloatAreaShape, ShapeRadius};
+    use values::computed::border::{BorderCornerRadius, BorderRadius};
+    use values::computed::length::LengthOrPercentage;
+    use values::computed::motion::OffsetPath;
+    use values::computed::position;
+    use values::computed::url::ComputedUrl;
+    use values::generics::basic_shape::{BasicShape as GenericBasicShape, InsetRect, Polygon};
+    use values::generics::basic_shape::{Circle, Ellipse, Path, PolygonCoord};
+    use values::generics::basic_shape::{GeometryBox, ShapeBox, ShapeSource};
+    use values::generics::border::BorderRadius as GenericBorderRadius;
+    use values::generics::rect::Rect;
+    use values::specified::SVGPathData;
 
     impl StyleShapeSource {
         /// Convert StyleShapeSource to ShapeSource except URL and Image
         /// types.
         fn into_shape_source<ReferenceBox, ImageOrUrl>(
             &self,
         ) -> Option<ShapeSource<BasicShape, ReferenceBox, ImageOrUrl>>
         where
@@ -708,17 +701,17 @@ pub mod basic_shape {
                     let fill = unsafe { &*self.__bindgen_anon_1.mSVGPath.as_ref().mPtr }.mFillRule;
                     Some(ShapeSource::Path(Path { fill, path }))
                 },
             }
         }
 
         /// Generate a SVGPathData from StyleShapeSource if possible.
         fn to_svg_path(&self) -> Option<SVGPathData> {
-            use crate::values::specified::svg_path::PathCommand;
+            use values::specified::svg_path::PathCommand;
             match self.mType {
                 StyleShapeSourceType::Path => {
                     let gecko_path = unsafe { &*self.__bindgen_anon_1.mSVGPath.as_ref().mPtr };
                     let result: Vec<PathCommand> = gecko_path.mPath.iter().cloned().collect();
                     Some(SVGPathData::new(result.into_boxed_slice()))
                 },
                 _ => None,
             }
@@ -910,60 +903,60 @@ pub mod basic_shape {
                 horizontal: other.mXPosition.into(),
                 vertical: other.mYPosition.into(),
             }
         }
     }
 
     impl From<ShapeBox> for StyleGeometryBox {
         fn from(reference: ShapeBox) -> Self {
-            use crate::gecko_bindings::structs::StyleGeometryBox::*;
+            use gecko_bindings::structs::StyleGeometryBox::*;
             match reference {
                 ShapeBox::ContentBox => ContentBox,
                 ShapeBox::PaddingBox => PaddingBox,
                 ShapeBox::BorderBox => BorderBox,
                 ShapeBox::MarginBox => MarginBox,
             }
         }
     }
 
     impl From<GeometryBox> for StyleGeometryBox {
         fn from(reference: GeometryBox) -> Self {
-            use crate::gecko_bindings::structs::StyleGeometryBox::*;
+            use gecko_bindings::structs::StyleGeometryBox::*;
             match reference {
                 GeometryBox::ShapeBox(shape_box) => From::from(shape_box),
                 GeometryBox::FillBox => FillBox,
                 GeometryBox::StrokeBox => StrokeBox,
                 GeometryBox::ViewBox => ViewBox,
             }
         }
     }
 
     // Will panic on NoBox
     // Ideally these would be implemented on Option<T>,
     // but coherence doesn't like that and TryFrom isn't stable
     impl From<StyleGeometryBox> for GeometryBox {
         fn from(reference: StyleGeometryBox) -> Self {
-            use crate::gecko_bindings::structs::StyleGeometryBox::*;
+            use gecko_bindings::structs::StyleGeometryBox::*;
             match reference {
                 ContentBox => GeometryBox::ShapeBox(ShapeBox::ContentBox),
                 PaddingBox => GeometryBox::ShapeBox(ShapeBox::PaddingBox),
                 BorderBox => GeometryBox::ShapeBox(ShapeBox::BorderBox),
                 MarginBox => GeometryBox::ShapeBox(ShapeBox::MarginBox),
                 FillBox => GeometryBox::FillBox,
                 StrokeBox => GeometryBox::StrokeBox,
                 ViewBox => GeometryBox::ViewBox,
                 _ => panic!("Unexpected StyleGeometryBox while converting to GeometryBox"),
             }
         }
     }
 
     impl From<StyleGeometryBox> for ShapeBox {
         fn from(reference: StyleGeometryBox) -> Self {
-            use crate::gecko_bindings::structs::StyleGeometryBox::*;
+            use gecko_bindings::structs::StyleGeometryBox::*;
             match reference {
                 ContentBox => ShapeBox::ContentBox,
                 PaddingBox => ShapeBox::PaddingBox,
                 BorderBox => ShapeBox::BorderBox,
                 MarginBox => ShapeBox::MarginBox,
                 _ => panic!("Unexpected StyleGeometryBox while converting to ShapeBox"),
             }
         }
@@ -989,19 +982,19 @@ impl From<Origin> for SheetType {
             Origin::User => SheetType::User,
         }
     }
 }
 
 impl TrackSize<LengthOrPercentage> {
     /// Return TrackSize from given two nsStyleCoord
     pub fn from_gecko_style_coords<T: CoordData>(gecko_min: &T, gecko_max: &T) -> Self {
-        use crate::gecko_bindings::structs::root::nsStyleUnit;
-        use crate::values::computed::length::LengthOrPercentage;
-        use crate::values::generics::grid::{TrackBreadth, TrackSize};
+        use gecko_bindings::structs::root::nsStyleUnit;
+        use values::computed::length::LengthOrPercentage;
+        use values::generics::grid::{TrackBreadth, TrackSize};
 
         if gecko_min.unit() == nsStyleUnit::eStyleUnit_None {
             debug_assert!(
                 gecko_max.unit() == nsStyleUnit::eStyleUnit_Coord ||
                     gecko_max.unit() == nsStyleUnit::eStyleUnit_Percent ||
                     gecko_max.unit() == nsStyleUnit::eStyleUnit_Calc
             );
             return TrackSize::FitContent(
@@ -1018,17 +1011,17 @@ impl TrackSize<LengthOrPercentage> {
             TrackSize::Breadth(max)
         } else {
             TrackSize::Minmax(min, max)
         }
     }
 
     /// Save TrackSize to given gecko fields.
     pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) {
-        use crate::values::generics::grid::TrackSize;
+        use values::generics::grid::TrackSize;
 
         match *self {
             TrackSize::FitContent(ref lop) => {
                 // Gecko sets min value to None and max value to the actual value in fit-content
                 // https://searchfox.org/mozilla-central/rev/c05d9d61188d32b8/layout/style/nsRuleNode.cpp#7910
                 gecko_min.set_value(CoordDataValue::None);
                 lop.to_gecko_style_coord(gecko_max);
             },
@@ -1049,42 +1042,42 @@ impl TrackSize<LengthOrPercentage> {
 impl TrackListValue<LengthOrPercentage, Integer> {
     /// Return TrackSize from given two nsStyleCoord
     pub fn from_gecko_style_coords<T: CoordData>(gecko_min: &T, gecko_max: &T) -> Self {
         TrackListValue::TrackSize(TrackSize::from_gecko_style_coords(gecko_min, gecko_max))
     }
 
     /// Save TrackSize to given gecko fields.
     pub fn to_gecko_style_coords<T: CoordDataMut>(&self, gecko_min: &mut T, gecko_max: &mut T) {
-        use crate::values::generics::grid::TrackListValue;
+        use values::generics::grid::TrackListValue;
 
         match *self {
             TrackListValue::TrackSize(ref size) => size.to_gecko_style_coords(gecko_min, gecko_max),
             _ => unreachable!("Should only transform from track-size computed values"),
         }
     }
 }
 
 impl<T> Rect<T>
 where
     T: GeckoStyleCoordConvertible,
 {
     /// Convert this generic Rect to given Gecko fields.
-    pub fn to_gecko_rect(&self, sides: &mut crate::gecko_bindings::structs::nsStyleSides) {
+    pub fn to_gecko_rect(&self, sides: &mut ::gecko_bindings::structs::nsStyleSides) {
         self.0.to_gecko_style_coord(&mut sides.data_at_mut(0));
         self.1.to_gecko_style_coord(&mut sides.data_at_mut(1));
         self.2.to_gecko_style_coord(&mut sides.data_at_mut(2));
         self.3.to_gecko_style_coord(&mut sides.data_at_mut(3));
     }
 
     /// Convert from given Gecko data to generic Rect.
     pub fn from_gecko_rect(
-        sides: &crate::gecko_bindings::structs::nsStyleSides,
-    ) -> Option<crate::values::generics::rect::Rect<T>> {
-        use crate::values::generics::rect::Rect;
+        sides: &::gecko_bindings::structs::nsStyleSides,
+    ) -> Option<::values::generics::rect::Rect<T>> {
+        use values::generics::rect::Rect;
 
         Some(Rect::new(
             T::from_gecko_style_coord(&sides.data_at(0)).expect("coord[0] cound not convert"),
             T::from_gecko_style_coord(&sides.data_at(1)).expect("coord[1] cound not convert"),
             T::from_gecko_style_coord(&sides.data_at(2)).expect("coord[2] cound not convert"),
             T::from_gecko_style_coord(&sides.data_at(3)).expect("coord[3] cound not convert"),
         ))
     }
--- a/servo/components/style/gecko/data.rs
+++ b/servo/components/style/gecko/data.rs
@@ -1,49 +1,49 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Data needed to style a Gecko document.
 
 use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
-use crate::context::QuirksMode;
-use crate::dom::TElement;
-use crate::gecko_bindings::bindings::{self, RawServoStyleSet};
-use crate::gecko_bindings::structs::StyleSheet as DomStyleSheet;
-use crate::gecko_bindings::structs::{nsIDocument, StyleSheetInfo};
-use crate::gecko_bindings::structs::{RawGeckoPresContextBorrowed, ServoStyleSetSizes};
-use crate::gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
-use crate::invalidation::media_queries::{MediaListKey, ToMediaListKey};
-use crate::media_queries::{Device, MediaList};
-use crate::properties::ComputedValues;
-use crate::selector_parser::SnapshotMap;
-use crate::shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
-use crate::stylesheets::{CssRule, Origin, StylesheetContents, StylesheetInDocument};
-use crate::stylist::Stylist;
+use context::QuirksMode;
+use dom::TElement;
+use gecko_bindings::bindings::{self, RawServoStyleSet};
+use gecko_bindings::structs::StyleSheet as DomStyleSheet;
+use gecko_bindings::structs::{nsIDocument, StyleSheetInfo};
+use gecko_bindings::structs::{RawGeckoPresContextBorrowed, ServoStyleSetSizes};
+use gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFFI};
+use invalidation::media_queries::{MediaListKey, ToMediaListKey};
 use malloc_size_of::MallocSizeOfOps;
+use media_queries::{Device, MediaList};
+use properties::ComputedValues;
+use selector_parser::SnapshotMap;
 use servo_arc::Arc;
+use shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
 use std::fmt;
+use stylesheets::{CssRule, Origin, StylesheetContents, StylesheetInDocument};
+use stylist::Stylist;
 
 /// Little wrapper to a Gecko style sheet.
 #[derive(Eq, PartialEq)]
 pub struct GeckoStyleSheet(*const DomStyleSheet);
 
 impl fmt::Debug for GeckoStyleSheet {
     fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         let contents = self.contents();
         formatter
             .debug_struct("GeckoStyleSheet")
             .field("origin", &contents.origin)
             .field("url_data", &*contents.url_data.read())
             .finish()
     }
 }
 
-impl ToMediaListKey for crate::gecko::data::GeckoStyleSheet {
+impl ToMediaListKey for ::gecko::data::GeckoStyleSheet {
     fn to_media_list_key(&self) -> MediaListKey {
         use std::mem;
         unsafe { MediaListKey::from_raw(mem::transmute(self.0)) }
     }
 }
 
 impl GeckoStyleSheet {
     /// Create a `GeckoStyleSheet` from a raw `DomStyleSheet` pointer.
@@ -100,17 +100,17 @@ impl StylesheetInDocument for GeckoStyle
         self.contents().origin
     }
 
     fn quirks_mode(&self, _guard: &SharedRwLockReadGuard) -> QuirksMode {
         self.contents().quirks_mode
     }
 
     fn media<'a>(&'a self, guard: &'a SharedRwLockReadGuard) -> Option<&'a MediaList> {
-        use crate::gecko_bindings::structs::mozilla::dom::MediaList as DomMediaList;
+        use gecko_bindings::structs::mozilla::dom::MediaList as DomMediaList;
         use std::mem;
 
         unsafe {
             let dom_media_list = self.raw().mMedia.mRawPtr as *const DomMediaList;
             if dom_media_list.is_null() {
                 return None;
             }
             let raw_list = &*(*dom_media_list).mRawList.mRawPtr;
--- a/servo/components/style/gecko/global_style_data.rs
+++ b/servo/components/style/gecko/global_style_data.rs
@@ -1,24 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Global style data
 
-use crate::context::StyleSystemOptions;
-use crate::gecko_bindings::bindings;
-use crate::parallel::STYLE_THREAD_STACK_SIZE_KB;
-use crate::shared_lock::SharedRwLock;
-use crate::thread_state;
+use context::StyleSystemOptions;
+use gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
+use gecko_bindings::bindings::{Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread};
 use num_cpus;
+use parallel::STYLE_THREAD_STACK_SIZE_KB;
 use rayon;
+use shared_lock::SharedRwLock;
 use std::cmp;
 use std::env;
 use std::ffi::CString;
+use thread_state;
 
 /// Global style data
 pub struct GlobalStyleData {
     /// Shared RWLock for CSSOM objects
     pub shared_lock: SharedRwLock,
 
     /// Global style system options determined by env vars.
     pub options: StyleSystemOptions,
@@ -35,30 +36,30 @@ pub struct StyleThreadPool {
 
 fn thread_name(index: usize) -> String {
     format!("StyleThread#{}", index)
 }
 
 fn thread_startup(index: usize) {
     thread_state::initialize_layout_worker_thread();
     unsafe {
-        bindings::Gecko_SetJemallocThreadLocalArena(true);
+        Gecko_SetJemallocThreadLocalArena(true);
     }
     let name = thread_name(index);
     let name = CString::new(name).unwrap();
     unsafe {
         // Gecko_RegisterProfilerThread copies the passed name here.
-        bindings::Gecko_RegisterProfilerThread(name.as_ptr());
+        Gecko_RegisterProfilerThread(name.as_ptr());
     }
 }
 
 fn thread_shutdown(_: usize) {
     unsafe {
-        bindings::Gecko_UnregisterProfilerThread();
-        bindings::Gecko_SetJemallocThreadLocalArena(false);
+        Gecko_UnregisterProfilerThread();
+        Gecko_SetJemallocThreadLocalArena(false);
     }
 }
 
 lazy_static! {
     /// Global thread pool
     pub static ref STYLE_THREAD_POOL: StyleThreadPool = {
         let stylo_threads = env::var("STYLO_THREADS")
             .map(|s| s.parse::<usize>().expect("invalid STYLO_THREADS value"));
--- a/servo/components/style/gecko/media_features.rs
+++ b/servo/components/style/gecko/media_features.rs
@@ -1,25 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Gecko's media feature list and evaluator.
 
 use app_units::Au;
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs;
-use crate::media_queries::media_feature::{AllowsRanges, ParsingRequirements};
-use crate::media_queries::media_feature::{Evaluator, MediaFeatureDescription};
-use crate::media_queries::media_feature_expression::{AspectRatio, RangeOrOperator};
-use crate::media_queries::Device;
-use crate::values::computed::CSSPixelLength;
-use crate::values::computed::Resolution;
-use crate::Atom;
 use euclid::Size2D;
+use gecko_bindings::bindings;
+use gecko_bindings::structs;
+use media_queries::media_feature::{AllowsRanges, ParsingRequirements};
+use media_queries::media_feature::{Evaluator, MediaFeatureDescription};
+use media_queries::media_feature_expression::{AspectRatio, RangeOrOperator};
+use media_queries::Device;
+use values::computed::CSSPixelLength;
+use values::computed::Resolution;
+use Atom;
 
 fn viewport_size(device: &Device) -> Size2D<Au> {
     let pc = device.pres_context();
     if pc.mIsRootPaginatedDocument() != 0 {
         // We want the page size, including unprintable areas and margins.
         // FIXME(emilio, bug 1414600): Not quite!
         let area = &pc.mPageSize;
         return Size2D::new(Au(area.width), Au(area.height));
--- a/servo/components/style/gecko/media_queries.rs
+++ b/servo/components/style/gecko/media_queries.rs
@@ -1,34 +1,34 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Gecko's media-query device and expression representation.
 
 use app_units::Au;
 use app_units::AU_PER_PX;
-use crate::custom_properties::CssEnvironment;
-use crate::gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs;
-use crate::gecko_bindings::structs::{nsPresContext, RawGeckoPresContextBorrowed};
-use crate::media_queries::MediaType;
-use crate::properties::ComputedValues;
-use crate::string_cache::Atom;
-use crate::values::computed::font::FontSize;
-use crate::values::{CustomIdent, KeyframesName};
 use cssparser::RGBA;
+use custom_properties::CssEnvironment;
 use euclid::Size2D;
 use euclid::TypedScale;
+use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
+use gecko_bindings::bindings;
+use gecko_bindings::structs;
+use gecko_bindings::structs::{nsPresContext, RawGeckoPresContextBorrowed};
+use media_queries::MediaType;
+use properties::ComputedValues;
 use servo_arc::Arc;
 use std::fmt;
 use std::sync::atomic::{AtomicBool, AtomicIsize, AtomicUsize, Ordering};
+use string_cache::Atom;
 use style_traits::viewport::ViewportConstraints;
 use style_traits::{CSSPixel, DevicePixel};
+use values::computed::font::FontSize;
+use values::{CustomIdent, KeyframesName};
 
 /// The `Device` in Gecko wraps a pres context, has a default values computed,
 /// and contains all the viewport rule state.
 pub struct Device {
     /// NB: The pres context lifetime is tied to the styleset, who owns the
     /// stylist, and thus the `Device`, so having a raw pres context pointer
     /// here is fine.
     pres_context: RawGeckoPresContextBorrowed,
--- a/servo/components/style/gecko/pseudo_element.rs
+++ b/servo/components/style/gecko/pseudo_element.rs
@@ -3,42 +3,44 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Gecko's definition of a pseudo-element.
 //!
 //! Note that a few autogenerated bits of this live in
 //! `pseudo_element_definition.mako.rs`. If you touch that file, you probably
 //! need to update the checked-in files for Servo.
 
-use crate::gecko_bindings::structs::{self, CSSPseudoElementType};
-use crate::properties::longhands::display::computed_value::T as Display;
-use crate::properties::{ComputedValues, PropertyFlags};
-use crate::selector_parser::{NonTSPseudoClass, PseudoElementCascadeType, SelectorImpl};
-use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
-use crate::string_cache::Atom;
-use crate::values::serialize_atom_identifier;
 use cssparser::ToCss;
+use gecko_bindings::structs::{self, CSSPseudoElementType};
+use properties::longhands::display::computed_value::T as Display;
+use properties::{ComputedValues, PropertyFlags};
+use selector_parser::{NonTSPseudoClass, PseudoElementCascadeType, SelectorImpl};
 use std::fmt;
+use str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
+use string_cache::Atom;
 use thin_slice::ThinBoxedSlice;
+use values::serialize_atom_identifier;
 
 include!(concat!(
     env!("OUT_DIR"),
     "/gecko/pseudo_element_definition.rs"
 ));
 
 impl ::selectors::parser::PseudoElement for PseudoElement {
     type Impl = SelectorImpl;
 
     // ::slotted() should support all tree-abiding pseudo-elements, see
     // https://drafts.csswg.org/css-scoping/#slotted-pseudo
     // https://drafts.csswg.org/css-pseudo-4/#treelike
     fn valid_after_slotted(&self) -> bool {
         matches!(
             *self,
-            PseudoElement::Before | PseudoElement::After | PseudoElement::Placeholder
+            PseudoElement::Before |
+            PseudoElement::After |
+            PseudoElement::Placeholder
         )
     }
 
     fn supports_pseudo_class(&self, pseudo_class: &NonTSPseudoClass) -> bool {
         if !self.supports_user_action_state() {
             return false;
         }
 
--- 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 crate::gecko_bindings::structs::CSSPseudoElementType_InheritingAnonBox;
+        use 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/gecko/restyle_damage.rs
+++ b/servo/components/style/gecko/restyle_damage.rs
@@ -1,19 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Gecko's restyle damage computation (aka change hints, aka `nsChangeHint`).
 
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs;
-use crate::gecko_bindings::structs::nsChangeHint;
-use crate::matching::{StyleChange, StyleDifference};
-use crate::properties::ComputedValues;
+use gecko_bindings::bindings;
+use gecko_bindings::structs;
+use gecko_bindings::structs::nsChangeHint;
+use matching::{StyleChange, StyleDifference};
+use properties::ComputedValues;
 use std::ops::{BitAnd, BitOr, BitOrAssign, Not};
 
 /// The representation of Gecko's restyle damage is just a wrapper over
 /// `nsChangeHint`.
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub struct GeckoRestyleDamage(nsChangeHint);
 
 impl GeckoRestyleDamage {
--- a/servo/components/style/gecko/rules.rs
+++ b/servo/components/style/gecko/rules.rs
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Bindings for CSS Rule objects
 
-use crate::counter_style::{self, CounterBound};
-use crate::gecko_bindings::structs::{self, nsCSSValue};
-use crate::gecko_bindings::sugar::ns_css_value::ToNsCssValue;
+use counter_style::{self, CounterBound};
+use gecko_bindings::structs::{self, nsCSSValue};
+use gecko_bindings::sugar::ns_css_value::ToNsCssValue;
 
 impl<'a> ToNsCssValue for &'a counter_style::System {
     fn convert(self, nscssvalue: &mut nsCSSValue) {
-        use crate::counter_style::System::*;
+        use counter_style::System::*;
         match *self {
             Cyclic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_CYCLIC as i32),
             Numeric => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_NUMERIC as i32),
             Alphabetic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_ALPHABETIC as i32),
             Symbolic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_SYMBOLIC as i32),
             Additive => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_ADDITIVE as i32),
             Fixed {
                 ref first_symbol_value,
@@ -118,17 +118,17 @@ impl<'a> ToNsCssValue for &'a counter_st
             symbol.set_from(&tuple.symbol);
             (weight, symbol)
         }));
     }
 }
 
 impl<'a> ToNsCssValue for &'a counter_style::SpeakAs {
     fn convert(self, nscssvalue: &mut nsCSSValue) {
-        use crate::counter_style::SpeakAs::*;
+        use counter_style::SpeakAs::*;
         match *self {
             Auto => nscssvalue.set_auto(),
             Bullets => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_BULLETS as i32),
             Numbers => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_NUMBERS as i32),
             Words => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_WORDS as i32),
             Other(ref other) => nscssvalue.set_atom_ident(other.0.clone()),
         }
     }
--- a/servo/components/style/gecko/selector_parser.rs
+++ b/servo/components/style/gecko/selector_parser.rs
@@ -1,37 +1,35 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Gecko-specific bits for selector-parsing.
 
-use crate::element_state::{DocumentState, ElementState};
-use crate::gecko_bindings::structs;
-use crate::gecko_bindings::structs::RawServoSelectorList;
-use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
-use crate::invalidation::element::document_state::InvalidationMatchingData;
-use crate::selector_parser::{Direction, SelectorParser};
-use crate::str::starts_with_ignore_ascii_case;
-use crate::string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
-use crate::values::serialize_atom_identifier;
 use cssparser::{BasicParseError, BasicParseErrorKind, Parser};
 use cssparser::{CowRcStr, SourceLocation, ToCss, Token};
+use element_state::{DocumentState, ElementState};
+use gecko_bindings::structs;
+use gecko_bindings::structs::RawServoSelectorList;
+use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
+use invalidation::element::document_state::InvalidationMatchingData;
+use selector_parser::{Direction, SelectorParser};
 use selectors::parser::{self as selector_parser, Selector};
 use selectors::parser::{SelectorParseErrorKind, Visit};
 use selectors::visitor::SelectorVisitor;
 use selectors::SelectorList;
 use std::fmt;
+use str::starts_with_ignore_ascii_case;
+use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
 use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss as ToCss_};
 use thin_slice::ThinBoxedSlice;
+use values::serialize_atom_identifier;
 
-pub use crate::gecko::pseudo_element::{
-    PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT, PSEUDO_COUNT,
-};
-pub use crate::gecko::snapshot::SnapshotMap;
+pub use gecko::pseudo_element::{PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT, PSEUDO_COUNT};
+pub use gecko::snapshot::SnapshotMap;
 
 bitflags! {
     // See NonTSPseudoClass::is_enabled_in()
     struct NonTSPseudoClassFlag: u8 {
         const PSEUDO_CLASS_ENABLED_IN_UA_SHEETS = 1 << 0;
         const PSEUDO_CLASS_ENABLED_IN_CHROME = 1 << 1;
         const PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME =
             NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS.bits |
@@ -166,17 +164,17 @@ impl NonTSPseudoClass {
                 }
             }
         }
         apply_non_ts_list!(pseudo_class_check_is_enabled_in)
     }
 
     /// Returns whether the pseudo-class is enabled in content sheets.
     fn is_enabled_in_content(&self) -> bool {
-        use crate::gecko_bindings::structs::mozilla;
+        use gecko_bindings::structs::mozilla;
         match *self {
             // For pseudo-classes with pref, the availability in content
             // depends on the pref.
             NonTSPseudoClass::Fullscreen => unsafe {
                 mozilla::StaticPrefs_sVarCache_full_screen_api_unprefix_enabled
             },
             NonTSPseudoClass::Defined => unsafe {
                 structs::nsContentUtils_sIsCustomElementsEnabled
--- a/servo/components/style/gecko/snapshot.rs
+++ b/servo/components/style/gecko/snapshot.rs
@@ -1,28 +1,28 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! A gecko snapshot, that stores the element attributes and state before they
 //! change in order to properly calculate restyle hints.
 
-use crate::dom::TElement;
-use crate::element_state::ElementState;
-use crate::gecko::snapshot_helpers;
-use crate::gecko::wrapper::{GeckoElement, NamespaceConstraintHelpers};
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs::ServoElementSnapshot;
-use crate::gecko_bindings::structs::ServoElementSnapshotFlags as Flags;
-use crate::gecko_bindings::structs::ServoElementSnapshotTable;
-use crate::invalidation::element::element_wrapper::ElementSnapshot;
-use crate::string_cache::{Atom, Namespace};
-use crate::WeakAtom;
+use dom::TElement;
+use element_state::ElementState;
+use gecko::snapshot_helpers;
+use gecko::wrapper::{GeckoElement, NamespaceConstraintHelpers};
+use gecko_bindings::bindings;
+use gecko_bindings::structs::ServoElementSnapshot;
+use gecko_bindings::structs::ServoElementSnapshotFlags as Flags;
+use gecko_bindings::structs::ServoElementSnapshotTable;
+use invalidation::element::element_wrapper::ElementSnapshot;
 use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator};
 use selectors::attr::{CaseSensitivity, NamespaceConstraint};
+use string_cache::{Atom, Namespace};
+use WeakAtom;
 
 /// A snapshot of a Gecko element.
 pub type GeckoElementSnapshot = ServoElementSnapshot;
 
 /// A map from elements to snapshots for Gecko's style back-end.
 pub type SnapshotMap = ServoElementSnapshotTable;
 
 impl SnapshotMap {
--- a/servo/components/style/gecko/snapshot_helpers.rs
+++ b/servo/components/style/gecko/snapshot_helpers.rs
@@ -1,19 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Element an snapshot common logic.
 
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs::{self, nsAtom};
-use crate::string_cache::{Atom, WeakAtom};
-use crate::CaseSensitivityExt;
+use gecko_bindings::bindings;
+use gecko_bindings::structs::{self, nsAtom};
 use selectors::attr::CaseSensitivity;
+use string_cache::{Atom, WeakAtom};
+use CaseSensitivityExt;
 
 /// A function that, given an element of type `T`, allows you to get a single
 /// class or a class list.
 enum Class<'a> {
     None,
     One(*const nsAtom),
     More(&'a [structs::RefPtr<nsAtom>]),
 }
--- a/servo/components/style/gecko/traversal.rs
+++ b/servo/components/style/gecko/traversal.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Gecko-specific bits for the styling DOM traversal.
 
-use crate::context::{SharedStyleContext, StyleContext};
-use crate::dom::{TElement, TNode};
-use crate::gecko::wrapper::{GeckoElement, GeckoNode};
-use crate::traversal::{recalc_style_at, DomTraversal, PerLevelTraversalData};
+use context::{SharedStyleContext, StyleContext};
+use dom::{TElement, TNode};
+use gecko::wrapper::{GeckoElement, GeckoNode};
+use traversal::{recalc_style_at, DomTraversal, PerLevelTraversalData};
 
 /// This is the simple struct that Gecko uses to encapsulate a DOM traversal for
 /// styling.
 pub struct RecalcStyleOnly<'a> {
     shared: SharedStyleContext<'a>,
 }
 
 impl<'a> RecalcStyleOnly<'a> {
--- a/servo/components/style/gecko/url.rs
+++ b/servo/components/style/gecko/url.rs
@@ -1,29 +1,29 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Common handling for the specified value CSS url() values.
 
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs::root::mozilla::css::URLValue;
-use crate::gecko_bindings::structs::root::mozilla::CORSMode;
-use crate::gecko_bindings::structs::root::nsStyleImageRequest;
-use crate::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI};
-use crate::gecko_bindings::sugar::refptr::RefPtr;
-use crate::parser::{Parse, ParserContext};
-use crate::stylesheets::UrlExtraData;
-use crate::values::computed::{Context, ToComputedValue};
 use cssparser::Parser;
+use gecko_bindings::bindings;
+use gecko_bindings::structs::root::mozilla::css::URLValue;
+use gecko_bindings::structs::root::mozilla::CORSMode;
+use gecko_bindings::structs::root::nsStyleImageRequest;
+use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI};
+use gecko_bindings::sugar::refptr::RefPtr;
 use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
 use nsstring::nsCString;
+use parser::{Parse, ParserContext};
 use servo_arc::Arc;
 use std::fmt::{self, Write};
 use style_traits::{CssWriter, ParseError, ToCss};
+use stylesheets::UrlExtraData;
+use values::computed::{Context, ToComputedValue};
 
 /// A CSS url() value for gecko.
 #[css(function = "url")]
 #[derive(Clone, Debug, PartialEq, SpecifiedValueInfo, ToCss)]
 pub struct CssUrl(pub Arc<CssUrlData>);
 
 /// Data shared between CssUrls.
 #[derive(Clone, Debug, PartialEq, SpecifiedValueInfo, ToCss)]
@@ -127,22 +127,22 @@ impl SpecifiedUrl {
             // We do not expect Gecko_URLValue_Create returns null.
             debug_assert!(!ptr.is_null());
             RefPtr::from_addrefed(ptr)
         };
         Self { url, url_value }
     }
 
     fn from_css_url(url: CssUrl) -> Self {
-        use crate::gecko_bindings::structs::root::mozilla::CORSMode_CORS_NONE;
+        use gecko_bindings::structs::root::mozilla::CORSMode_CORS_NONE;
         Self::from_css_url_with_cors(url, CORSMode_CORS_NONE)
     }
 
     fn from_css_url_with_cors_anonymous(url: CssUrl) -> Self {
-        use crate::gecko_bindings::structs::root::mozilla::CORSMode_CORS_ANONYMOUS;
+        use gecko_bindings::structs::root::mozilla::CORSMode_CORS_ANONYMOUS;
         Self::from_css_url_with_cors(url, CORSMode_CORS_ANONYMOUS)
     }
 }
 
 impl Parse for SpecifiedUrl {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
--- a/servo/components/style/gecko/values.rs
+++ b/servo/components/style/gecko/values.rs
@@ -2,41 +2,40 @@
  * 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/. */
 
 #![allow(unsafe_code)]
 
 //! Different kind of helpers to interact with Gecko values.
 
 use app_units::Au;
-use crate::counter_style::{Symbol, Symbols};
-use crate::gecko_bindings::structs::{self, nsStyleCoord, CounterStylePtr};
-use crate::gecko_bindings::structs::{StyleGridTrackBreadth, StyleShapeRadius};
-use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
-use crate::media_queries::Device;
-use crate::values::computed::basic_shape::ShapeRadius as ComputedShapeRadius;
-use crate::values::computed::FlexBasis as ComputedFlexBasis;
-use crate::values::computed::NonNegativeNumber;
-use crate::values::computed::{Angle, ExtremumLength, Length, LengthOrPercentage};
-use crate::values::computed::{LengthOrPercentageOrAuto, Percentage};
-use crate::values::computed::{LengthOrPercentageOrNone, Number, NumberOrPercentage};
-use crate::values::computed::{MaxLength as ComputedMaxLength, MozLength as ComputedMozLength};
-use crate::values::computed::{NonNegativeLength, NonNegativeLengthOrPercentage};
-use crate::values::generics::basic_shape::ShapeRadius;
-use crate::values::generics::box_::Perspective;
-use crate::values::generics::flex::FlexBasis;
-use crate::values::generics::gecko::ScrollSnapPoint;
-use crate::values::generics::grid::{TrackBreadth, TrackKeyword};
-use crate::values::generics::length::{MaxLength, MozLength};
-use crate::values::generics::{CounterStyleOrNone, NonNegative};
-use crate::values::{Auto, Either, None_, Normal};
-use crate::Atom;
+use counter_style::{Symbol, Symbols};
 use cssparser::RGBA;
+use gecko_bindings::structs::{self, nsStyleCoord, CounterStylePtr};
+use gecko_bindings::structs::{StyleGridTrackBreadth, StyleShapeRadius};
+use gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
+use media_queries::Device;
 use nsstring::{nsACString, nsCStr};
 use std::cmp::max;
+use values::computed::basic_shape::ShapeRadius as ComputedShapeRadius;
+use values::computed::FlexBasis as ComputedFlexBasis;
+use values::computed::{Angle, ExtremumLength, Length, LengthOrPercentage};
+use values::computed::{LengthOrPercentageOrAuto, Percentage};
+use values::computed::{LengthOrPercentageOrNone, Number, NumberOrPercentage};
+use values::computed::{MaxLength as ComputedMaxLength, MozLength as ComputedMozLength};
+use values::computed::{NonNegativeLength, NonNegativeLengthOrPercentage, NonNegativeNumber};
+use values::generics::basic_shape::ShapeRadius;
+use values::generics::box_::Perspective;
+use values::generics::flex::FlexBasis;
+use values::generics::gecko::ScrollSnapPoint;
+use values::generics::grid::{TrackBreadth, TrackKeyword};
+use values::generics::length::{MaxLength, MozLength};
+use values::generics::{CounterStyleOrNone, NonNegative};
+use values::{Auto, Either, None_, Normal};
+use Atom;
 
 /// A trait that defines an interface to convert from and to `nsStyleCoord`s.
 pub trait GeckoStyleCoordConvertible: Sized {
     /// Convert this to a `nsStyleCoord`.
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T);
     /// Given a `nsStyleCoord`, try to get a value of this type..
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self>;
 }
@@ -373,37 +372,29 @@ impl GeckoStyleCoordConvertible for Norm
         } else {
             None
         }
     }
 }
 
 impl GeckoStyleCoordConvertible for ExtremumLength {
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
-        use crate::gecko_bindings::structs::{
-            NS_STYLE_WIDTH_AVAILABLE, NS_STYLE_WIDTH_FIT_CONTENT,
-        };
-        use crate::gecko_bindings::structs::{
-            NS_STYLE_WIDTH_MAX_CONTENT, NS_STYLE_WIDTH_MIN_CONTENT,
-        };
+        use gecko_bindings::structs::{NS_STYLE_WIDTH_AVAILABLE, NS_STYLE_WIDTH_FIT_CONTENT};
+        use gecko_bindings::structs::{NS_STYLE_WIDTH_MAX_CONTENT, NS_STYLE_WIDTH_MIN_CONTENT};
         coord.set_value(CoordDataValue::Enumerated(match *self {
             ExtremumLength::MozMaxContent => NS_STYLE_WIDTH_MAX_CONTENT,
             ExtremumLength::MozMinContent => NS_STYLE_WIDTH_MIN_CONTENT,
             ExtremumLength::MozFitContent => NS_STYLE_WIDTH_FIT_CONTENT,
             ExtremumLength::MozAvailable => NS_STYLE_WIDTH_AVAILABLE,
         }))
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
-        use crate::gecko_bindings::structs::{
-            NS_STYLE_WIDTH_AVAILABLE, NS_STYLE_WIDTH_FIT_CONTENT,
-        };
-        use crate::gecko_bindings::structs::{
-            NS_STYLE_WIDTH_MAX_CONTENT, NS_STYLE_WIDTH_MIN_CONTENT,
-        };
+        use gecko_bindings::structs::{NS_STYLE_WIDTH_AVAILABLE, NS_STYLE_WIDTH_FIT_CONTENT};
+        use gecko_bindings::structs::{NS_STYLE_WIDTH_MAX_CONTENT, NS_STYLE_WIDTH_MIN_CONTENT};
         match coord.as_value() {
             CoordDataValue::Enumerated(NS_STYLE_WIDTH_MAX_CONTENT) => {
                 Some(ExtremumLength::MozMaxContent)
             },
             CoordDataValue::Enumerated(NS_STYLE_WIDTH_MIN_CONTENT) => {
                 Some(ExtremumLength::MozMinContent)
             },
             CoordDataValue::Enumerated(NS_STYLE_WIDTH_FIT_CONTENT) => {
@@ -455,18 +446,18 @@ impl GeckoStyleCoordConvertible for Scro
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match self.repeated() {
             None => coord.set_value(CoordDataValue::None),
             Some(l) => l.to_gecko_style_coord(coord),
         };
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
-        use crate::gecko_bindings::structs::root::nsStyleUnit;
-        use crate::values::generics::gecko::ScrollSnapPoint;
+        use gecko_bindings::structs::root::nsStyleUnit;
+        use values::generics::gecko::ScrollSnapPoint;
 
         Some(match coord.unit() {
             nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None,
             _ => ScrollSnapPoint::Repeat(
                 LengthOrPercentage::from_gecko_style_coord(coord)
                     .expect("coord could not convert to LengthOrPercentage"),
             ),
         })
@@ -480,17 +471,17 @@ where
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
             Perspective::None => coord.set_value(CoordDataValue::None),
             Perspective::Length(ref l) => l.to_gecko_style_coord(coord),
         };
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
-        use crate::gecko_bindings::structs::root::nsStyleUnit;
+        use gecko_bindings::structs::root::nsStyleUnit;
 
         if coord.unit() == nsStyleUnit::eStyleUnit_None {
             return Some(Perspective::None);
         }
         Some(Perspective::Length(L::from_gecko_style_coord(coord)?))
     }
 }
 
@@ -525,18 +516,18 @@ pub fn round_border_to_device_pixels(wid
             Au(width.0 / au_per_device_px.0 * au_per_device_px.0),
         )
     }
 }
 
 impl CounterStyleOrNone {
     /// Convert this counter style to a Gecko CounterStylePtr.
     pub fn to_gecko_value(self, gecko_value: &mut CounterStylePtr, device: &Device) {
-        use crate::gecko_bindings::bindings::Gecko_SetCounterStyleToName as set_name;
-        use crate::gecko_bindings::bindings::Gecko_SetCounterStyleToSymbols as set_symbols;
+        use gecko_bindings::bindings::Gecko_SetCounterStyleToName as set_name;
+        use gecko_bindings::bindings::Gecko_SetCounterStyleToSymbols as set_symbols;
         let pres_context = device.pres_context();
         match self {
             CounterStyleOrNone::None => unsafe {
                 set_name(gecko_value, atom!("none").into_addrefed(), pres_context);
             },
             CounterStyleOrNone::Name(name) => unsafe {
                 set_name(gecko_value, name.0.into_addrefed(), pres_context);
             },
@@ -562,19 +553,19 @@ impl CounterStyleOrNone {
                     )
                 };
             },
         }
     }
 
     /// Convert Gecko CounterStylePtr to CounterStyleOrNone or String.
     pub fn from_gecko_value(gecko_value: &CounterStylePtr) -> Either<Self, String> {
-        use crate::gecko_bindings::bindings;
-        use crate::values::generics::SymbolsType;
-        use crate::values::CustomIdent;
+        use gecko_bindings::bindings;
+        use values::generics::SymbolsType;
+        use values::CustomIdent;
 
         let name = unsafe { bindings::Gecko_CounterStyle_GetName(gecko_value) };
         if !name.is_null() {
             let name = unsafe { Atom::from_raw(name) };
             if name == atom!("none") {
                 Either::First(CounterStyleOrNone::None)
             } else {
                 Either::First(CounterStyleOrNone::Name(CustomIdent(name)))
--- a/servo/components/style/gecko/wrapper.rs
+++ b/servo/components/style/gecko/wrapper.rs
@@ -10,85 +10,85 @@
 //! This really follows the Servo pattern in
 //! `components/script/layout_wrapper.rs`.
 //!
 //! This theoretically should live in its own crate, but now it lives in the
 //! style system it's kind of pointless in the Stylo case, and only Servo forces
 //! the separation between the style system implementation and everything else.
 
 use app_units::Au;
+use applicable_declarations::ApplicableDeclarationBlock;
 use atomic_refcell::{AtomicRefCell, AtomicRefMut};
-use crate::applicable_declarations::ApplicableDeclarationBlock;
-use crate::author_styles::AuthorStyles;
-use crate::context::{PostAnimationTasks, QuirksMode, SharedStyleContext, UpdateAnimationsTasks};
-use crate::data::ElementData;
-use crate::dom::{LayoutIterator, NodeInfo, OpaqueNode, TDocument, TElement, TNode, TShadowRoot};
-use crate::element_state::{DocumentState, ElementState};
-use crate::font_metrics::{FontMetrics, FontMetricsProvider, FontMetricsQueryResult};
-use crate::gecko::data::GeckoStyleSheet;
-use crate::gecko::global_style_data::GLOBAL_STYLE_DATA;
-use crate::gecko::selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl};
-use crate::gecko::snapshot_helpers;
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::bindings::Gecko_ElementHasAnimations;
-use crate::gecko_bindings::bindings::Gecko_ElementHasCSSAnimations;
-use crate::gecko_bindings::bindings::Gecko_ElementHasCSSTransitions;
-use crate::gecko_bindings::bindings::Gecko_GetActiveLinkAttrDeclarationBlock;
-use crate::gecko_bindings::bindings::Gecko_GetAnimationEffectCount;
-use crate::gecko_bindings::bindings::Gecko_GetAnimationRule;
-use crate::gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations;
-use crate::gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
-use crate::gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
-use crate::gecko_bindings::bindings::Gecko_GetUnvisitedLinkAttrDeclarationBlock;
-use crate::gecko_bindings::bindings::Gecko_GetVisitedLinkAttrDeclarationBlock;
-use crate::gecko_bindings::bindings::Gecko_IsSignificantChild;
-use crate::gecko_bindings::bindings::Gecko_MatchLang;
-use crate::gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
-use crate::gecko_bindings::bindings::Gecko_UpdateAnimations;
-use crate::gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentLWTheme};
-use crate::gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
-use crate::gecko_bindings::structs;
-use crate::gecko_bindings::structs::nsChangeHint;
-use crate::gecko_bindings::structs::nsIDocument_DocumentTheme as DocumentTheme;
-use crate::gecko_bindings::structs::nsRestyleHint;
-use crate::gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel;
-use crate::gecko_bindings::structs::ELEMENT_HANDLED_SNAPSHOT;
-use crate::gecko_bindings::structs::ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO;
-use crate::gecko_bindings::structs::ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO;
-use crate::gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT;
-use crate::gecko_bindings::structs::NODE_DESCENDANTS_NEED_FRAMES;
-use crate::gecko_bindings::structs::NODE_NEEDS_FRAME;
-use crate::gecko_bindings::structs::{nsAtom, nsIContent, nsINode_BooleanFlag};
-use crate::gecko_bindings::structs::{RawGeckoElement, RawGeckoNode, RawGeckoXBLBinding};
-use crate::gecko_bindings::sugar::ownership::{HasArcFFI, HasSimpleFFI};
-use crate::hash::FxHashMap;
-use crate::logical_geometry::WritingMode;
-use crate::media_queries::Device;
-use crate::properties::animated_properties::{AnimationValue, AnimationValueMap};
-use crate::properties::style_structs::Font;
-use crate::properties::{ComputedValues, LonghandId};
-use crate::properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock};
-use crate::rule_tree::CascadeLevel as ServoCascadeLevel;
-use crate::selector_parser::{AttrValue, HorizontalDirection, Lang};
-use crate::shared_lock::Locked;
-use crate::string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
-use crate::stylist::CascadeData;
-use crate::CaseSensitivityExt;
+use author_styles::AuthorStyles;
+use context::{PostAnimationTasks, QuirksMode, SharedStyleContext, UpdateAnimationsTasks};
+use data::ElementData;
+use dom::{LayoutIterator, NodeInfo, OpaqueNode, TDocument, TElement, TNode, TShadowRoot};
+use element_state::{DocumentState, ElementState};
+use font_metrics::{FontMetrics, FontMetricsProvider, FontMetricsQueryResult};
+use gecko::data::GeckoStyleSheet;
+use gecko::global_style_data::GLOBAL_STYLE_DATA;
+use gecko::selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl};
+use gecko::snapshot_helpers;
+use gecko_bindings::bindings;
+use gecko_bindings::bindings::Gecko_ElementHasAnimations;
+use gecko_bindings::bindings::Gecko_ElementHasCSSAnimations;
+use gecko_bindings::bindings::Gecko_ElementHasCSSTransitions;
+use gecko_bindings::bindings::Gecko_GetActiveLinkAttrDeclarationBlock;
+use gecko_bindings::bindings::Gecko_GetAnimationEffectCount;
+use gecko_bindings::bindings::Gecko_GetAnimationRule;
+use gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations;
+use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
+use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
+use gecko_bindings::bindings::Gecko_GetUnvisitedLinkAttrDeclarationBlock;
+use gecko_bindings::bindings::Gecko_GetVisitedLinkAttrDeclarationBlock;
+use gecko_bindings::bindings::Gecko_IsSignificantChild;
+use gecko_bindings::bindings::Gecko_MatchLang;
+use gecko_bindings::bindings::Gecko_UnsetDirtyStyleAttr;
+use gecko_bindings::bindings::Gecko_UpdateAnimations;
+use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentLWTheme};
+use gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
+use gecko_bindings::structs;
+use gecko_bindings::structs::nsChangeHint;
+use gecko_bindings::structs::nsIDocument_DocumentTheme as DocumentTheme;
+use gecko_bindings::structs::nsRestyleHint;
+use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel;
+use gecko_bindings::structs::ELEMENT_HANDLED_SNAPSHOT;
+use gecko_bindings::structs::ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO;
+use gecko_bindings::structs::ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO;
+use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT;
+use gecko_bindings::structs::NODE_DESCENDANTS_NEED_FRAMES;
+use gecko_bindings::structs::NODE_NEEDS_FRAME;
+use gecko_bindings::structs::{nsAtom, nsIContent, nsINode_BooleanFlag};
+use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode, RawGeckoXBLBinding};
+use gecko_bindings::sugar::ownership::{HasArcFFI, HasSimpleFFI};
+use hash::FxHashMap;
+use logical_geometry::WritingMode;
+use media_queries::Device;
+use properties::animated_properties::{AnimationValue, AnimationValueMap};
+use properties::style_structs::Font;
+use properties::{ComputedValues, LonghandId};
+use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock};
+use rule_tree::CascadeLevel as ServoCascadeLevel;
+use selector_parser::{AttrValue, HorizontalDirection, Lang};
 use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator};
 use selectors::attr::{CaseSensitivity, NamespaceConstraint};
 use selectors::matching::VisitedHandlingMode;
 use selectors::matching::{ElementSelectorFlags, MatchingContext};
 use selectors::sink::Push;
 use selectors::{Element, OpaqueElement};
 use servo_arc::{Arc, ArcBorrow, RawOffsetArc};
+use shared_lock::Locked;
 use std::cell::RefCell;
 use std::fmt;
 use std::hash::{Hash, Hasher};
 use std::mem;
 use std::ptr;
+use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
+use stylist::CascadeData;
+use CaseSensitivityExt;
 
 #[inline]
 fn elements_with_id<'a, 'le>(
     array: *const structs::nsTArray<*mut RawGeckoElement>,
 ) -> &'a [GeckoElement<'le>] {
     unsafe {
         if array.is_null() {
             return &[];
@@ -282,25 +282,25 @@ impl<'ln> GeckoNode<'ln> {
     #[inline]
     fn get_bool_flag(&self, flag: nsINode_BooleanFlag) -> bool {
         self.bool_flags() & (1u32 << flag as u32) != 0
     }
 
     /// This logic is duplicate in Gecko's nsINode::IsInShadowTree().
     #[inline]
     fn is_in_shadow_tree(&self) -> bool {
-        use crate::gecko_bindings::structs::NODE_IS_IN_SHADOW_TREE;
+        use gecko_bindings::structs::NODE_IS_IN_SHADOW_TREE;
         self.flags() & (NODE_IS_IN_SHADOW_TREE as u32) != 0
     }
 
     /// WARNING: This logic is duplicated in Gecko's FlattenedTreeParentIsParent.
     /// Make sure to mirror any modifications in both places.
     #[inline]
     fn flattened_tree_parent_is_parent(&self) -> bool {
-        use crate::gecko_bindings::structs::*;
+        use gecko_bindings::structs::*;
         let flags = self.flags();
         if flags & (NODE_MAY_BE_IN_BINDING_MNGR as u32 | NODE_IS_IN_SHADOW_TREE as u32) != 0 {
             return false;
         }
 
         let parent = unsafe { self.0.mParent.as_ref() }.map(GeckoNode);
         let parent_el = parent.and_then(|p| p.as_element());
         if flags & (NODE_IS_NATIVE_ANONYMOUS_ROOT as u32) != 0 &&
@@ -762,17 +762,17 @@ impl<'le> GeckoElement<'le> {
     #[inline]
     fn may_have_class(&self) -> bool {
         self.as_node()
             .get_bool_flag(nsINode_BooleanFlag::ElementMayHaveClass)
     }
 
     #[inline]
     fn has_properties(&self) -> bool {
-        use crate::gecko_bindings::structs::NODE_HAS_PROPERTIES;
+        use gecko_bindings::structs::NODE_HAS_PROPERTIES;
 
         (self.flags() & NODE_HAS_PROPERTIES as u32) != 0
     }
 
     #[inline]
     fn before_or_after_pseudo(&self, is_before: bool) -> Option<Self> {
         if !self.has_properties() {
             return None;
@@ -800,18 +800,18 @@ impl<'le> GeckoElement<'le> {
     /// animation.
     ///
     /// Also this function schedules style flush.
     pub unsafe fn note_explicit_hints(
         &self,
         restyle_hint: nsRestyleHint,
         change_hint: nsChangeHint,
     ) {
-        use crate::gecko::restyle_damage::GeckoRestyleDamage;
-        use crate::invalidation::element::restyle_hints::RestyleHint;
+        use gecko::restyle_damage::GeckoRestyleDamage;
+        use invalidation::element::restyle_hints::RestyleHint;
 
         let damage = GeckoRestyleDamage::new(change_hint);
         debug!(
             "note_explicit_hints: {:?}, restyle_hint={:?}, change_hint={:?}",
             self, restyle_hint, change_hint
         );
 
         let restyle_hint: RestyleHint = restyle_hint.into();
@@ -839,24 +839,24 @@ impl<'le> GeckoElement<'le> {
 
         data.hint.insert(restyle_hint);
         data.damage |= damage;
     }
 
     /// This logic is duplicated in Gecko's nsIContent::IsRootOfAnonymousSubtree.
     #[inline]
     fn is_root_of_anonymous_subtree(&self) -> bool {
-        use crate::gecko_bindings::structs::NODE_IS_ANONYMOUS_ROOT;
+        use gecko_bindings::structs::NODE_IS_ANONYMOUS_ROOT;
         self.flags() & (NODE_IS_ANONYMOUS_ROOT as u32) != 0
     }
 
     /// This logic is duplicated in Gecko's nsIContent::IsRootOfNativeAnonymousSubtree.
     #[inline]
     fn is_root_of_native_anonymous_subtree(&self) -> bool {
-        use crate::gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS_ROOT;
+        use gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS_ROOT;
         return self.flags() & (NODE_IS_NATIVE_ANONYMOUS_ROOT as u32) != 0;
     }
 
     /// This logic is duplicated in Gecko's nsIContent::IsInAnonymousSubtree.
     #[inline]
     fn is_in_anonymous_subtree(&self) -> bool {
         if self.is_in_native_anonymous_subtree() {
             return true;
@@ -878,18 +878,18 @@ impl<'le> GeckoElement<'le> {
         }
         match self.containing_shadow_host() {
             Some(e) => e.is_svg_element() && e.local_name() == &*local_name!("use"),
             None => false,
         }
     }
 
     fn css_transitions_info(&self) -> FxHashMap<LonghandId, Arc<AnimationValue>> {
-        use crate::gecko_bindings::bindings::Gecko_ElementTransitions_EndValueAt;
-        use crate::gecko_bindings::bindings::Gecko_ElementTransitions_Length;
+        use gecko_bindings::bindings::Gecko_ElementTransitions_EndValueAt;
+        use gecko_bindings::bindings::Gecko_ElementTransitions_Length;
 
         let collection_length = unsafe { Gecko_ElementTransitions_Length(self.0) } as usize;
         let mut map = FxHashMap::with_capacity_and_hasher(collection_length, Default::default());
 
         for i in 0..collection_length {
             let raw_end_value = unsafe { Gecko_ElementTransitions_EndValueAt(self.0, i) };
 
             let end_value = AnimationValue::arc_from_borrowed(&raw_end_value)
@@ -905,17 +905,17 @@ impl<'le> GeckoElement<'le> {
     fn needs_transitions_update_per_property(
         &self,
         longhand_id: LonghandId,
         combined_duration: f32,
         before_change_style: &ComputedValues,
         after_change_style: &ComputedValues,
         existing_transitions: &FxHashMap<LonghandId, Arc<AnimationValue>>,
     ) -> bool {
-        use crate::values::animated::{Animate, Procedure};
+        use values::animated::{Animate, Procedure};
         debug_assert!(!longhand_id.is_logical());
 
         // If there is an existing transition, update only if the end value
         // differs.
         //
         // If the end value has not changed, we should leave the currently
         // running transition as-is since we don't want to interrupt its timing
         // function.
@@ -940,17 +940,17 @@ impl<'le> GeckoElement<'le> {
             .is_ok()
     }
 }
 
 /// Converts flags from the layout used by rust-selectors to the layout used
 /// by Gecko. We could align these and then do this without conditionals, but
 /// it's probably not worth the trouble.
 fn selector_flags_to_node_flags(flags: ElementSelectorFlags) -> u32 {
-    use crate::gecko_bindings::structs::*;
+    use gecko_bindings::structs::*;
     let mut gecko_flags = 0u32;
     if flags.contains(ElementSelectorFlags::HAS_SLOW_SELECTOR) {
         gecko_flags |= NODE_HAS_SLOW_SELECTOR as u32;
     }
     if flags.contains(ElementSelectorFlags::HAS_SLOW_SELECTOR_LATER_SIBLINGS) {
         gecko_flags |= NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS as u32;
     }
     if flags.contains(ElementSelectorFlags::HAS_EDGE_CHILD_SELECTOR) {
@@ -962,18 +962,18 @@ fn selector_flags_to_node_flags(flags: E
 
     gecko_flags
 }
 
 fn get_animation_rule(
     element: &GeckoElement,
     cascade_level: CascadeLevel,
 ) -> Option<Arc<Locked<PropertyDeclarationBlock>>> {
-    use crate::gecko_bindings::sugar::ownership::HasSimpleFFI;
-    use crate::properties::longhands::ANIMATABLE_PROPERTY_COUNT;
+    use gecko_bindings::sugar::ownership::HasSimpleFFI;
+    use properties::longhands::ANIMATABLE_PROPERTY_COUNT;
 
     // There's a very rough correlation between the number of effects
     // (animations) on an element and the number of properties it is likely to
     // animate, so we use that as an initial guess for the size of the
     // AnimationValueMap in order to reduce the number of re-allocations needed.
     let effect_count = unsafe { Gecko_GetAnimationEffectCount(element.0) };
     // Also, we should try to reuse the PDB, to avoid creating extra rule nodes.
     let mut animation_values = AnimationValueMap::with_capacity_and_hasher(
@@ -1001,17 +1001,17 @@ fn get_animation_rule(
 pub struct GeckoFontMetricsProvider {
     /// Cache of base font sizes for each language
     ///
     /// Usually will have 1 element.
     ///
     // This may be slow on pages using more languages, might be worth optimizing
     // by caching lang->group mapping separately and/or using a hashmap on larger
     // loads.
-    pub font_size_cache: RefCell<Vec<(Atom, crate::gecko_bindings::structs::FontSizePrefs)>>,
+    pub font_size_cache: RefCell<Vec<(Atom, ::gecko_bindings::structs::FontSizePrefs)>>,
 }
 
 impl GeckoFontMetricsProvider {
     /// Construct
     pub fn new() -> Self {
         GeckoFontMetricsProvider {
             font_size_cache: RefCell::new(Vec::new()),
         }
@@ -1019,17 +1019,17 @@ impl GeckoFontMetricsProvider {
 }
 
 impl FontMetricsProvider for GeckoFontMetricsProvider {
     fn create_from(_: &SharedStyleContext) -> GeckoFontMetricsProvider {
         GeckoFontMetricsProvider::new()
     }
 
     fn get_size(&self, font_name: &Atom, font_family: u8) -> Au {
-        use crate::gecko_bindings::bindings::Gecko_GetBaseSize;
+        use gecko_bindings::bindings::Gecko_GetBaseSize;
         let mut cache = self.font_size_cache.borrow_mut();
         if let Some(sizes) = cache.iter().find(|el| el.0 == *font_name) {
             return sizes.1.size_for_generic(font_family);
         }
         let sizes = unsafe { Gecko_GetBaseSize(font_name.as_ptr()) };
         cache.push((font_name.clone(), sizes));
         sizes.size_for_generic(font_family)
     }
@@ -1037,17 +1037,17 @@ impl FontMetricsProvider for GeckoFontMe
     fn query(
         &self,
         font: &Font,
         font_size: Au,
         wm: WritingMode,
         in_media_query: bool,
         device: &Device,
     ) -> FontMetricsQueryResult {
-        use crate::gecko_bindings::bindings::Gecko_GetFontMetrics;
+        use gecko_bindings::bindings::Gecko_GetFontMetrics;
         let gecko_metrics = unsafe {
             Gecko_GetFontMetrics(
                 device.pres_context(),
                 wm.is_vertical() && !wm.is_sideways(),
                 font.gecko(),
                 font_size.0,
                 // we don't use the user font set in a media query
                 !in_media_query,
@@ -1387,17 +1387,17 @@ impl<'le> TElement for GeckoElement<'le>
 
     fn is_visited_link(&self) -> bool {
         self.state().intersects(ElementState::IN_VISITED_STATE)
     }
 
     /// This logic is duplicated in Gecko's nsINode::IsInNativeAnonymousSubtree.
     #[inline]
     fn is_in_native_anonymous_subtree(&self) -> bool {
-        use crate::gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
+        use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
         self.flags() & (NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE as u32) != 0
     }
 
     #[inline]
     fn matches_user_and_author_rules(&self) -> bool {
         !self.is_in_native_anonymous_subtree()
     }
 
@@ -1494,18 +1494,18 @@ impl<'le> TElement for GeckoElement<'le>
             });
         }
         self.as_node()
             .get_bool_flag(nsINode_BooleanFlag::ElementHasAnimations)
     }
 
     /// Process various tasks that are a result of animation-only restyle.
     fn process_post_animation(&self, tasks: PostAnimationTasks) {
-        use crate::gecko_bindings::structs::nsChangeHint_nsChangeHint_Empty;
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_Subtree;
+        use gecko_bindings::structs::nsChangeHint_nsChangeHint_Empty;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_Subtree;
 
         debug_assert!(!tasks.is_empty(), "Should be involved a task");
 
         // If display style was changed from none to other, we need to resolve
         // the descendants in the display:none subtree. Instead of resolving
         // those styles in animation-only restyle, we defer it to a subsequent
         // normal restyle.
         if tasks.intersects(PostAnimationTasks::DISPLAY_CHANGED_FROM_NONE_FOR_SMIL) {
@@ -1633,19 +1633,19 @@ impl<'le> TElement for GeckoElement<'le>
     // update.
     //
     // https://drafts.csswg.org/css-transitions/#starting
     fn needs_transitions_update(
         &self,
         before_change_style: &ComputedValues,
         after_change_style: &ComputedValues,
     ) -> bool {
-        use crate::gecko_bindings::structs::nsCSSPropertyID;
-        use crate::properties::LonghandIdSet;
-        use crate::values::computed::TransitionProperty;
+        use gecko_bindings::structs::nsCSSPropertyID;
+        use properties::LonghandIdSet;
+        use values::computed::TransitionProperty;
 
         debug_assert!(
             self.might_need_transitions_update(Some(before_change_style), after_change_style),
             "We should only call needs_transitions_update if \
              might_need_transitions_update returns true"
         );
 
         let after_change_box_style = after_change_style.get_box();
@@ -1748,21 +1748,21 @@ impl<'le> TElement for GeckoElement<'le>
 
     fn synthesize_presentational_hints_for_legacy_attributes<V>(
         &self,
         visited_handling: VisitedHandlingMode,
         hints: &mut V,
     ) where
         V: Push<ApplicableDeclarationBlock>,
     {
-        use crate::properties::longhands::_x_lang::SpecifiedValue as SpecifiedLang;
-        use crate::properties::longhands::_x_text_zoom::SpecifiedValue as SpecifiedZoom;
-        use crate::properties::longhands::color::SpecifiedValue as SpecifiedColor;
-        use crate::properties::longhands::text_align::SpecifiedValue as SpecifiedTextAlign;
-        use crate::values::specified::color::Color;
+        use properties::longhands::_x_lang::SpecifiedValue as SpecifiedLang;
+        use properties::longhands::_x_text_zoom::SpecifiedValue as SpecifiedZoom;
+        use properties::longhands::color::SpecifiedValue as SpecifiedColor;
+        use properties::longhands::text_align::SpecifiedValue as SpecifiedTextAlign;
+        use values::specified::color::Color;
         lazy_static! {
             static ref TH_RULE: ApplicableDeclarationBlock = {
                 let global_style_data = &*GLOBAL_STYLE_DATA;
                 let pdb = PropertyDeclarationBlock::with_one(
                     PropertyDeclaration::TextAlign(SpecifiedTextAlign::MozCenterOrInherit),
                     Importance::Normal,
                 );
                 let arc = Arc::new(global_style_data.shared_lock.wrap(pdb));
--- a/servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_com_ptr.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Little helpers for `nsCOMPtr`.
 
-use crate::gecko_bindings::structs::nsCOMPtr;
+use gecko_bindings::structs::nsCOMPtr;
 
 #[cfg(feature = "gecko_debug")]
 impl<T> nsCOMPtr<T> {
     /// Get this pointer as a raw pointer.
     #[inline]
     pub fn raw<U>(&self) -> *mut T {
         self.mRawPtr
     }
--- a/servo/components/style/gecko_bindings/sugar/ns_compatibility.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_compatibility.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Little helper for `nsCompatibility`.
 
-use crate::context::QuirksMode;
-use crate::gecko_bindings::structs::nsCompatibility;
+use context::QuirksMode;
+use gecko_bindings::structs::nsCompatibility;
 
 impl From<nsCompatibility> for QuirksMode {
     #[inline]
     fn from(mode: nsCompatibility) -> QuirksMode {
         match mode {
             nsCompatibility::eCompatibility_FullStandards => QuirksMode::NoQuirks,
             nsCompatibility::eCompatibility_AlmostStandards => QuirksMode::LimitedQuirks,
             nsCompatibility::eCompatibility_NavQuirks => QuirksMode::Quirks,
--- a/servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_css_shadow_array.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Rust helpers for Gecko's `nsCSSShadowArray`.
 
-use crate::gecko_bindings::bindings::Gecko_AddRefCSSShadowArrayArbitraryThread;
-use crate::gecko_bindings::bindings::Gecko_NewCSSShadowArray;
-use crate::gecko_bindings::bindings::Gecko_ReleaseCSSShadowArrayArbitraryThread;
-use crate::gecko_bindings::structs::{nsCSSShadowArray, nsCSSShadowItem, RefPtr};
+use gecko_bindings::bindings::Gecko_AddRefCSSShadowArrayArbitraryThread;
+use gecko_bindings::bindings::Gecko_NewCSSShadowArray;
+use gecko_bindings::bindings::Gecko_ReleaseCSSShadowArrayArbitraryThread;
+use gecko_bindings::structs::{nsCSSShadowArray, nsCSSShadowItem, RefPtr};
 use std::ops::{Deref, DerefMut};
 use std::{ptr, slice};
 
 impl RefPtr<nsCSSShadowArray> {
     /// Replaces the current `nsCSSShadowArray` with a new one of len `len`.
     pub fn replace_with_new(&mut self, len: u32) {
         unsafe {
             if !self.mRawPtr.is_null() {
--- a/servo/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_css_shadow_item.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Rust helpers for Gecko's `nsCSSShadowItem`.
 
 use app_units::Au;
-use crate::gecko_bindings::structs::nsCSSShadowItem;
-use crate::values::computed::effects::{BoxShadow, SimpleShadow};
+use gecko_bindings::structs::nsCSSShadowItem;
+use values::computed::effects::{BoxShadow, SimpleShadow};
 
 impl nsCSSShadowItem {
     /// Sets this item from the given box shadow.
     #[inline]
     pub fn set_from_box_shadow(&mut self, shadow: BoxShadow) {
         self.set_from_simple_shadow(shadow.base);
         self.mSpread = shadow.spread.to_i32_au();
         self.mInset = shadow.inset;
--- a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs
@@ -1,24 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Little helpers for `nsCSSValue`.
 
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs;
-use crate::gecko_bindings::structs::{nsCSSUnit, nsCSSValue};
-use crate::gecko_bindings::structs::{nsCSSValueList, nsCSSValue_Array};
-use crate::gecko_string_cache::Atom;
-use crate::values::computed::{Angle, Length, LengthOrPercentage, Percentage};
+use gecko_bindings::bindings;
+use gecko_bindings::structs;
+use gecko_bindings::structs::{nsCSSUnit, nsCSSValue};
+use gecko_bindings::structs::{nsCSSValueList, nsCSSValue_Array};
+use gecko_string_cache::Atom;
 use std::marker::PhantomData;
 use std::mem;
 use std::ops::{Index, IndexMut};
 use std::slice;
+use values::computed::{Angle, Length, LengthOrPercentage, Percentage};
 
 impl nsCSSValue {
     /// Create a CSSValue with null unit, useful to be used as a return value.
     #[inline]
     pub fn null() -> Self {
         unsafe { mem::zeroed() }
     }
 
--- a/servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Rust helpers for Gecko's `nsStyleAutoArray`.
 
-use crate::gecko_bindings::bindings::Gecko_EnsureStyleAnimationArrayLength;
-use crate::gecko_bindings::bindings::Gecko_EnsureStyleTransitionArrayLength;
-use crate::gecko_bindings::structs::nsStyleAutoArray;
-use crate::gecko_bindings::structs::{StyleAnimation, StyleTransition};
+use gecko_bindings::bindings::Gecko_EnsureStyleAnimationArrayLength;
+use gecko_bindings::bindings::Gecko_EnsureStyleTransitionArrayLength;
+use gecko_bindings::structs::nsStyleAutoArray;
+use gecko_bindings::structs::{StyleAnimation, StyleTransition};
 use std::iter::{once, Chain, IntoIterator, Once};
 use std::ops::{Index, IndexMut};
 use std::slice::{Iter, IterMut};
 
 impl<T> Index<usize> for nsStyleAutoArray<T> {
     type Output = T;
     fn index(&self, index: usize) -> &T {
         match index {
--- a/servo/components/style/gecko_bindings/sugar/ns_style_coord.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_style_coord.rs
@@ -1,18 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Rust helpers for Gecko's `nsStyleCoord`.
 
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs::{nsStyleCoord, nsStyleCoord_Calc, nsStyleCoord_CalcValue};
-use crate::gecko_bindings::structs::{nsStyleCorners, nsStyleSides};
-use crate::gecko_bindings::structs::{nsStyleUnion, nsStyleUnit, nscoord};
+use gecko_bindings::bindings;
+use gecko_bindings::structs::{nsStyleCoord, nsStyleCoord_Calc, nsStyleCoord_CalcValue};
+use gecko_bindings::structs::{nsStyleCorners, nsStyleSides, nsStyleUnion, nsStyleUnit, nscoord};
 use std::mem;
 
 impl nsStyleCoord {
     #[inline]
     /// Get a `null` nsStyleCoord.
     pub fn null() -> Self {
         // Can't construct directly because it has private fields
         let mut coord: Self = unsafe { mem::zeroed() };
@@ -262,29 +261,29 @@ pub unsafe trait CoordDataMut: CoordData
         let (unit, union) = self.values_mut();
         *unit = other.unit();
         *union = other.union();
     }
 
     /// Useful for initializing uninits, given that `set_value` may segfault on
     /// uninits.
     fn leaky_set_null(&mut self) {
-        use crate::gecko_bindings::structs::nsStyleUnit::*;
+        use gecko_bindings::structs::nsStyleUnit::*;
         unsafe {
             let (unit, union) = self.values_mut();
             *unit = eStyleUnit_Null;
             *union.mInt.as_mut() = 0;
         }
     }
 
     #[inline(always)]
     /// Sets the inner value.
     fn set_value(&mut self, value: CoordDataValue) {
         use self::CoordDataValue::*;
-        use crate::gecko_bindings::structs::nsStyleUnit::*;
+        use gecko_bindings::structs::nsStyleUnit::*;
         self.reset();
         unsafe {
             let (unit, union) = self.values_mut();
             match value {
                 Null => {
                     *unit = eStyleUnit_Null;
                     *union.mInt.as_mut() = 0;
                 },
@@ -361,17 +360,17 @@ pub unsafe trait CoordData {
     fn unit(&self) -> nsStyleUnit;
     /// Get the `nsStyleUnion` for this object.
     fn union(&self) -> nsStyleUnion;
 
     #[inline(always)]
     /// Get the appropriate value for this object.
     fn as_value(&self) -> CoordDataValue {
         use self::CoordDataValue::*;
-        use crate::gecko_bindings::structs::nsStyleUnit::*;
+        use gecko_bindings::structs::nsStyleUnit::*;
         unsafe {
             match self.unit() {
                 eStyleUnit_Null => Null,
                 eStyleUnit_Normal => Normal,
                 eStyleUnit_Auto => Auto,
                 eStyleUnit_None => None,
                 eStyleUnit_Percent => Percent(self.get_float()),
                 eStyleUnit_Factor => Factor(self.get_float()),
@@ -383,30 +382,30 @@ pub unsafe trait CoordData {
                 eStyleUnit_Calc => Calc(self.get_calc_value()),
             }
         }
     }
 
     #[inline]
     /// Pretend inner value is a float; obtain it.
     unsafe fn get_float(&self) -> f32 {
-        use crate::gecko_bindings::structs::nsStyleUnit::*;
+        use gecko_bindings::structs::nsStyleUnit::*;
         debug_assert!(
             self.unit() == eStyleUnit_Percent ||
                 self.unit() == eStyleUnit_Factor ||
                 self.unit() == eStyleUnit_Degree ||
                 self.unit() == eStyleUnit_FlexFraction
         );
         *self.union().mFloat.as_ref()
     }
 
     #[inline]
     /// Pretend inner value is an int; obtain it.
     unsafe fn get_integer(&self) -> i32 {
-        use crate::gecko_bindings::structs::nsStyleUnit::*;
+        use gecko_bindings::structs::nsStyleUnit::*;
         debug_assert!(
             self.unit() == eStyleUnit_Coord ||
                 self.unit() == eStyleUnit_Integer ||
                 self.unit() == eStyleUnit_Enumerated
         );
         *self.union().mInt.as_ref()
     }
 
--- a/servo/components/style/gecko_bindings/sugar/ns_t_array.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_t_array.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Rust helpers for Gecko's nsTArray.
 
-use crate::gecko_bindings::bindings;
-use crate::gecko_bindings::structs::{nsTArray, nsTArrayHeader};
+use gecko_bindings::bindings;
+use gecko_bindings::structs::{nsTArray, nsTArrayHeader};
 use std::mem;
 use std::ops::{Deref, DerefMut};
 use std::slice;
 
 impl<T> Deref for nsTArray<T> {
     type Target = [T];
 
     fn deref<'a>(&'a self) -> &'a [T] {
--- a/servo/components/style/gecko_bindings/sugar/origin_flags.rs
+++ b/servo/components/style/gecko_bindings/sugar/origin_flags.rs
@@ -1,23 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Helper to iterate over `OriginFlags` bits.
 
-use crate::gecko_bindings::structs::OriginFlags;
-use crate::gecko_bindings::structs::OriginFlags_Author;
-use crate::gecko_bindings::structs::OriginFlags_User;
-use crate::gecko_bindings::structs::OriginFlags_UserAgent;
-use crate::stylesheets::OriginSet;
+use gecko_bindings::structs::OriginFlags;
+use gecko_bindings::structs::OriginFlags_Author;
+use gecko_bindings::structs::OriginFlags_User;
+use gecko_bindings::structs::OriginFlags_UserAgent;
+use stylesheets::OriginSet;
 
 /// Checks that the values for OriginFlags are the ones we expect.
 pub fn assert_flags_match() {
-    use crate::stylesheets::origin::*;
+    use stylesheets::origin::*;
     debug_assert_eq!(OriginFlags_UserAgent.0, OriginSet::ORIGIN_USER_AGENT.bits());
     debug_assert_eq!(OriginFlags_Author.0, OriginSet::ORIGIN_AUTHOR.bits());
     debug_assert_eq!(OriginFlags_User.0, OriginSet::ORIGIN_USER.bits());
 }
 
 impl From<OriginFlags> for OriginSet {
     fn from(flags: OriginFlags) -> Self {
         Self::from_bits_truncate(flags.0)
--- a/servo/components/style/gecko_bindings/sugar/refptr.rs
+++ b/servo/components/style/gecko_bindings/sugar/refptr.rs
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! A rust helper to ease the use of Gecko's refcounted types.
 
-use crate::gecko_bindings::sugar::ownership::HasArcFFI;
-use crate::gecko_bindings::{bindings, structs};
-use crate::Atom;
+use gecko_bindings::sugar::ownership::HasArcFFI;
+use gecko_bindings::{bindings, structs};
 use servo_arc::Arc;
 use std::marker::PhantomData;
 use std::ops::{Deref, DerefMut};
 use std::{fmt, mem, ptr};
+use Atom;
 
 /// Trait for all objects that have Addref() and Release
 /// methods and can be placed inside RefPtr<T>
 pub unsafe trait RefCounted {
     /// Bump the reference count.
     fn addref(&self);
     /// Decrease the reference count.
     unsafe fn release(&self);
--- a/servo/components/style/gecko_bindings/sugar/style_complex_color.rs
+++ b/servo/components/style/gecko_bindings/sugar/style_complex_color.rs
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Rust helpers to interact with Gecko's StyleComplexColor.
 
-use crate::gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
-use crate::gecko_bindings::structs::StyleComplexColor;
-use crate::gecko_bindings::structs::StyleComplexColor_Tag as Tag;
-use crate::values::computed::ui::ColorOrAuto;
-use crate::values::computed::{Color as ComputedColor, RGBAColor as ComputedRGBA};
-use crate::values::generics::color::{Color as GenericColor, ComplexColorRatios};
-use crate::values::{Auto, Either};
+use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
+use gecko_bindings::structs::StyleComplexColor;
+use gecko_bindings::structs::StyleComplexColor_Tag as Tag;
+use values::computed::ui::ColorOrAuto;
+use values::computed::{Color as ComputedColor, RGBAColor as ComputedRGBA};
+use values::generics::color::{Color as GenericColor, ComplexColorRatios};
+use values::{Auto, Either};
 
 impl StyleComplexColor {
     /// Create a `StyleComplexColor` value that represents `currentColor`.
     pub fn current_color() -> Self {
         StyleComplexColor {
             mColor: 0,
             mBgRatio: 0.,
             mFgRatio: 1.,
--- a/servo/components/style/gecko_string_cache/mod.rs
+++ b/servo/components/style/gecko_string_cache/mod.rs
@@ -5,21 +5,21 @@
 #![allow(unsafe_code)]
 
 // This is needed for the constants in atom_macro.rs, because we have some
 // atoms whose names differ only by case, e.g. datetime and dateTime.
 #![allow(non_upper_case_globals)]
 
 //! A drop-in replacement for string_cache, but backed by Gecko `nsAtom`s.
 
-use crate::gecko_bindings::bindings::Gecko_AddRefAtom;
-use crate::gecko_bindings::bindings::Gecko_Atomize;
-use crate::gecko_bindings::bindings::Gecko_Atomize16;
-use crate::gecko_bindings::bindings::Gecko_ReleaseAtom;
-use crate::gecko_bindings::structs::{nsAtom, nsDynamicAtom, nsStaticAtom};
+use gecko_bindings::bindings::Gecko_AddRefAtom;
+use gecko_bindings::bindings::Gecko_Atomize;
+use gecko_bindings::bindings::Gecko_Atomize16;
+use gecko_bindings::bindings::Gecko_ReleaseAtom;
+use gecko_bindings::structs::{nsAtom, nsDynamicAtom, nsStaticAtom};
 use nsstring::{nsAString, nsStr};
 use precomputed_hash::PrecomputedHash;
 use std::borrow::{Borrow, Cow};
 use std::char::{self, DecodeUtf16};
 use std::fmt::{self, Write};
 use std::hash::{Hash, Hasher};
 use std::iter::Cloned;
 use std::ops::Deref;
--- a/servo/components/style/gecko_string_cache/namespace.rs
+++ b/servo/components/style/gecko_string_cache/namespace.rs
@@ -1,20 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! A type to represent a namespace.
 
-use crate::gecko_bindings::structs::nsAtom;
-use crate::string_cache::{Atom, WeakAtom};
+use gecko_bindings::structs::nsAtom;
 use precomputed_hash::PrecomputedHash;
 use std::borrow::Borrow;
 use std::fmt;
 use std::ops::Deref;
+use string_cache::{Atom, WeakAtom};
 
 #[macro_export]
 macro_rules! ns {
     () => {
         $crate::string_cache::Namespace(atom!(""))
     };
     ($s:tt) => {
         $crate::string_cache::Namespace(atom!($s))
--- a/servo/components/style/invalidation/element/document_state.rs
+++ b/servo/components/style/invalidation/element/document_state.rs
@@ -1,21 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! An invalidation processor for style changes due to document state changes.
 
-use crate::dom::TElement;
-use crate::element_state::DocumentState;
-use crate::invalidation::element::invalidator::{DescendantInvalidationLists, InvalidationVector};
-use crate::invalidation::element::invalidator::{Invalidation, InvalidationProcessor};
-use crate::invalidation::element::state_and_attributes;
-use crate::stylist::CascadeData;
+use dom::TElement;
+use element_state::DocumentState;
+use invalidation::element::invalidator::{DescendantInvalidationLists, InvalidationVector};
+use invalidation::element::invalidator::{Invalidation, InvalidationProcessor};
+use invalidation::element::state_and_attributes;
 use selectors::matching::{MatchingContext, MatchingMode, QuirksMode, VisitedHandlingMode};
+use stylist::CascadeData;
 
 /// A struct holding the members necessary to invalidate document state
 /// selectors.
 pub struct InvalidationMatchingData {
     /// The document state that has changed, which makes it always match.
     pub document_state: DocumentState,
 }
 
--- a/servo/components/style/invalidation/element/element_wrapper.rs
+++ b/servo/components/style/invalidation/element/element_wrapper.rs
@@ -1,25 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! A wrapper over an element and a snapshot, that allows us to selector-match
 //! against a past state of the element.
 
-use crate::dom::TElement;
-use crate::element_state::ElementState;
-use crate::selector_parser::{AttrValue, NonTSPseudoClass, PseudoElement, SelectorImpl};
-use crate::selector_parser::{Snapshot, SnapshotMap};
-use crate::{Atom, CaseSensitivityExt, LocalName, Namespace, WeakAtom};
+use dom::TElement;
+use element_state::ElementState;
+use selector_parser::{AttrValue, NonTSPseudoClass, PseudoElement, SelectorImpl};
+use selector_parser::{Snapshot, SnapshotMap};
 use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
 use selectors::matching::{ElementSelectorFlags, MatchingContext};
 use selectors::{Element, OpaqueElement};
 use std::cell::Cell;
 use std::fmt;
+use {Atom, CaseSensitivityExt, LocalName, Namespace, WeakAtom};
 
 /// In order to compute restyle hints, we perform a selector match against a
 /// list of partial selectors whose rightmost simple selector may be sensitive
 /// to the thing being changed. We do this matching twice, once for the element
 /// as it exists now and once for the element as it existed at the time of the
 /// last restyle. If the results of the selector match differ, that means that
 /// the given partial selector is sensitive to the change, and we compute a
 /// restyle hint based on its combinator.
@@ -55,17 +55,17 @@ pub trait ElementSnapshot: Sized {
     fn id_attr(&self) -> Option<&WeakAtom>;
 
     /// Whether this snapshot contains the class `name`. Should only be called
     /// if `has_attrs()` returns true.
     fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool;
 
     /// A callback that should be called for each class of the snapshot. Should
     /// only be called if `has_attrs()` returns true.
-    fn each_class<F>(&self, _: F)
+    fn each_class<F>(&self, F)
     where
         F: FnMut(&Atom);
 
     /// The `xml:lang=""` or `lang=""` attribute value per this snapshot.
     fn lang_attr(&self) -> Option<AttrValue>;
 }
 
 /// A simple wrapper over an element and a snapshot, that allows us to
--- a/servo/components/style/invalidation/element/invalidation_map.rs
+++ b/servo/components/style/invalidation/element/invalidation_map.rs
@@ -1,26 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Code for invalidations due to state or attribute changes.
 
-use crate::context::QuirksMode;
-use crate::element_state::{DocumentState, ElementState};
-use crate::selector_map::{MaybeCaseInsensitiveHashMap, SelectorMap, SelectorMapEntry};
-use crate::selector_parser::SelectorImpl;
-use crate::{Atom, LocalName, Namespace};
+use context::QuirksMode;
+use element_state::{DocumentState, ElementState};
 use fallible::FallibleVec;
 use hashglobe::FailedAllocationError;
+use selector_map::{MaybeCaseInsensitiveHashMap, SelectorMap, SelectorMapEntry};
+use selector_parser::SelectorImpl;
 use selectors::attr::NamespaceConstraint;
 use selectors::parser::{Combinator, Component};
 use selectors::parser::{Selector, SelectorIter, Visit};
 use selectors::visitor::SelectorVisitor;
 use smallvec::SmallVec;
+use {Atom, LocalName, Namespace};
 
 /// Mapping between (partial) CompoundSelectors (and the combinator to their
 /// right) and the states and attributes they depend on.
 ///
 /// In general, for all selectors in all applicable stylesheets of the form:
 ///
 /// |a _ b _ c _ d _ e|
 ///
@@ -353,17 +353,17 @@ struct CompoundSelectorDependencyCollect
     has_class_attribute_selectors: bool,
 }
 
 impl<'a> SelectorVisitor for CompoundSelectorDependencyCollector<'a> {
     type Impl = SelectorImpl;
 
     fn visit_simple_selector(&mut self, s: &Component<SelectorImpl>) -> bool {
         #[cfg(feature = "gecko")]
-        use crate::selector_parser::NonTSPseudoClass;
+        use selector_parser::NonTSPseudoClass;
 
         match *s {
             Component::ID(ref id) => {
                 self.ids.push(id.clone());
             },
             Component::Class(ref class) => {
                 self.classes.push(class.clone());
             },
--- a/servo/components/style/invalidation/element/invalidator.rs
+++ b/servo/components/style/invalidation/element/invalidator.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! The struct that takes care of encapsulating all the logic on where and how
 //! element styles need to be invalidated.
 
-use crate::context::StackLimitChecker;
-use crate::dom::{TElement, TNode, TShadowRoot};
-use crate::selector_parser::SelectorImpl;
+use context::StackLimitChecker;
+use dom::{TElement, TNode, TShadowRoot};
+use selector_parser::SelectorImpl;
 use selectors::matching::matches_compound_selector_from;
 use selectors::matching::{CompoundSelectorMatchingResult, MatchingContext};
 use selectors::parser::{Combinator, Component, Selector};
 use smallvec::SmallVec;
 use std::fmt;
 
 /// A trait to abstract the collection of invalidations for a given pass.
 pub trait InvalidationProcessor<'a, E>
--- a/servo/components/style/invalidation/element/restyle_hints.rs
+++ b/servo/components/style/invalidation/element/restyle_hints.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Restyle hints: an optimization to avoid unnecessarily matching selectors.
 
 #[cfg(feature = "gecko")]
-use crate::gecko_bindings::structs::nsRestyleHint;
-use crate::traversal_flags::TraversalFlags;
+use gecko_bindings::structs::nsRestyleHint;
+use traversal_flags::TraversalFlags;
 
 bitflags! {
     /// The kind of restyle we need to do for a given element.
     pub struct RestyleHint: u8 {
         /// Do a selector match of the element.
         const RESTYLE_SELF = 1 << 0;
 
         /// Do a selector match of the element's descendants.
@@ -188,22 +188,22 @@ impl Default for RestyleHint {
     fn default() -> Self {
         Self::empty()
     }
 }
 
 #[cfg(feature = "gecko")]
 impl From<nsRestyleHint> for RestyleHint {
     fn from(mut raw: nsRestyleHint) -> Self {
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_Force as eRestyle_Force;
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_ForceDescendants as eRestyle_ForceDescendants;
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_LaterSiblings as eRestyle_LaterSiblings;
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_Self as eRestyle_Self;
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_SomeDescendants as eRestyle_SomeDescendants;
-        use crate::gecko_bindings::structs::nsRestyleHint_eRestyle_Subtree as eRestyle_Subtree;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_Force as eRestyle_Force;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_ForceDescendants as eRestyle_ForceDescendants;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_LaterSiblings as eRestyle_LaterSiblings;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_Self as eRestyle_Self;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_SomeDescendants as eRestyle_SomeDescendants;
+        use gecko_bindings::structs::nsRestyleHint_eRestyle_Subtree as eRestyle_Subtree;
 
         let mut hint = RestyleHint::empty();
 
         debug_assert!(
             raw.0 & eRestyle_LaterSiblings.0 == 0,
             "Handle later siblings manually if necessary plz."
         );
 
@@ -236,17 +236,17 @@ impl From<nsRestyleHint> for RestyleHint
 
 #[cfg(feature = "servo")]
 malloc_size_of_is_0!(RestyleHint);
 
 /// Asserts that all replacement hints have a matching nsRestyleHint value.
 #[cfg(feature = "gecko")]
 #[inline]
 pub fn assert_restyle_hints_match() {
-    use crate::gecko_bindings::structs;
+    use gecko_bindings::structs;
 
     macro_rules! check_restyle_hints {
         ( $( $a:ident => $b:path),*, ) => {
             if cfg!(debug_assertions) {
                 let mut replacements = RestyleHint::replacements();
                 $(
                     assert_eq!(structs::$a.0 as usize, $b.bits() as usize, stringify!($b));
                     replacements.remove($b);
--- a/servo/components/style/invalidation/element/state_and_attributes.rs
+++ b/servo/components/style/invalidation/element/state_and_attributes.rs
@@ -1,33 +1,33 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! An invalidation processor for style changes due to state and attribute
 //! changes.
 
-use crate::context::SharedStyleContext;
-use crate::data::ElementData;
-use crate::dom::TElement;
-use crate::element_state::ElementState;
-use crate::invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
-use crate::invalidation::element::invalidation_map::*;
-use crate::invalidation::element::invalidator::{DescendantInvalidationLists, InvalidationVector};
-use crate::invalidation::element::invalidator::{Invalidation, InvalidationProcessor};
-use crate::invalidation::element::restyle_hints::RestyleHint;
-use crate::selector_map::SelectorMap;
-use crate::selector_parser::Snapshot;
-use crate::stylesheets::origin::{Origin, OriginSet};
-use crate::{Atom, WeakAtom};
+use context::SharedStyleContext;
+use data::ElementData;
+use dom::TElement;
+use element_state::ElementState;
+use invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
+use invalidation::element::invalidation_map::*;
+use invalidation::element::invalidator::{DescendantInvalidationLists, InvalidationVector};
+use invalidation::element::invalidator::{Invalidation, InvalidationProcessor};
+use invalidation::element::restyle_hints::RestyleHint;
+use selector_map::SelectorMap;
+use selector_parser::Snapshot;
 use selectors::attr::CaseSensitivity;
 use selectors::matching::matches_selector;
 use selectors::matching::{MatchingContext, MatchingMode, VisitedHandlingMode};
 use selectors::NthIndexCache;
 use smallvec::SmallVec;
+use stylesheets::origin::{Origin, OriginSet};
+use {Atom, WeakAtom};
 
 /// The collector implementation.
 struct Collector<'a, 'b: 'a, 'selectors: 'a, E>
 where
     E: TElement,
 {
     element: E,
     wrapper: ElementWrapper<'b, E>,
--- a/servo/components/style/invalidation/media_queries.rs
+++ b/servo/components/style/invalidation/media_queries.rs
@@ -1,20 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Code related to the invalidation of media-query-affected rules.
 
-use crate::context::QuirksMode;
-use crate::media_queries::Device;
-use crate::shared_lock::SharedRwLockReadGuard;
-use crate::stylesheets::{DocumentRule, ImportRule, MediaRule};
-use crate::stylesheets::{NestedRuleIterationCondition, Stylesheet, SupportsRule};
+use context::QuirksMode;
 use fxhash::FxHashSet;
+use media_queries::Device;
+use shared_lock::SharedRwLockReadGuard;
+use stylesheets::{DocumentRule, ImportRule, MediaRule};
+use stylesheets::{NestedRuleIterationCondition, Stylesheet, SupportsRule};
 
 /// A key for a given media query result.
 ///
 /// NOTE: It happens to be the case that all the media lists we care about
 /// happen to have a stable address, so we can just use an opaque pointer to
 /// represent them.
 ///
 /// Also, note that right now when a rule or stylesheet is removed, we do a full
@@ -110,23 +110,23 @@ impl NestedRuleIterationCondition for Po
 
     /// Whether we should process the nested rules in a given `@-moz-document` rule.
     fn process_document(
         guard: &SharedRwLockReadGuard,
         device: &Device,
         quirks_mode: QuirksMode,
         rule: &DocumentRule,
     ) -> bool {
-        use crate::stylesheets::EffectiveRules;
+        use stylesheets::EffectiveRules;
         EffectiveRules::process_document(guard, device, quirks_mode, rule)
     }
 
     /// Whether we should process the nested rules in a given `@supports` rule.
     fn process_supports(
         guard: &SharedRwLockReadGuard,
         device: &Device,
         quirks_mode: QuirksMode,
         rule: &SupportsRule,
     ) -> bool {
-        use crate::stylesheets::EffectiveRules;
+        use stylesheets::EffectiveRules;
         EffectiveRules::process_supports(guard, device, quirks_mode, rule)
     }
 }
--- a/servo/components/style/invalidation/stylesheets.rs
+++ b/servo/components/style/invalidation/stylesheets.rs
@@ -2,29 +2,29 @@
  * 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/. */
 
 //! A collection of invalidations due to changes in which stylesheets affect a
 //! document.
 
 #![deny(unsafe_code)]
 
-use crate::dom::{TDocument, TElement, TNode};
-use crate::invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
-use crate::invalidation::element::restyle_hints::RestyleHint;
-use crate::media_queries::Device;
-use crate::selector_parser::{SelectorImpl, Snapshot, SnapshotMap};
-use crate::shared_lock::SharedRwLockReadGuard;
-use crate::stylesheets::{CssRule, StylesheetInDocument};
-use crate::Atom;
-use crate::CaseSensitivityExt;
-use crate::LocalName as SelectorLocalName;
+use dom::{TDocument, TElement, TNode};
 use fxhash::FxHashSet;
+use invalidation::element::element_wrapper::{ElementSnapshot, ElementWrapper};
+use invalidation::element::restyle_hints::RestyleHint;
+use media_queries::Device;
+use selector_parser::{SelectorImpl, Snapshot, SnapshotMap};
 use selectors::attr::CaseSensitivity;
 use selectors::parser::{Component, LocalName, Selector};
+use shared_lock::SharedRwLockReadGuard;
+use stylesheets::{CssRule, StylesheetInDocument};
+use Atom;
+use CaseSensitivityExt;
+use LocalName as SelectorLocalName;
 
 /// A style sheet invalidation represents a kind of element or subtree that may
 /// need to be restyled. Whether it represents a whole subtree or just a single
 /// element is determined by whether the invalidation is stored in the
 /// StylesheetInvalidationSet's invalid_scopes or invalid_elements table.
 #[derive(Debug, Eq, Hash, MallocSizeOf, PartialEq)]
 enum Invalidation {
     /// An element with a given id.
@@ -414,17 +414,17 @@ impl StylesheetInvalidationSet {
 
     /// Collects invalidations for a given CSS rule.
     fn collect_invalidations_for_rule(
         &mut self,
         rule: &CssRule,
         guard: &SharedRwLockReadGuard,
         device: &Device,
     ) {
-        use crate::stylesheets::CssRule::*;
+        use stylesheets::CssRule::*;
         debug!("StylesheetInvalidationSet::collect_invalidations_for_rule");
         debug_assert!(!self.fully_invalid, "Not worth to be here!");
 
         match *rule {
             Style(ref lock) => {
                 let style_rule = lock.read_with(guard);
                 for selector in &style_rule.selectors.0 {
                     self.collect_invalidations(selector);
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -161,25 +161,25 @@ pub mod timer;
 pub mod traversal;
 pub mod traversal_flags;
 pub mod use_counters;
 #[macro_use]
 #[allow(non_camel_case_types)]
 pub mod values;
 
 #[cfg(feature = "gecko")]
-pub use crate::gecko_string_cache as string_cache;
+pub use gecko_string_cache as string_cache;
 #[cfg(feature = "gecko")]
-pub use crate::gecko_string_cache::Atom;
+pub use gecko_string_cache::Atom;
 #[cfg(feature = "gecko")]
-pub use crate::gecko_string_cache::Atom as Prefix;
+pub use gecko_string_cache::Atom as Prefix;
 #[cfg(feature = "gecko")]
-pub use crate::gecko_string_cache::Atom as LocalName;
+pub use gecko_string_cache::Atom as LocalName;
 #[cfg(feature = "gecko")]
-pub use crate::gecko_string_cache::Namespace;
+pub use gecko_string_cache::Namespace;
 
 #[cfg(feature = "servo")]
 pub use html5ever::LocalName;
 #[cfg(feature = "servo")]
 pub use html5ever::Namespace;
 #[cfg(feature = "servo")]
 pub use html5ever::Prefix;
 #[cfg(feature = "servo")]
@@ -211,27 +211,27 @@ pub mod gecko_properties {
 
 macro_rules! reexport_computed_values {
     ( $( { $name: ident, $boxed: expr } )+ ) => {
         /// Types for [computed values][computed].
         ///
         /// [computed]: https://drafts.csswg.org/css-cascade/#computed
         pub mod computed_values {
             $(
-                pub use crate::properties::longhands::$name::computed_value as $name;
+                pub use properties::longhands::$name::computed_value as $name;
             )+
             // Don't use a side-specific name needlessly:
-            pub use crate::properties::longhands::border_top_style::computed_value as border_style;
+            pub use properties::longhands::border_top_style::computed_value as border_style;
         }
     }
 }
 longhand_properties_idents!(reexport_computed_values);
 
 #[cfg(feature = "gecko")]
-use crate::gecko_string_cache::WeakAtom;
+use gecko_string_cache::WeakAtom;
 #[cfg(feature = "servo")]
 use servo_atoms::Atom as WeakAtom;
 
 /// Extension methods for selectors::attr::CaseSensitivity
 pub trait CaseSensitivityExt {
     /// Return whether two atoms compare equal according to this case sensitivity.
     fn eq_atom(self, a: &WeakAtom, b: &WeakAtom) -> bool;
 }
--- a/servo/components/style/logical_geometry.rs
+++ b/servo/components/style/logical_geometry.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Geometry in flow-relative space.
 
-use crate::properties::style_structs;
 use euclid::num::Zero;
 use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
+use properties::style_structs;
 use std::cmp::{max, min};
 use std::fmt::{self, Debug, Error, Formatter};
 use std::ops::{Add, Sub};
 use unicode_bidi as bidi;
 
 pub enum BlockFlowDirection {
     TopToBottom,
     RightToLeft,
@@ -37,18 +37,18 @@ bitflags!(
         const SIDEWAYS = 1 << 4;
         const UPRIGHT = 1 << 5;
     }
 );
 
 impl WritingMode {
     /// Return a WritingMode bitflags from the relevant CSS properties.
     pub fn new(inheritedbox_style: &style_structs::InheritedBox) -> Self {
-        use crate::properties::longhands::direction::computed_value::T as Direction;
-        use crate::properties::longhands::writing_mode::computed_value::T as SpecifiedWritingMode;
+        use properties::longhands::direction::computed_value::T as Direction;
+        use properties::longhands::writing_mode::computed_value::T as SpecifiedWritingMode;
 
         let mut flags = WritingMode::empty();
 
         match inheritedbox_style.clone_direction() {
             Direction::Ltr => {},
             Direction::Rtl => {
                 flags.insert(WritingMode::RTL);
             },
@@ -74,17 +74,17 @@ impl WritingMode {
                 flags.insert(WritingMode::VERTICAL_LR);
                 flags.insert(WritingMode::LINE_INVERTED);
                 flags.insert(WritingMode::SIDEWAYS);
             },
         }
 
         #[cfg(feature = "gecko")]
         {
-            use crate::properties::longhands::text_orientation::computed_value::T as TextOrientation;
+            use properties::longhands::text_orientation::computed_value::T as TextOrientation;
 
             // If FLAG_SIDEWAYS is already set, this means writing-mode is
             // either sideways-rl or sideways-lr, and for both of these values,
             // text-orientation has no effect.
             if !flags.intersects(WritingMode::SIDEWAYS) {
                 match inheritedbox_style.clone_text_orientation() {
                     TextOrientation::Mixed => {},
                     TextOrientation::Upright => {
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -2,29 +2,29 @@
  * 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/. */
 
 //! High-level interface to CSS selector matching.
 
 #![allow(unsafe_code)]
 #![deny(missing_docs)]
 
-use crate::context::{ElementCascadeInputs, QuirksMode, SelectorFlagsMap};
-use crate::context::{SharedStyleContext, StyleContext};
-use crate::data::ElementData;
-use crate::dom::TElement;
-use crate::invalidation::element::restyle_hints::RestyleHint;
-use crate::properties::longhands::display::computed_value::T as Display;
-use crate::properties::ComputedValues;
-use crate::rule_tree::{CascadeLevel, StrongRuleNode};
-use crate::selector_parser::{PseudoElement, RestyleDamage};
-use crate::style_resolver::ResolvedElementStyles;
-use crate::traversal_flags::TraversalFlags;
+use context::{ElementCascadeInputs, QuirksMode, SelectorFlagsMap};
+use context::{SharedStyleContext, StyleContext};
+use data::ElementData;
+use dom::TElement;
+use invalidation::element::restyle_hints::RestyleHint;
+use properties::longhands::display::computed_value::T as Display;
+use properties::ComputedValues;
+use rule_tree::{CascadeLevel, StrongRuleNode};
+use selector_parser::{PseudoElement, RestyleDamage};
 use selectors::matching::ElementSelectorFlags;
 use servo_arc::{Arc, ArcBorrow};
+use style_resolver::ResolvedElementStyles;
+use traversal_flags::TraversalFlags;
 
 /// Represents the result of comparing an element's old and new style.
 #[derive(Debug)]
 pub struct StyleDifference {
     /// The resulting damage.
     pub damage: RestyleDamage,
 
     /// Whether any styles changed.
@@ -88,18 +88,18 @@ trait PrivateMatchMethods: TElement {
     /// Returns true if an !important rule was replaced.
     fn replace_rules_internal(
         &self,
         replacements: RestyleHint,
         context: &mut StyleContext<Self>,
         cascade_visited: CascadeVisitedMode,
         cascade_inputs: &mut ElementCascadeInputs,
     ) -> bool {
-        use crate::properties::PropertyDeclarationBlock;
-        use crate::shared_lock::Locked;
+        use properties::PropertyDeclarationBlock;
+        use shared_lock::Locked;
 
         debug_assert!(
             replacements.intersects(RestyleHint::replacements()) &&
                 (replacements & !RestyleHint::replacements()).is_empty()
         );
 
         let stylist = &context.shared.stylist;
         let guards = &context.shared.guards;
@@ -190,19 +190,19 @@ trait PrivateMatchMethods: TElement {
 
     /// If there is no transition rule in the ComputedValues, it returns None.
     #[cfg(feature = "gecko")]
     fn after_change_style(
         &self,
         context: &mut StyleContext<Self>,
         primary_style: &Arc<ComputedValues>,
     ) -> Option<Arc<ComputedValues>> {
-        use crate::context::CascadeInputs;
-        use crate::style_resolver::{PseudoElementResolution, StyleResolverForElement};
-        use crate::stylist::RuleInclusion;
+        use context::CascadeInputs;
+        use style_resolver::{PseudoElementResolution, StyleResolverForElement};
+        use stylist::RuleInclusion;
 
         let rule_node = primary_style.rules();
         let without_transition_rules = context
             .shared
             .stylist
             .rule_tree()
             .remove_transition_rule_if_applicable(rule_node);
         if without_transition_rules == *rule_node {
@@ -302,17 +302,17 @@ trait PrivateMatchMethods: TElement {
     #[cfg(feature = "gecko")]
     fn handle_display_change_for_smil_if_needed(
         &self,
         context: &mut StyleContext<Self>,
         old_values: Option<&ComputedValues>,
         new_values: &ComputedValues,
         restyle_hints: RestyleHint,
     ) {
-        use crate::context::PostAnimationTasks;
+        use context::PostAnimationTasks;
 
         if !restyle_hints.intersects(RestyleHint::RESTYLE_SMIL) {
             return;
         }
 
         if new_values.is_display_property_changed_from_none(old_values) {
             // When display value is changed from none to other, we need to
             // traverse descendant elements in a subsequent normal
@@ -332,17 +332,17 @@ trait PrivateMatchMethods: TElement {
     fn process_animations(
         &self,
         context: &mut StyleContext<Self>,
         old_values: &mut Option<Arc<ComputedValues>>,
         new_values: &mut Arc<ComputedValues>,
         restyle_hint: RestyleHint,
         important_rules_changed: bool,
     ) {
-        use crate::context::UpdateAnimationsTasks;
+        use context::UpdateAnimationsTasks;
 
         if context.shared.traversal_flags.for_animation_only() {
             self.handle_display_change_for_smil_if_needed(
                 context,
                 old_values.as_ref().map(|v| &**v),
                 new_values,
                 restyle_hint,
             );
@@ -414,18 +414,18 @@ trait PrivateMatchMethods: TElement {
     fn process_animations(
         &self,
         context: &mut StyleContext<Self>,
         old_values: &mut Option<Arc<ComputedValues>>,
         new_values: &mut Arc<ComputedValues>,
         _restyle_hint: RestyleHint,
         _important_rules_changed: bool,
     ) {
-        use crate::animation;
-        use crate::dom::TNode;
+        use animation;
+        use dom::TNode;
 
         let mut possibly_expired_animations = vec![];
         let shared_context = context.shared;
         if let Some(ref mut old) = *old_values {
             // FIXME(emilio, #20116): This makes no sense.
             self.update_animations_for_cascade(
                 shared_context,
                 old,
@@ -533,17 +533,17 @@ trait PrivateMatchMethods: TElement {
 
         // Children with justify-items: auto may depend on our
         // justify-items property value.
         //
         // Similarly, we could potentially do better, but this really
         // seems not common enough to care about.
         #[cfg(feature = "gecko")]
         {
-            use crate::values::specified::align::AlignFlags;
+            use values::specified::align::AlignFlags;
 
             let old_justify_items = old_values.get_position().clone_justify_items();
             let new_justify_items = new_values.get_position().clone_justify_items();
 
             let was_legacy_justify_items =
                 old_justify_items.computed.0.contains(AlignFlags::LEGACY);
 
             let is_legacy_justify_items = new_justify_items.computed.0.contains(AlignFlags::LEGACY);
@@ -578,21 +578,21 @@ trait PrivateMatchMethods: TElement {
     // Also, this function gets the old style, for some reason I don't really
     // get, but the functions called (mainly update_style_for_animation) expects
     // the new style, wtf?
     #[cfg(feature = "servo")]
     fn update_animations_for_cascade(
         &self,
         context: &SharedStyleContext,
         style: &mut Arc<ComputedValues>,
-        possibly_expired_animations: &mut Vec<crate::animation::PropertyAnimation>,
-        font_metrics: &crate::font_metrics::FontMetricsProvider,
+        possibly_expired_animations: &mut Vec<::animation::PropertyAnimation>,
+        font_metrics: &::font_metrics::FontMetricsProvider,
     ) {
-        use crate::animation::{self, Animation, AnimationUpdate};
-        use crate::dom::TNode;
+        use animation::{self, Animation, AnimationUpdate};
+        use dom::TNode;
 
         // Finish any expired transitions.
         let this_opaque = self.as_node().opaque();
         animation::complete_expired_transitions(this_opaque, style, context);
 
         // Merge any running animations into the current style, and cancel them.
         let had_running_animations = context
             .running_animations
--- a/servo/components/style/media_queries/media_condition.rs
+++ b/servo/components/style/media_queries/media_condition.rs
@@ -2,19 +2,19 @@
  * 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/. */
 
 //! A media query condition:
 //!
 //! https://drafts.csswg.org/mediaqueries-4/#typedef-media-condition
 
 use super::{Device, MediaFeatureExpression};
-use crate::context::QuirksMode;
-use crate::parser::ParserContext;
+use context::QuirksMode;
 use cssparser::{Parser, Token};
+use parser::ParserContext;
 use std::fmt::{self, Write};
 use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
 
 /// A binary `and` or `or` operator.
 #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)]
 #[allow(missing_docs)]
 pub enum Operator {
     And,
--- a/servo/components/style/media_queries/media_feature.rs
+++ b/servo/components/style/media_queries/media_feature.rs
@@ -1,22 +1,22 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! Media features.
 
 use super::media_feature_expression::{AspectRatio, RangeOrOperator};
 use super::Device;
-use crate::parser::ParserContext;
-use crate::values::computed::{CSSPixelLength, Resolution};
-use crate::Atom;
 use cssparser::Parser;
+use parser::ParserContext;
 use std::fmt;
 use style_traits::ParseError;
+use values::computed::{CSSPixelLength, Resolution};
+use Atom;
 
 /// A generic discriminant for an enum value.
 pub type KeywordDiscriminant = u8;
 
 type MediaFeatureEvaluator<T> = fn(
     device: &Device,
     // null == no value was given in the query.
     value: Option<T>,
--- a/servo/components/style/media_queries/media_feature_expression.rs
+++ b/servo/components/style/media_queries/media_feature_expression.rs
@@ -3,31 +3,31 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! Parsing for media feature expressions, like `(foo: bar)` or
 //! `(width >= 400px)`.
 
 use super::media_feature::{Evaluator, MediaFeatureDescription};
 use super::media_feature::{KeywordDiscriminant, ParsingRequirements};
 use super::Device;
-use crate::context::QuirksMode;
+use context::QuirksMode;
+use cssparser::{Parser, Token};
 #[cfg(feature = "gecko")]
-use crate::gecko_bindings::structs;
-use crate::parser::{Parse, ParserContext};
-use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
-use crate::stylesheets::Origin;
-use crate::values::computed::{self, ToComputedValue};
-use crate::values::specified::{Integer, Length, Number, Resolution};
-use crate::values::{serialize_atom_identifier, CSSFloat};
-use crate::Atom;
-use cssparser::{Parser, Token};
+use gecko_bindings::structs;
 use num_traits::Zero;
+use parser::{Parse, ParserContext};
 use std::cmp::{Ordering, PartialOrd};
 use std::fmt::{self, Write};
+use str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
 use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
+use stylesheets::Origin;
+use values::computed::{self, ToComputedValue};
+use values::specified::{Integer, Length, Number, Resolution};
+use values::{serialize_atom_identifier, CSSFloat};
+use Atom;
 
 /// An aspect ratio, with a numerator and denominator.
 #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq)]
 pub struct AspectRatio(pub u32, pub u32);
 
 impl ToCss for AspectRatio {
     fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
     where
@@ -266,19 +266,19 @@ impl MediaFeatureExpression {
 
     /// Parse a media feature expression where we've already consumed the
     /// parenthesis.
     pub fn parse_in_parenthesis_block<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         #[cfg(feature = "gecko")]
-        use crate::gecko::media_features::MEDIA_FEATURES;
+        use gecko::media_features::MEDIA_FEATURES;
         #[cfg(feature = "servo")]
-        use crate::servo::media_queries::MEDIA_FEATURES;
+        use servo::media_queries::MEDIA_FEATURES;
 
         // FIXME: remove extra indented block when lifetimes are non-lexical
         let feature;
         let range;
         {
             let location = input.current_source_location();
             let ident = input.expect_ident()?;
 
--- a/servo/components/style/media_queries/media_list.rs
+++ b/servo/components/style/media_queries/media_list.rs
@@ -2,21 +2,21 @@
  * 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/. */
 
 //! A media query list:
 //!
 //! https://drafts.csswg.org/mediaqueries/#typedef-media-query-list
 
 use super::{Device, MediaQuery, Qualifier};
-use crate::context::QuirksMode;
-use crate::error_reporting::ContextualParseError;
-use crate::parser::ParserContext;
+use context::QuirksMode;
 use cssparser::{Delimiter, Parser};
 use cssparser::{ParserInput, Token};
+use error_reporting::ContextualParseError;
+use parser::ParserContext;
 
 /// A type that encapsulates a media query list.
 #[css(comma, derive_debug)]
 #[derive(Clone, MallocSizeOf, ToCss)]
 pub struct MediaList {
     /// The list of media queries.
     #[css(iterable)]
     pub media_queries: Vec<MediaQuery>,
--- a/servo/components/style/media_queries/media_query.rs
+++ b/servo/components/style/media_queries/media_query.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/. */
 
 //! A media query:
 //!
 //! https://drafts.csswg.org/mediaqueries/#typedef-media-query
 
 use super::media_condition::MediaCondition;
-use crate::parser::ParserContext;
-use crate::str::string_as_ascii_lowercase;
-use crate::values::CustomIdent;
-use crate::Atom;
 use cssparser::Parser;
+use parser::ParserContext;
 use std::fmt::{self, Write};
+use str::string_as_ascii_lowercase;
 use style_traits::{CssWriter, ParseError, ToCss};
+use values::CustomIdent;
+use Atom;
 
 /// <https://drafts.csswg.org/mediaqueries/#mq-prefix>
 #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)]
 pub enum Qualifier {
     /// Hide a media query from legacy UAs:
     /// <https://drafts.csswg.org/mediaqueries/#mq-only>
     Only,
     /// Negate a media query:
--- a/servo/components/style/media_queries/mod.rs
+++ b/servo/components/style/media_queries/mod.rs
@@ -14,11 +14,11 @@ pub mod media_feature;
 pub mod media_feature_expression;
 
 pub use self::media_condition::MediaCondition;
 pub use self::media_feature_expression::MediaFeatureExpression;
 pub use self::media_list::MediaList;
 pub use self::media_query::{MediaQuery, MediaQueryType, MediaType, Qualifier};
 
 #[cfg(feature = "gecko")]
-pub use crate::gecko::media_queries::Device;
+pub use gecko::media_queries::Device;
 #[cfg(feature = "servo")]
-pub use crate::servo::media_queries::Device;
+pub use servo::media_queries::Device;
--- a/servo/components/style/parallel.rs
+++ b/servo/components/style/parallel.rs
@@ -18,23 +18,23 @@
 //! invoke |unsafe { SendNode::new(n) }| to put nodes in containers that may
 //! be sent to other threads. This occurs in only a handful of places and is
 //! easy to grep for. At the time of this writing, there is no other unsafe
 //! code in the parallel traversal.
 
 #![deny(missing_docs)]
 
 use arrayvec::ArrayVec;
-use crate::context::{StyleContext, ThreadLocalStyleContext};
-use crate::dom::{OpaqueNode, SendNode, TElement};
-use crate::scoped_tls::ScopedTLS;
-use crate::traversal::{DomTraversal, PerLevelTraversalData};
+use context::{StyleContext, ThreadLocalStyleContext};
+use dom::{OpaqueNode, SendNode, TElement};
 use itertools::Itertools;
 use rayon;
+use scoped_tls::ScopedTLS;
 use smallvec::SmallVec;
+use traversal::{DomTraversal, PerLevelTraversalData};
 
 /// The minimum stack size for a thread in the styling pool, in kilobytes.
 pub const STYLE_THREAD_STACK_SIZE_KB: usize = 256;
 
 /// The stack margin. If we get this deep in the stack, we will skip recursive
 /// optimizations to ensure that there is sufficient room for non-recursive work.
 ///
 /// We allocate large safety margins because certain OS calls can use very large
--- a/servo/components/style/parser.rs
+++ b/servo/components/style/parser.rs
@@ -1,26 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! The context within which CSS code is parsed.
 
-use crate::context::QuirksMode;
-use crate::error_reporting::{ContextualParseError, ParseErrorReporter};
-use crate::stylesheets::{CssRuleType, Namespaces, Origin, UrlExtraData};
-use crate::use_counters::UseCounters;
+use context::QuirksMode;
 use cssparser::{Parser, SourceLocation, UnicodeRange};
+use error_reporting::{ContextualParseError, ParseErrorReporter};
 use style_traits::{OneOrMoreSeparated, ParseError, ParsingMode, Separator};
+use stylesheets::{CssRuleType, Namespaces, Origin, UrlExtraData};
+use use_counters::UseCounters;
 
 /// Asserts that all ParsingMode flags have a matching ParsingMode value in gecko.
 #[cfg(feature = "gecko")]
 #[inline]
 pub fn assert_parsing_mode_match() {
-    use crate::gecko_bindings::structs;
+    use gecko_bindings::structs;
 
     macro_rules! check_parsing_modes {
         ( $( $a:ident => $b:path ),*, ) => {
             if cfg!(debug_assertions) {
                 let mut modes = ParsingMode::all();
                 $(
                     assert_eq!(structs::$a as usize, $b.bits() as usize, stringify!($b));
                     modes.remove($b);
--- a/servo/components/style/properties/cascade.rs
+++ b/servo/components/style/properties/cascade.rs
@@ -1,35 +1,35 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! The main cascading algorithm of the style system.
 
-use crate::context::QuirksMode;
-use crate::custom_properties::CustomPropertiesBuilder;
-use crate::dom::TElement;
-use crate::font_metrics::FontMetricsProvider;
-use crate::logical_geometry::WritingMode;
-use crate::media_queries::Device;
-use crate::properties::{ComputedValues, StyleBuilder};
-use crate::properties::{LonghandId, LonghandIdSet};
-use crate::properties::{PropertyDeclaration, PropertyDeclarationId, DeclarationImportanceIterator};
-use crate::properties::CASCADE_PROPERTY;
-use crate::rule_cache::{RuleCache, RuleCacheConditions};
-use crate::rule_tree::{CascadeLevel, StrongRuleNode};
-use crate::selector_parser::PseudoElement;
+use context::QuirksMode;
+use custom_properties::CustomPropertiesBuilder;
+use dom::TElement;
+use font_metrics::FontMetricsProvider;
+use logical_geometry::WritingMode;
+use media_queries::Device;
+use properties::{ComputedValues, StyleBuilder};
+use properties::{LonghandId, LonghandIdSet};
+use properties::{PropertyDeclaration, PropertyDeclarationId, DeclarationImportanceIterator};
+use properties::CASCADE_PROPERTY;
+use rule_cache::{RuleCache, RuleCacheConditions};
+use rule_tree::{CascadeLevel, StrongRuleNode};
+use selector_parser::PseudoElement;
 use servo_arc::Arc;
-use crate::shared_lock::StylesheetGuards;
+use shared_lock::StylesheetGuards;
 use smallbitvec::SmallBitVec;
 use smallvec::SmallVec;
 use std::borrow::Cow;
 use std::cell::RefCell;
-use crate::style_adjuster::StyleAdjuster;
-use crate::values::computed;
+use style_adjuster::StyleAdjuster;
+use values::computed;
 
 /// We split the cascade in two phases: 'early' properties, and 'late'
 /// properties.
 ///
 /// Early properties are the ones that don't have dependencies _and_ other
 /// properties depend on, for example, writing-mode related properties, color
 /// (for currentColor), or font-size (for em, etc).
 ///
@@ -740,17 +740,17 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
                 }
 
                 // FIXME(emilio): Why both setting the generic and passing it
                 // down?
                 let pres_context = self.context.builder.device.pres_context();
                 let gecko_font = self.context.builder.mutate_font().gecko_mut();
                 gecko_font.mGenericID = generic;
                 unsafe {
-                    crate::gecko_bindings::bindings::Gecko_nsStyleFont_PrefillDefaultForGeneric(
+                    ::gecko_bindings::bindings::Gecko_nsStyleFont_PrefillDefaultForGeneric(
                         gecko_font,
                         pres_context,
                         generic,
                     );
                 }
             }
         }
 
@@ -791,17 +791,17 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
         } else {
             #[cfg(feature = "gecko")]
             {
                 if self.seen.contains(LonghandId::XLang) ||
                     self.seen.contains(LonghandId::MozScriptLevel) ||
                     self.seen.contains(LonghandId::MozMinFontSizeRatio) ||
                     self.seen.contains(LonghandId::FontFamily)
                 {
-                    use crate::properties::{CSSWideKeyword, WideKeywordDeclaration};
+                    use properties::{CSSWideKeyword, WideKeywordDeclaration};
 
                     // font-size must be explicitly inherited to handle lang
                     // changes and scriptlevel changes.
                     //
                     // FIXME(emilio): That looks a bit bogus...
                     let inherit = PropertyDeclaration::CSSWideKeyword(WideKeywordDeclaration {
                         id: LonghandId::FontSize,
                         keyword: CSSWideKeyword::Inherit,
--- 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 "crate::values::specified::{}".format(self.predefined_type)
+            return "::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 = "crate::values::specified::{}".format(self.predefined_type)
+            ty = "::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/declaration_block.rs
+++ b/servo/components/style/properties/declaration_block.rs
@@ -1,35 +1,35 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 //! A property declaration block.
 
 #![deny(missing_docs)]
 
-use crate::context::QuirksMode;
+use context::QuirksMode;
 use cssparser::{DeclarationListParser, parse_important, ParserInput, CowRcStr};
 use cssparser::{Parser, AtRuleParser, DeclarationParser, Delimiter, ParseErrorKind};
-use crate::custom_properties::{CustomPropertiesBuilder, CssEnvironment};
-use crate::error_reporting::{ParseErrorReporter, ContextualParseError};
+use custom_properties::{CustomPropertiesBuilder, CssEnvironment};
+use error_reporting::{ParseErrorReporter, ContextualParseError};
 use itertools::Itertools;
-use crate::parser::ParserContext;
-use crate::properties::animated_properties::{AnimationValue, AnimationValueMap};
-use crate::shared_lock::Locked;
+use parser::ParserContext;
+use properties::animated_properties::{AnimationValue, AnimationValueMap};
+use shared_lock::Locked;
 use smallbitvec::{self, SmallBitVec};
 use smallvec::SmallVec;
 use std::fmt::{self, Write};
 use std::iter::{DoubleEndedIterator, Zip};
 use std::slice::Iter;
-use crate::str::{CssString, CssStringBorrow, CssStringWriter};
+use str::{CssString, CssStringBorrow, CssStringWriter};
 use style_traits::{CssWriter, ParseError, ParsingMode, StyleParseErrorKind, ToCss};
-use crate::stylesheets::{CssRuleType, Origin, UrlExtraData};
+use stylesheets::{CssRuleType, Origin, UrlExtraData};
 use super::*;
-use crate::values::computed::Context;
+use values::computed::Context;
 
 /// The animation rules.
 ///
 /// The first one is for Animation cascade level, and the second one is for
 /// Transition cascade level.
 pub struct AnimationRules(pub Option<Arc<Locked<PropertyDeclarationBlock>>>,
                           pub Option<Arc<Locked<PropertyDeclarationBlock>>>);
 
@@ -139,25 +139,25 @@ impl<'a> DoubleEndedIterator for Declara
 }
 
 /// Iterator for AnimationValue to be generated from PropertyDeclarationBlock.
 pub struct AnimationValueIterator<'a, 'cx, 'cx_a:'cx> {
     iter: DeclarationImportanceIterator<'a>,
     context: &'cx mut Context<'cx_a>,
     default_values: &'a ComputedValues,
     /// Custom properties in a keyframe if exists.
-    extra_custom_properties: Option<&'a Arc<crate::custom_properties::CustomPropertiesMap>>,
+    extra_custom_properties: Option<&'a Arc<::custom_properties::CustomPropertiesMap>>,
 }
 
 impl<'a, 'cx, 'cx_a:'cx> AnimationValueIterator<'a, 'cx, 'cx_a> {
     fn new(
         declarations: &'a PropertyDeclarationBlock,
         context: &'cx mut Context<'cx_a>,
         default_values: &'a ComputedValues,
-        extra_custom_properties: Option<&'a Arc<crate::custom_properties::CustomPropertiesMap>>,
+        extra_custom_properties: Option<&'a Arc<::custom_properties::CustomPropertiesMap>>,
     ) -> AnimationValueIterator<'a, 'cx, 'cx_a> {
         AnimationValueIterator {
             iter: declarations.declaration_importance_iter(),
             context,
             default_values,
             extra_custom_properties,
         }
     }
@@ -253,17 +253,17 @@ impl PropertyDeclarationBlock {
     }
 
     /// Return an iterator of (AnimatableLonghand, AnimationValue).
     #[inline]
     pub fn to_animation_value_iter<'a, 'cx, 'cx_a:'cx>(
         &'a self,
         context: &'cx mut Context<'cx_a>,
         default_values: &'a ComputedValues,
-        extra_custom_properties: Option<&'a Arc<crate::custom_properties::CustomPropertiesMap>>,
+        extra_custom_properties: Option<&'a Arc<::custom_properties::CustomPropertiesMap>>,
     ) -> AnimationValueIterator<'a, 'cx, 'cx_a> {
         AnimationValueIterator::new(self, context, default_values, extra_custom_properties)
     }
 
     /// Returns whether this block contains any declaration with `!important`.
     ///
     /// This is based on the `declarations_importance` bit-vector,
     /// which should be maintained whenever `declarations` is changed.
@@ -462,17 +462,17 @@ impl PropertyDeclarationBlock {
 
                 // As a compatibility hack, specially on Android,
                 // don't allow to override a prefixed webkit display
                 // value with an unprefixed version from parsing
                 // code.
                 //
                 // TODO(emilio): Unship.
                 if let PropertyDeclaration::Display(old_display) = *slot {
-                    use crate::properties::longhands::display::computed_value::T as display;
+                    use properties::longhands::display::computed_value::T as display;
 
                     if let PropertyDeclaration::Display(new_display) = declaration {
                         if display::should_ignore_parsed_value(old_display, new_display) {
                             return false;
                         }
                     }
                 }
 
@@ -836,31 +836,31 @@ impl PropertyDeclarationBlock {
     }
 
     /// Returns a custom properties map which is the result of cascading custom
     /// properties in this declaration block along with context's custom
     /// properties.
     pub fn cascade_custom_properties_with_context(
         &self,
         context: &Context,
-    ) -> Option<Arc<crate::custom_properties::CustomPropertiesMap>> {
+    ) -> Option<Arc<::custom_properties::CustomPropertiesMap>> {
         self.cascade_custom_properties(
             context.style().custom_properties(),
             context.device().environment(),
         )
     }
 
     /// Returns a custom properties map which is the result of cascading custom
     /// properties in this declaration block along with the given custom
     /// properties.
     fn cascade_custom_properties(
         &self,
-        inherited_custom_properties: Option<&Arc<crate::custom_properties::CustomPropertiesMap>>,
+        inherited_custom_properties: Option<&Arc<::custom_properties::CustomPropertiesMap>>,
         environment: &CssEnvironment,
-    ) -> Option<Arc<crate::custom_properties::CustomPropertiesMap>> {
+    ) -> Option<Arc<::custom_properties::CustomPropertiesMap>> {
         let mut builder = CustomPropertiesBuilder::new(
             inherited_custom_properties,
             environment,
         );
 
         for declaration in self.normal_declaration_iter() {
             if let PropertyDeclaration::Custom(ref declaration) = *declaration {
                 builder.cascade(&declaration.name, &declaration.value);
--- 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 crate::Atom;
+use Atom;
 use app_units::Au;
-use crate::custom_properties::CustomPropertiesMap;
-use crate::gecko_bindings::bindings;
+use custom_properties::CustomPropertiesMap;
+use gecko_bindings::bindings;
 % for style_struct in data.style_structs:
-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};
+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};
 % endfor
-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 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 servo_arc::{Arc, RawOffsetArc};
 use std::marker::PhantomData;
 use std::mem::{forget, uninitialized, transmute, zeroed};
 use std::{cmp, ops, ptr};
-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;
+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;
 
 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 = crate::gecko_bindings::structs::ServoComputedData;
+pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedData;
 
 #[repr(C)]
-pub struct ComputedValues(crate::gecko_bindings::structs::mozilla::ComputedStyle);
+pub struct ComputedValues(::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 crate::properties::longhands::display::computed_value::T as Display;
+        use 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 crate::gecko_bindings::structs::mozilla::Gecko${style_struct.gecko_name} as ${style_struct.gecko_struct_name};
+pub use ::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 crate::properties::longhands::${ident}::computed_value::T as Keyword;
+        use 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 crate::properties::longhands::${ident}::computed_value::T as Keyword;
+        use 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 crate::values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
-        use crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
+        use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
+        use 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 crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
+        use 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 crate::values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
-        use crate::values::computed::LengthOrPercentage;
-        use crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
+        use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber};
+        use values::computed::LengthOrPercentage;
+        use 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 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;
+        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;
         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 crate::gecko_bindings::structs::nsStyleSVG_${source_prefix}_MASK as MASK;
+        use 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 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;
+        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;
 
         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 crate::values::generics::svg::SVGPaintKind;
+        use 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 crate::values::computed::url::ComputedUrl;
-        use crate::values::generics::svg::{SVGPaint, SVGPaintKind};
+        use values::computed::url::ComputedUrl;
+        use 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 crate::properties::longhands::${ident}::computed_value::T;
+        use 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 crate::properties::longhands::${ident}::computed_value::T;
+        use 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 crate::values::computed::border::BorderCornerRadius;
+        use 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 crate::values::computed::url::ComputedUrl;
+        use 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));",
         }
     %>
-    crate::values::generics::transform::TransformOperation::${name}${pattern} => {
+    ::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} => {
-        crate::values::generics::transform::TransformOperation::${name}${pre_symbols}
+        ::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 crate::values::computed::TransformOperation;
-    use crate::values::generics::transform::{Matrix, Matrix3D};
+    use values::computed::TransformOperation;
+    use 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 crate::gecko_bindings::sugar::refptr::RefPtr;
+    use 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 crate::values::computed::{Length, Percentage, TransformOperation};
-    use crate::values::generics::transform::{Matrix, Matrix3D};
-    use crate::values::generics::transform::Transform;
+    use values::computed::{Length, Percentage, TransformOperation};
+    use values::generics::transform::{Matrix, Matrix3D};
+    use 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 crate::values::generics::transform::Transform;
+    use 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 crate::gecko_properties::convert_transform;
+        use 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 crate::gecko_properties::clone_transform_from_list;
-        use crate::values::generics::transform::Transform;
+        use gecko_properties::clone_transform_from_list;
+        use 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 crate::values::computed::{Length, LengthOrPercentage, TransformOrigin};
+        use 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 crate::values::generics::font::{FontSettings, FontTag, ${tag_type}};
+        use 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 crate::values::None_;
+        use 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 crate::values::specified::border::BorderImageRepeatKeyword;
-        use crate::gecko_bindings::structs::StyleBorderImageRepeat;
+        use values::specified::border::BorderImageRepeatKeyword;
+        use 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 crate::values::specified::border::BorderImageRepeatKeyword;
-        use crate::gecko_bindings::structs::StyleBorderImageRepeat;
+        use values::specified::border::BorderImageRepeatKeyword;
+        use 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 crate::gecko_bindings::structs::{NS_STYLE_BORDER_IMAGE_SLICE_NOFILL, NS_STYLE_BORDER_IMAGE_SLICE_FILL};
+        use 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 crate::gecko_bindings::structs::NS_STYLE_BORDER_IMAGE_SLICE_FILL;
-        use crate::values::computed::{BorderImageSlice, NumberOrPercentage};
-        type NumberOrPercentageRect = crate::values::generics::rect::Rect<NumberOrPercentage>;
+        use gecko_bindings::structs::NS_STYLE_BORDER_IMAGE_SLICE_FILL;
+        use values::computed::{BorderImageSlice, NumberOrPercentage};
+        type NumberOrPercentageRect = ::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 crate::gecko_bindings::structs::nsStyleUnit;
+        use 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, crate::values::specified::align::AlignFlags::LEGACY);
+        debug_assert_ne!(v.0, ::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 crate::gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine};
+        use 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 crate::gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine};
+        use 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 {
-        crate::values::generics::grid::TrackSize::from_gecko_style_coords(&self.gecko.mGridAuto${kind.title()}Min,
+        ::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 crate::gecko_bindings::structs::{nsTArray, nsStyleGridLine_kMaxLine};
+        use gecko_bindings::structs::{nsTArray, nsStyleGridLine_kMaxLine};
         use nsstring::nsStringRepr;
         use std::usize;
-        use crate::values::CustomIdent;
-        use crate::values::generics::grid::TrackListType::Auto;
-        use crate::values::generics::grid::{GridTemplateComponent, RepeatCount};
+        use values::CustomIdent;
+        use values::generics::grid::TrackListType::Auto;
+        use 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 crate::gecko_bindings::structs::nsTArray;
+        use gecko_bindings::structs::nsTArray;
         use nsstring::nsStringRepr;
-        use crate::values::CustomIdent;
-        use crate::values::generics::grid::{GridTemplateComponent, LineNameList, RepeatCount};
-        use crate::values::generics::grid::{TrackList, TrackListType, TrackListValue, TrackRepeat, TrackSize};
+        use values::CustomIdent;
+        use values::generics::grid::{GridTemplateComponent, LineNameList, RepeatCount};
+        use 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 crate::gecko_bindings::bindings::Gecko_NewGridTemplateAreasValue;
-        use crate::gecko_bindings::sugar::refptr::UniqueRefPtr;
+        use gecko_bindings::bindings::Gecko_NewGridTemplateAreasValue;
+        use 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 crate::values::None_;
-        use crate::values::specified::position::{NamedArea, TemplateAreas, TemplateAreasArc};
+        use values::None_;
+        use 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 crate::gecko_bindings::structs::FontFamilyType;
-        use crate::values::computed::font::{FontFamily, SingleFontFamily, FontFamilyList};
+        use gecko_bindings::structs::FontFamilyType;
+        use 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 crate::values::generics::font::KeywordSize;
+        use 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 crate::values::generics::font::{KeywordInfo, KeywordSize};
+        use 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 crate::values::computed::font::FontStretch;
-        use crate::values::computed::Percentage;
-        use crate::values::generics::NonNegative;
+        use values::computed::font::FontStretch;
+        use values::computed::Percentage;
+        use 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 crate::values::generics::font::FontStyle;
+        use 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 crate::values::computed::font::FontStyle;
+        use 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 crate::properties::longhands::font_size_adjust::computed_value::T;
+        use 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 crate::properties::longhands::font_size_adjust::computed_value::T;
+        use 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 crate::gecko_bindings::bindings::{Gecko_ClearAlternateValues, Gecko_AppendAlternateValues};
-        use crate::gecko_bindings::bindings::Gecko_nsFont_ResetFontFeatureValuesLookup;
-        use crate::gecko_bindings::bindings::Gecko_nsFont_SetFontFeatureValuesLookup;
+        use gecko_bindings::bindings::{Gecko_ClearAlternateValues, Gecko_AppendAlternateValues};
+        use gecko_bindings::bindings::Gecko_nsFont_ResetFontFeatureValuesLookup;
+        use gecko_bindings::bindings::Gecko_nsFont_SetFontFeatureValuesLookup;
         % for value in "normal swash stylistic ornaments annotation styleset character_variant historical".split():
-            use crate::gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
+            use gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
         % endfor
-        use crate::values::specified::font::VariantAlternates;
+        use 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 crate::gecko_bindings::bindings::Gecko_CopyAlternateValuesFrom;
+        use 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 crate::gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
+            use gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
         % endfor
-        use crate::values::specified::font::VariantAlternates;
-        use crate::values::specified::font::VariantAlternatesList;
-        use crate::values::CustomIdent;
+        use values::specified::font::VariantAlternates;
+        use values::specified::font::VariantAlternatesList;
+        use 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 crate::values::computed::Time;
+        use 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 crate::properties::longhands::animation_${ident}::single_value::computed_value::T as Keyword;
+        use 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 crate::properties::longhands::animation_${ident}::single_value::computed_value::T as Keyword;
+        use 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 crate::values::generics::transform::${type};
+        use 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 crate::properties::longhands::overflow_x::computed_value::T as BaseType;
+        use 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 crate::properties::longhands::overflow_x::computed_value::T as BaseType;
+        use 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 crate::values::generics::box_::VerticalAlign;
+        use 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 crate::values::computed::LengthOrPercentage;
-        use crate::values::generics::box_::VerticalAlign;
+        use values::computed::LengthOrPercentage;
+        use 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 crate::computed_values::page_break_${kind}::T;
+        use 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 crate::computed_values::page_break_${kind}::T;
+        use 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 crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
-        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
-        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
+        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
+        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
+        use 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 crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_all_properties;
+        use 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 crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
-        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
-        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
+        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
+        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
+        use 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 crate::gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
-        use crate::gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
+        use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
+        use 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 crate::properties::longhands::animation_name::single_value::SpecifiedValue as AnimationName;
+        use 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 crate::values::generics::box_::AnimationIterationCount;
+        use 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 crate::values::generics::box_::AnimationIterationCount;
+        use 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 crate::properties::longhands::perspective_origin::computed_value::T;
-        use crate::values::computed::LengthOrPercentage;
+        use properties::longhands::perspective_origin::computed_value::T;
+        use 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 crate::gecko_bindings::bindings::{Gecko_AppendWillChange, Gecko_ClearWillChange};
-        use crate::properties::longhands::will_change::computed_value::T;
+        use gecko_bindings::bindings::{Gecko_AppendWillChange, Gecko_ClearWillChange};
+        use 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 crate::gecko_bindings::bindings::Gecko_CopyWillChangeFrom;
+        use 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 crate::properties::longhands::will_change::computed_value::T;
-        use crate::gecko_bindings::structs::nsAtom;
-        use crate::values::CustomIdent;
-        use crate::values::specified::box_::WillChangeBits;
+        use properties::longhands::will_change::computed_value::T;
+        use gecko_bindings::structs::nsAtom;
+        use values::CustomIdent;
+        use 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 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;
+        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;
 
         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 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};
+        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};
 
         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 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;
+        use gecko_bindings::bindings::{Gecko_NewStyleMotion, Gecko_SetStyleMotion};
+        use gecko_bindings::structs::StyleShapeSourceType;
+        use values::generics::basic_shape::FillRule;
+        use 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 crate::values::specified::OffsetPath;
+        use 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 crate::gecko_bindings::bindings::Gecko_CopyStyleMotions;
+        use 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 crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use 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 crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use 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 crate::properties::longhands::${ident}::single_value::computed_value::T as Keyword;
-        use crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use properties::longhands::${ident}::single_value::computed_value::T as Keyword;
+        use 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 crate::properties::longhands::${ident}::single_value::computed_value::T as Keyword;
+        use 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 crate::values::specified::background::BackgroundRepeatKeyword;
-        use crate::gecko_bindings::structs::nsStyleImageLayers_Repeat;
-        use crate::gecko_bindings::structs::StyleImageLayerRepeat;
+        use values::specified::background::BackgroundRepeatKeyword;
+        use gecko_bindings::structs::nsStyleImageLayers_Repeat;
+        use 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 crate::properties::longhands::${shorthand}_repeat::single_value::computed_value::T;
-        use crate::values::specified::background::BackgroundRepeatKeyword;
-        use crate::gecko_bindings::structs::StyleImageLayerRepeat;
+        use properties::longhands::${shorthand}_repeat::single_value::computed_value::T;
+        use values::specified::background::BackgroundRepeatKeyword;
+        use 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 crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use 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 crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use 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 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;
+        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;
 
         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 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;
+        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;
 
         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 crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use 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 crate::gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType;
+        use 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 crate::values::None_;
+        use 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 crate::gecko_bindings::bindings::Gecko_FillAllImageLayers;
+        use 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 crate::values::computed::url::ComputedImageUrl;
+        use 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 crate::gecko_bindings::bindings::Gecko_SetCounterStyleToString;
+        use 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 crate::values::Either;
-        use crate::values::generics::CounterStyleOrNone;
+        use values::Either;
+        use 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 crate::values::Either;
+        use 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 crate::values::{Auto, Either};
-        use crate::values::computed::ClipRect;
+        use values::{Auto, Either};
+        use 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 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;
+        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;
 
         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 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;
+        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;
 
         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 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;
+        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;
 
         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 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;
+        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;
 
         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 crate::values::generics::text::LineHeight;
+        use 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 crate::values::generics::text::LineHeight;
+        use 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 crate::values::generics::text::Spacing;
+        use 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 crate::values::computed::Length;
-        use crate::values::generics::text::Spacing;
+        use values::computed::Length;
+        use 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 crate::values::generics::text::Spacing;
+        use 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 crate::values::computed::LengthOrPercentage;
-        use crate::values::generics::text::Spacing;
+        use values::computed::LengthOrPercentage;
+        use 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 crate::values::computed::TextEmphasisStyle;
-        use crate::values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
+        use values::computed::TextEmphasisStyle;
+        use 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 crate::values::computed::TextEmphasisStyle;
-        use crate::values::computed::text::TextEmphasisKeywordValue;
-        use crate::values::specified::text::{TextEmphasisFillMode, TextEmphasisShapeKeyword};
+        use values::computed::TextEmphasisStyle;
+        use values::computed::text::TextEmphasisKeywordValue;
+        use 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 crate::gecko_bindings::structs::nsStyleTextOverflowSide;
+        use 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 crate::gecko_bindings::structs::nsStyleTextOverflowSide;
-        use crate::values::specified::text::TextOverflowSide;
+        use gecko_bindings::structs::nsStyleTextOverflowSide;
+        use 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 crate::gecko_bindings::structs::nsStyleTextOverflowSide;
+        use 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 crate::gecko_bindings::structs::nsStyleTextOverflowSide;
-        use crate::values::specified::text::TextOverflowSide;
+        use gecko_bindings::structs::nsStyleTextOverflowSide;
+        use 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 crate::values::generics::text::InitialLetter;
+        use 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 crate::values::generics::text::InitialLetter;
+        use 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 crate::gecko_bindings::bindings::Gecko_NewStyleSVGPath;
-    use crate::gecko_bindings::structs::StyleShapeSourceType;
+    use gecko_bindings::bindings::Gecko_NewStyleSVGPath;
+    use 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 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};
+        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};
 
         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 crate::gecko_bindings::bindings::Gecko_CopyShapeSourceFrom;
+        use 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 crate::properties::longhands::paint_order::computed_value::T;
+        use 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 crate::gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
-        use crate::values::generics::svg::{SVGStrokeDashArray, SvgLengthOrPercentageOrNumber};
+        use gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
+        use 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 crate::gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
+        use 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 crate::gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
-        use crate::values::computed::LengthOrPercentage;
-        use crate::values::generics::svg::{SVGStrokeDashArray, SvgLengthOrPercentageOrNumber};
+        use gecko_bindings::structs::nsStyleSVG_STROKE_DASHARRAY_CONTEXT as CONTEXT_VALUE;
+        use values::computed::LengthOrPercentage;
+        use 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 crate::values::computed::ui::CursorImage;
-        use crate::values::computed::url::ComputedImageUrl;
+        use values::computed::ui::CursorImage;
+        use 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 crate::gecko_bindings::structs::StyleComplexColor;
-        use crate::values::generics::ui::ScrollbarColor;
+        use gecko_bindings::structs::StyleComplexColor;
+        use 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 crate::gecko_bindings::structs::StyleComplexColor_Tag as Tag;
-        use crate::values::generics::ui::ScrollbarColor;
+        use gecko_bindings::structs::StyleComplexColor_Tag as Tag;
+        use 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 crate::gecko_bindings::structs::{nsStyleColumn_kColumnCountAuto, nsStyleColumn_kMaxColumnCount};
+        use 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 crate::gecko_bindings::structs::{nsStyleColumn_kColumnCountAuto, nsStyleColumn_kMaxColumnCount};
+        use 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 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;
+        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;
 
         // 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 crate::gecko_bindings::bindings::Gecko_CopyStyleContentsFrom;
+        use 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 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;
+        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;
 
         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 crate::values::generics::counters::CounterPair;
-            use crate::values::CustomIdent;
+            use values::generics::counters::CounterPair;
+            use 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 crate::values::specified::AllowQuirks;
+        use values::specified::AllowQuirks;
         #[allow(unused_imports)]
         use smallvec::SmallVec;
-        pub use crate::values::specified::${type} as SpecifiedValue;
+        pub use values::specified::${type} as SpecifiedValue;
         pub mod computed_value {
             % if computed_type:
             pub use ${computed_type} as T;
             % else:
-            pub use crate::values::computed::${type} as T;
+            pub use 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 crate::parser::{Parse, ParserContext};
+            use parser::{Parse, ParserContext};
             #[allow(unused_imports)]
-            use crate::properties::ShorthandId;
+            use properties::ShorthandId;
             #[allow(unused_imports)]
             use selectors::parser::SelectorParseErrorKind;
             #[allow(unused_imports)]
             use style_traits::{ParseError, StyleParseErrorKind};
             #[allow(unused_imports)]
-            use crate::values::computed::{Context, ToComputedValue};
+            use values::computed::{Context, ToComputedValue};
             #[allow(unused_imports)]
-            use crate::values::{computed, specified};
+            use values::{computed, specified};
             #[allow(unused_imports)]
-            use crate::values::{Auto, Either, None_, Normal};
+            use 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 crate::values::computed::ComputedVecIter;
+            use 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 crate::properties::animated_properties::ListAnimation;
-            use crate::values::animated::{Animate, ToAnimatedValue, ToAnimatedZero, Procedure};
-            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
+            use properties::animated_properties::ListAnimation;
+            use values::animated::{Animate, ToAnimatedValue, ToAnimatedZero, Procedure};
+            use 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 crate::parser::{Parse, ParserContext};
+        use parser::{Parse, ParserContext};
         #[allow(unused_imports)]
-        use crate::properties::{UnparsedValue, ShorthandId};
+        use properties::{UnparsedValue, ShorthandId};
         #[allow(unused_imports)]
-        use crate::values::{Auto, Either, None_, Normal};
+        use values::{Auto, Either, None_, Normal};
         #[allow(unused_imports)]
-        use crate::error_reporting::ParseErrorReporter;
+        use error_reporting::ParseErrorReporter;
         #[allow(unused_imports)]
-        use crate::properties::longhands;
+        use properties::longhands;
         #[allow(unused_imports)]
-        use crate::properties::{LonghandId, LonghandIdSet};
+        use properties::{LonghandId, LonghandIdSet};
         #[allow(unused_imports)]
-        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
+        use properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
         #[allow(unused_imports)]
-        use crate::properties::style_structs;
+        use 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 crate::values::computed::{Context, ToComputedValue};
+        use values::computed::{Context, ToComputedValue};
         #[allow(unused_imports)]
-        use crate::values::{computed, generics, specified};
+        use values::{computed, generics, specified};
         #[allow(unused_imports)]
-        use crate::Atom;
+        use 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 crate::properties::longhands::system_font::SystemFont;
+        use 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 crate::gecko_bindings::structs;
+            use 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 crate::gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit};
+            use 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 crate::gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit};
+            use 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 crate::parser::ParserContext;
-        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
+        use parser::ParserContext;
+        use 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 crate::properties::{NonCustomPropertyId, LonghandId};
+            use 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 crate::parser::Parse;
-        use crate::values::generics::rect::Rect;
-        use crate::values::specified;
+        use parser::Parse;
+        use values::generics::rect::Rect;
+        use 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 crate::logical_geometry::PhysicalSide;
+        use logical_geometry::PhysicalSide;
         match wm.${to_rust_ident(side)}_physical_side() {
             % for phy_side in PHYSICAL_SIDES:
                 PhysicalSide::${phy_side.title()} => {
                     ${caller.inner(physical_iden