Bug 1525402 - Run `cargo fix --edition` on webrender on macos. r=kvark
authorAlexis Beingessner <a.beingessner@gmail.com>
Tue, 07 May 2019 01:40:23 +0000
changeset 472821 f072f15ba54ede2c3c1eb24c09593284b3bc7c72
parent 472820 16d8a19df81393398075c6f4695d9a55b96b55d2
child 472822 2371d3a7ab2d46e91f4a71d1accfb74c5b01429e
push id35978
push usershindli@mozilla.com
push dateTue, 07 May 2019 09:44:39 +0000
treeherdermozilla-central@7aee5a30dd15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskvark
bugs1525402
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1525402 - Run `cargo fix --edition` on webrender on macos. r=kvark Differential Revision: https://phabricator.services.mozilla.com/D29567
gfx/wr/examples/alpha_perf.rs
gfx/wr/examples/animation.rs
gfx/wr/examples/basic.rs
gfx/wr/examples/blob.rs
gfx/wr/examples/common/boilerplate.rs
gfx/wr/examples/document.rs
gfx/wr/examples/frame_output.rs
gfx/wr/examples/iframe.rs
gfx/wr/examples/image_resize.rs
gfx/wr/examples/scrolling.rs
gfx/wr/examples/texture_cache_stress.rs
gfx/wr/examples/yuv.rs
gfx/wr/webrender/src/batch.rs
gfx/wr/webrender/src/border.rs
gfx/wr/webrender/src/box_shadow.rs
gfx/wr/webrender/src/capture.rs
gfx/wr/webrender/src/clip.rs
gfx/wr/webrender/src/clip_scroll_tree.rs
gfx/wr/webrender/src/debug_render.rs
gfx/wr/webrender/src/debug_server.rs
gfx/wr/webrender/src/device/gl.rs
gfx/wr/webrender/src/device/query_gl.rs
gfx/wr/webrender/src/display_list_flattener.rs
gfx/wr/webrender/src/filterdata.rs
gfx/wr/webrender/src/frame_builder.rs
gfx/wr/webrender/src/glyph_rasterizer/mod.rs
gfx/wr/webrender/src/glyph_rasterizer/no_pathfinder.rs
gfx/wr/webrender/src/gpu_cache.rs
gfx/wr/webrender/src/gpu_types.rs
gfx/wr/webrender/src/hit_test.rs
gfx/wr/webrender/src/image.rs
gfx/wr/webrender/src/intern.rs
gfx/wr/webrender/src/internal_types.rs
gfx/wr/webrender/src/lib.rs
gfx/wr/webrender/src/picture.rs
gfx/wr/webrender/src/platform/macos/font.rs
gfx/wr/webrender/src/prim_store/borders.rs
gfx/wr/webrender/src/prim_store/gradient.rs
gfx/wr/webrender/src/prim_store/image.rs
gfx/wr/webrender/src/prim_store/interned.rs
gfx/wr/webrender/src/prim_store/line_dec.rs
gfx/wr/webrender/src/prim_store/mod.rs
gfx/wr/webrender/src/prim_store/picture.rs
gfx/wr/webrender/src/prim_store/text_run.rs
gfx/wr/webrender/src/profiler.rs
gfx/wr/webrender/src/render_backend.rs
gfx/wr/webrender/src/render_task.rs
gfx/wr/webrender/src/renderer.rs
gfx/wr/webrender/src/resource_cache.rs
gfx/wr/webrender/src/scene.rs
gfx/wr/webrender/src/scene_builder.rs
gfx/wr/webrender/src/segment.rs
gfx/wr/webrender/src/shade.rs
gfx/wr/webrender/src/spatial_node.rs
gfx/wr/webrender/src/storage.rs
gfx/wr/webrender/src/texture_cache.rs
gfx/wr/webrender/src/tiling.rs
gfx/wr/webrender_api/src/api.rs
gfx/wr/webrender_api/src/channel.rs
gfx/wr/webrender_api/src/display_item.rs
gfx/wr/webrender_api/src/display_list.rs
gfx/wr/webrender_api/src/font.rs
gfx/wr/webrender_api/src/gradient_builder.rs
gfx/wr/webrender_api/src/image.rs
gfx/wr/webrender_api/src/lib.rs
gfx/wr/webrender_api/src/units.rs
gfx/wr/wrench/src/binary_frame_reader.rs
gfx/wr/wrench/src/egl.rs
gfx/wr/wrench/src/json_frame_writer.rs
gfx/wr/wrench/src/main.rs
gfx/wr/wrench/src/perf.rs
gfx/wr/wrench/src/png.rs
gfx/wr/wrench/src/rawtest.rs
gfx/wr/wrench/src/reftest.rs
gfx/wr/wrench/src/wrench.rs
gfx/wr/wrench/src/yaml_frame_reader.rs
gfx/wr/wrench/src/yaml_frame_writer.rs
gfx/wr/wrench/src/yaml_helper.rs
--- a/gfx/wr/examples/alpha_perf.rs
+++ b/gfx/wr/examples/alpha_perf.rs
@@ -6,17 +6,17 @@ extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use std::cmp;
 use webrender::api::*;
 use webrender::api::units::DeviceIntSize;
 
 
 struct App {
     rect_count: usize,
 }
--- a/gfx/wr/examples/animation.rs
+++ b/gfx/wr/examples/animation.rs
@@ -14,17 +14,17 @@ extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::Angle;
 use webrender::api::*;
 use webrender::api::units::*;
 
 
 struct App {
     property_key0: PropertyBindingKey<LayoutTransform>,
     property_key1: PropertyBindingKey<LayoutTransform>,
--- a/gfx/wr/examples/basic.rs
+++ b/gfx/wr/examples/basic.rs
@@ -6,17 +6,17 @@ extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::vec2;
 use winit::TouchPhase;
 use std::collections::HashMap;
 use webrender::ShaderPrecacheFlags;
 use webrender::api::*;
 use webrender::api::units::*;
 
 
--- a/gfx/wr/examples/blob.rs
+++ b/gfx/wr/examples/blob.rs
@@ -6,17 +6,17 @@ extern crate gleam;
 extern crate glutin;
 extern crate rayon;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use rayon::{ThreadPool, ThreadPoolBuilder};
 use rayon::prelude::*;
 use std::collections::HashMap;
 use std::sync::Arc;
 use webrender::api::{self, DisplayListBuilder, DocumentId, PipelineId, RenderApi, Transaction};
 use webrender::api::{ColorF, CommonItemProperties, SpaceAndClipInfo};
 use webrender::api::units::*;
 use webrender::euclid::size2;
--- a/gfx/wr/examples/common/boilerplate.rs
+++ b/gfx/wr/examples/common/boilerplate.rs
@@ -81,19 +81,19 @@ pub trait Example {
         builder: &mut DisplayListBuilder,
         txn: &mut Transaction,
         device_size: DeviceIntSize,
         pipeline_id: PipelineId,
         document_id: DocumentId,
     );
     fn on_event(
         &mut self,
-        winit::WindowEvent,
-        &RenderApi,
-        DocumentId,
+        _: winit::WindowEvent,
+        _: &RenderApi,
+        _: DocumentId,
     ) -> bool {
         false
     }
     fn get_image_handlers(
         &mut self,
         _gl: &gl::Gl,
     ) -> (Option<Box<webrender::ExternalImageHandler>>,
           Option<Box<webrender::OutputImageHandler>>) {
--- a/gfx/wr/examples/document.rs
+++ b/gfx/wr/examples/document.rs
@@ -6,17 +6,17 @@ extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::Example;
+use crate::boilerplate::Example;
 use euclid::TypedScale;
 use webrender::api::*;
 use webrender::api::units::*;
 
 // This example creates multiple documents overlapping each other with
 // specified layer indices.
 
 struct Document {
--- a/gfx/wr/examples/frame_output.rs
+++ b/gfx/wr/examples/frame_output.rs
@@ -6,17 +6,17 @@ extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::TypedScale;
 use gleam::gl;
 use webrender::api::*;
 use webrender::api::units::*;
 
 
 // This example demonstrates using the frame output feature to copy
 // the output of a WR framebuffer to a custom texture.
--- a/gfx/wr/examples/iframe.rs
+++ b/gfx/wr/examples/iframe.rs
@@ -5,17 +5,17 @@
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use webrender::api::*;
 use webrender::api::units::*;
 
 // This example uses the push_iframe API to nest a second pipeline's displaylist
 // inside the root pipeline's display list. When it works, a green square is
 // shown. If it fails, a red square is shown.
 
 struct App {}
--- a/gfx/wr/examples/image_resize.rs
+++ b/gfx/wr/examples/image_resize.rs
@@ -7,17 +7,17 @@ extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 #[path = "common/image_helper.rs"]
 mod image_helper;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use webrender::api::*;
 use webrender::api::units::*;
 
 struct App {
     image_key: ImageKey,
 }
 
 impl Example for App {
--- a/gfx/wr/examples/scrolling.rs
+++ b/gfx/wr/examples/scrolling.rs
@@ -6,17 +6,17 @@ extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use euclid::SideOffsets2D;
 use webrender::api::*;
 use webrender::api::units::*;
 use winit::dpi::LogicalPosition;
 
 
 struct App {
     cursor_position: WorldPoint,
--- a/gfx/wr/examples/texture_cache_stress.rs
+++ b/gfx/wr/examples/texture_cache_stress.rs
@@ -5,17 +5,17 @@
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::{Example, HandyDandyRectBuilder};
+use crate::boilerplate::{Example, HandyDandyRectBuilder};
 use gleam::gl;
 use std::mem;
 use webrender::api::*;
 use webrender::api::units::*;
 
 
 struct ImageGenerator {
     patterns: [[u8; 3]; 6],
--- a/gfx/wr/examples/yuv.rs
+++ b/gfx/wr/examples/yuv.rs
@@ -5,17 +5,17 @@
 extern crate gleam;
 extern crate glutin;
 extern crate webrender;
 extern crate winit;
 
 #[path = "common/boilerplate.rs"]
 mod boilerplate;
 
-use boilerplate::Example;
+use crate::boilerplate::Example;
 use gleam::gl;
 use webrender::api::*;
 use webrender::api::units::*;
 
 
 fn init_gl_texture(
     id: gl::GLuint,
     internal: gl::GLenum,
--- a/gfx/wr/webrender/src/batch.rs
+++ b/gfx/wr/webrender/src/batch.rs
@@ -1,40 +1,40 @@
 /* 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 api::{AlphaType, ClipMode, ExternalImageType, FilterOp, ImageRendering};
 use api::{YuvColorSpace, YuvFormat, ColorDepth, PremultipliedColorF, RasterSpace};
 use api::units::*;
-use clip::{ClipDataStore, ClipNodeFlags, ClipNodeRange, ClipItem, ClipStore, ClipNodeInstance};
-use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex, CoordinateSystemId};
-use glyph_rasterizer::GlyphFormat;
-use gpu_cache::{GpuBlockData, GpuCache, GpuCacheHandle, GpuCacheAddress};
-use gpu_types::{BrushFlags, BrushInstance, PrimitiveHeaders, ZBufferId, ZBufferIdGenerator};
-use gpu_types::{ClipMaskInstance, SplitCompositeInstance, SnapOffsets};
-use gpu_types::{PrimitiveInstanceData, RasterizationSpace, GlyphInstance};
-use gpu_types::{PrimitiveHeader, PrimitiveHeaderIndex, TransformPaletteId, TransformPalette};
-use internal_types::{FastHashMap, SavedTargetIndex, TextureSource};
-use picture::{Picture3DContext, PictureCompositeMode, PicturePrimitive};
-use prim_store::{DeferredResolve, EdgeAaSegmentMask, PrimitiveInstanceKind, PrimitiveVisibilityIndex};
-use prim_store::{VisibleGradientTile, PrimitiveInstance, PrimitiveOpacity, SegmentInstanceIndex};
-use prim_store::{BrushSegment, ClipMaskKind, ClipTaskIndex, VECS_PER_SEGMENT};
-use prim_store::{recompute_snap_offsets};
-use prim_store::image::ImageSource;
-use render_backend::DataStores;
-use render_task::{RenderTaskAddress, RenderTaskId, RenderTaskTree, TileBlit};
-use renderer::{BlendMode, ImageBufferKind, ShaderColorMode};
-use renderer::{BLOCKS_PER_UV_RECT, MAX_VERTEX_TEXTURE_WIDTH};
-use resource_cache::{CacheItem, GlyphFetchResult, ImageRequest, ResourceCache, ImageProperties};
-use scene::FilterOpHelpers;
+use crate::clip::{ClipDataStore, ClipNodeFlags, ClipNodeRange, ClipItem, ClipStore, ClipNodeInstance};
+use crate::clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex, CoordinateSystemId};
+use crate::glyph_rasterizer::GlyphFormat;
+use crate::gpu_cache::{GpuBlockData, GpuCache, GpuCacheHandle, GpuCacheAddress};
+use crate::gpu_types::{BrushFlags, BrushInstance, PrimitiveHeaders, ZBufferId, ZBufferIdGenerator};
+use crate::gpu_types::{ClipMaskInstance, SplitCompositeInstance, SnapOffsets};
+use crate::gpu_types::{PrimitiveInstanceData, RasterizationSpace, GlyphInstance};
+use crate::gpu_types::{PrimitiveHeader, PrimitiveHeaderIndex, TransformPaletteId, TransformPalette};
+use crate::internal_types::{FastHashMap, SavedTargetIndex, TextureSource};
+use crate::picture::{Picture3DContext, PictureCompositeMode, PicturePrimitive};
+use crate::prim_store::{DeferredResolve, EdgeAaSegmentMask, PrimitiveInstanceKind, PrimitiveVisibilityIndex};
+use crate::prim_store::{VisibleGradientTile, PrimitiveInstance, PrimitiveOpacity, SegmentInstanceIndex};
+use crate::prim_store::{BrushSegment, ClipMaskKind, ClipTaskIndex, VECS_PER_SEGMENT};
+use crate::prim_store::{recompute_snap_offsets};
+use crate::prim_store::image::ImageSource;
+use crate::render_backend::DataStores;
+use crate::render_task::{RenderTaskAddress, RenderTaskId, RenderTaskTree, TileBlit};
+use crate::renderer::{BlendMode, ImageBufferKind, ShaderColorMode};
+use crate::renderer::{BLOCKS_PER_UV_RECT, MAX_VERTEX_TEXTURE_WIDTH};
+use crate::resource_cache::{CacheItem, GlyphFetchResult, ImageRequest, ResourceCache, ImageProperties};
+use crate::scene::FilterOpHelpers;
 use smallvec::SmallVec;
 use std::{f32, i32, usize};
-use tiling::{RenderTargetContext};
-use util::{project_rect, TransformedRectKind};
+use crate::tiling::{RenderTargetContext};
+use crate::util::{project_rect, TransformedRectKind};
 
 // Special sentinel value recognized by the shader. It is considered to be
 // a dummy task that doesn't mask out anything.
 const OPAQUE_TASK_ADDRESS: RenderTaskAddress = RenderTaskAddress(0x7fff);
 
 /// Used to signal there are no segments provided with this primitive.
 const INVALID_SEGMENT_INDEX: i32 = 0xffff;
 
--- a/gfx/wr/webrender/src/border.rs
+++ b/gfx/wr/webrender/src/border.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/. */
 
 use api::{BorderRadius, BorderSide, BorderStyle, ColorF, ColorU};
 use api::{NormalBorder as ApiNormalBorder, RepeatMode};
 use api::units::*;
-use ellipse::Ellipse;
+use crate::ellipse::Ellipse;
 use euclid::vec2;
-use display_list_flattener::DisplayListFlattener;
-use gpu_types::{BorderInstance, BorderSegment, BrushFlags};
-use prim_store::{BorderSegmentInfo, BrushSegment, NinePatchDescriptor};
-use prim_store::{EdgeAaSegmentMask, ScrollNodeAndClipChain};
-use prim_store::borders::{NormalBorderPrim, NormalBorderData};
-use util::{lerp, RectHelpers};
-use internal_types::LayoutPrimitiveInfo;
+use crate::display_list_flattener::DisplayListFlattener;
+use crate::gpu_types::{BorderInstance, BorderSegment, BrushFlags};
+use crate::prim_store::{BorderSegmentInfo, BrushSegment, NinePatchDescriptor};
+use crate::prim_store::{EdgeAaSegmentMask, ScrollNodeAndClipChain};
+use crate::prim_store::borders::{NormalBorderPrim, NormalBorderData};
+use crate::util::{lerp, RectHelpers};
+use crate::internal_types::LayoutPrimitiveInfo;
 
 // Using 2048 as the maximum radius in device space before which we
 // start stretching is up for debate.
 // the value must be chosen so that the corners will not use an
 // unreasonable amount of memory but should allow crisp corners in the
 // common cases.
 
 /// Maximum resolution in device pixels at which borders are rasterized.
--- a/gfx/wr/webrender/src/box_shadow.rs
+++ b/gfx/wr/webrender/src/box_shadow.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/. */
 
 use api::{BorderRadius, BoxShadowClipMode, ClipMode, ColorF, PrimitiveKeyKind};
 use api::MAX_BLUR_RADIUS;
 use api::units::*;
-use clip::ClipItemKey;
-use display_list_flattener::DisplayListFlattener;
-use gpu_cache::GpuCacheHandle;
-use gpu_types::BoxShadowStretchMode;
-use prim_store::ScrollNodeAndClipChain;
-use render_task::RenderTaskCacheEntryHandle;
-use util::RectHelpers;
-use internal_types::LayoutPrimitiveInfo;
+use crate::clip::ClipItemKey;
+use crate::display_list_flattener::DisplayListFlattener;
+use crate::gpu_cache::GpuCacheHandle;
+use crate::gpu_types::BoxShadowStretchMode;
+use crate::prim_store::ScrollNodeAndClipChain;
+use crate::render_task::RenderTaskCacheEntryHandle;
+use crate::util::RectHelpers;
+use crate::internal_types::LayoutPrimitiveInfo;
 
 #[derive(Debug, Clone, MallocSizeOf)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct BoxShadowClipSource {
     // Parameters that define the shadow and are constant.
     pub shadow_radius: BorderRadius,
     pub blur_radius: f32,
--- a/gfx/wr/webrender/src/capture.rs
+++ b/gfx/wr/webrender/src/capture.rs
@@ -7,17 +7,17 @@ use std::path::{Path, PathBuf};
 
 use api::{CaptureBits, ExternalImageData, ImageDescriptor};
 #[cfg(feature = "png")]
 use api::ImageFormat;
 use api::units::TexelRect;
 #[cfg(feature = "png")]
 use api::units::DeviceIntSize;
 #[cfg(feature = "capture")]
-use print_tree::{PrintableTree, PrintTree};
+use crate::print_tree::{PrintableTree, PrintTree};
 use ron;
 use serde;
 
 
 #[derive(Clone)]
 pub struct CaptureConfig {
     pub root: PathBuf,
     pub bits: CaptureBits,
--- a/gfx/wr/webrender/src/clip.rs
+++ b/gfx/wr/webrender/src/clip.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/. */
 
 use api::{BorderRadius, ClipIntern, ClipMode, ComplexClipRegion, ImageMask};
 use api::{BoxShadowClipMode, ImageKey, ImageRendering};
 use api::units::*;
-use border::{ensure_no_corner_overlap, BorderRadiusAu};
-use box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowClipSource, BoxShadowCacheKey};
-use clip_scroll_tree::{CoordinateSystemId, ClipScrollTree, SpatialNodeIndex};
-use ellipse::Ellipse;
-use gpu_cache::{GpuCache, GpuCacheHandle, ToGpuBlocks};
-use gpu_types::{BoxShadowStretchMode};
-use image::{self, Repetition};
-use intern;
-use prim_store::{ClipData, ImageMaskData, SpaceMapper, VisibleMaskImageTile};
-use prim_store::{PointKey, SizeKey, RectangleKey};
-use render_task::to_cache_size;
-use resource_cache::{ImageRequest, ResourceCache};
+use crate::border::{ensure_no_corner_overlap, BorderRadiusAu};
+use crate::box_shadow::{BLUR_SAMPLE_SCALE, BoxShadowClipSource, BoxShadowCacheKey};
+use crate::clip_scroll_tree::{CoordinateSystemId, ClipScrollTree, SpatialNodeIndex};
+use crate::ellipse::Ellipse;
+use crate::gpu_cache::{GpuCache, GpuCacheHandle, ToGpuBlocks};
+use crate::gpu_types::{BoxShadowStretchMode};
+use crate::image::{self, Repetition};
+use crate::intern;
+use crate::prim_store::{ClipData, ImageMaskData, SpaceMapper, VisibleMaskImageTile};
+use crate::prim_store::{PointKey, SizeKey, RectangleKey};
+use crate::render_task::to_cache_size;
+use crate::resource_cache::{ImageRequest, ResourceCache};
 use std::{cmp, u32};
-use util::{extract_inner_rect_safe, project_rect, ScaleOffset};
+use crate::util::{extract_inner_rect_safe, project_rect, ScaleOffset};
 
 /*
 
  Module Overview
 
  There are a number of data structures involved in the clip module:
 
  ClipStore - Main interface used by other modules.
--- a/gfx/wr/webrender/src/clip_scroll_tree.rs
+++ b/gfx/wr/webrender/src/clip_scroll_tree.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/. */
 
 use api::{ExternalScrollId, PropertyBinding, ReferenceFrameKind, TransformStyle};
 use api::{PipelineId, ScrollClamping, ScrollNodeState, ScrollLocation, ScrollSensitivity};
 use api::units::*;
 use euclid::TypedTransform3D;
-use gpu_types::TransformPalette;
-use internal_types::{FastHashMap, FastHashSet};
-use print_tree::{PrintableTree, PrintTree, PrintTreePrinter};
-use scene::SceneProperties;
-use spatial_node::{ScrollFrameInfo, SpatialNode, SpatialNodeType, StickyFrameInfo, ScrollFrameKind};
+use crate::gpu_types::TransformPalette;
+use crate::internal_types::{FastHashMap, FastHashSet};
+use crate::print_tree::{PrintableTree, PrintTree, PrintTreePrinter};
+use crate::scene::SceneProperties;
+use crate::spatial_node::{ScrollFrameInfo, SpatialNode, SpatialNodeType, StickyFrameInfo, ScrollFrameKind};
 use std::{ops, u32};
-use util::{LayoutToWorldFastTransform, MatrixHelpers, ScaleOffset};
+use crate::util::{LayoutToWorldFastTransform, MatrixHelpers, ScaleOffset};
 
 pub type ScrollStates = FastHashMap<ExternalScrollId, ScrollFrameInfo>;
 
 /// An id that identifies coordinate systems in the ClipScrollTree. Each
 /// coordinate system has an id and those ids will be shared when the coordinates
 /// system are the same or are in the same axis-aligned space. This allows
 /// for optimizing mask generation.
 #[derive(Debug, Copy, Clone, PartialEq)]
--- a/gfx/wr/webrender/src/debug_render.rs
+++ b/gfx/wr/webrender/src/debug_render.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/. */
 
 use api::{ColorU, ColorF, ImageFormat, TextureTarget};
 use api::units::*;
-use debug_font_data;
-use device::{Device, Program, Texture, TextureSlot, VertexDescriptor, ShaderError, VAO};
-use device::{TextureFilter, VertexAttribute, VertexAttributeKind, VertexUsageHint};
+use crate::debug_font_data;
+use crate::device::{Device, Program, Texture, TextureSlot, VertexDescriptor, ShaderError, VAO};
+use crate::device::{TextureFilter, VertexAttribute, VertexAttributeKind, VertexUsageHint};
 use euclid::{Point2D, Rect, Size2D, Transform3D};
-use internal_types::{ORTHO_FAR_PLANE, ORTHO_NEAR_PLANE};
+use crate::internal_types::{ORTHO_FAR_PLANE, ORTHO_NEAR_PLANE};
 use std::f32;
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub enum DebugItem {
     Text {
         msg: String,
         color: ColorF,
--- a/gfx/wr/webrender/src/debug_server.rs
+++ b/gfx/wr/webrender/src/debug_server.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 api::{ApiMsg, DebugCommand, DebugFlags};
 use api::channel::MsgSender;
 use api::units::DeviceIntSize;
-use print_tree::PrintTreePrinter;
-use renderer;
+use crate::print_tree::PrintTreePrinter;
+use crate::renderer;
 use std::sync::mpsc::{channel, Receiver};
 use std::sync::mpsc::Sender;
 use std::thread;
 use ws;
 use base64::encode;
 use image_loader;
 
 // Messages that are sent from the render backend to the renderer
--- a/gfx/wr/webrender/src/device/gl.rs
+++ b/gfx/wr/webrender/src/device/gl.rs
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use super::super::shader_source::SHADERS;
 use api::{ColorF, ImageDescriptor, ImageFormat, MemoryReport};
 use api::{MixBlendMode, TextureTarget, VoidPtrToSizeFn};
 use api::units::*;
 use euclid::Transform3D;
 use gleam::gl;
-use internal_types::{FastHashMap, LayerIndex, RenderTargetInfo};
+use crate::internal_types::{FastHashMap, LayerIndex, RenderTargetInfo};
 use log::Level;
-use profiler;
+use crate::profiler;
 use sha2::{Digest, Sha256};
 use smallvec::SmallVec;
 use std::borrow::Cow;
 use std::cell::{Cell, RefCell};
 use std::cmp;
 use std::collections::hash_map::Entry;
 use std::marker::PhantomData;
 use std::mem;
--- a/gfx/wr/webrender/src/device/query_gl.rs
+++ b/gfx/wr/webrender/src/device/query_gl.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 gleam::gl;
 use std::mem;
 use std::rc::Rc;
 
-use device::GpuFrameId;
+use crate::device::GpuFrameId;
 
 #[derive(Copy, Clone, Debug)]
 pub enum GpuDebugMethod {
     None,
     MarkerEXT,
     KHR,
 }
 
--- a/gfx/wr/webrender/src/display_list_flattener.rs
+++ b/gfx/wr/webrender/src/display_list_flattener.rs
@@ -7,48 +7,48 @@ use api::{ClipId, ColorF, CommonItemProp
 use api::{DisplayItem, DisplayItemRef, ExtendMode, ExternalScrollId};
 use api::{FilterOp, FontInstanceKey, GlyphInstance, GlyphOptions, GradientStop};
 use api::{IframeDisplayItem, ImageKey, ImageRendering, ItemRange, ColorDepth};
 use api::{LineOrientation, LineStyle, NinePatchBorderSource, PipelineId};
 use api::{PropertyBinding, ReferenceFrame, ReferenceFrameKind, ScrollFrameDisplayItem, ScrollSensitivity};
 use api::{Shadow, SpaceAndClipInfo, SpatialId, StackingContext, StickyFrameDisplayItem};
 use api::{ClipMode, PrimitiveKeyKind, TransformStyle, YuvColorSpace, YuvData, TempFilterData};
 use api::units::*;
-use clip::{ClipChainId, ClipRegion, ClipItemKey, ClipStore};
-use clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex};
-use frame_builder::{ChasePrimitive, FrameBuilder, FrameBuilderConfig};
-use glyph_rasterizer::FontInstance;
-use hit_test::{HitTestingItem, HitTestingScene};
-use image::simplify_repeated_primitive;
-use intern::Interner;
-use internal_types::{FastHashMap, FastHashSet, LayoutPrimitiveInfo};
-use picture::{Picture3DContext, PictureCompositeMode, PicturePrimitive, PictureOptions};
-use picture::{BlitReason, PrimitiveList, TileCache};
-use prim_store::{PrimitiveInstance, PrimitiveSceneData};
-use prim_store::{PrimitiveInstanceKind, NinePatchDescriptor, PrimitiveStore};
-use prim_store::{ScrollNodeAndClipChain, PictureIndex};
-use prim_store::{InternablePrimitive, SegmentInstanceIndex};
-use prim_store::{register_prim_chase_id, get_line_decoration_sizes};
-use prim_store::borders::{ImageBorder, NormalBorderPrim};
-use prim_store::gradient::{GradientStopKey, LinearGradient, RadialGradient, RadialGradientParams};
-use prim_store::image::{Image, YuvImage};
-use prim_store::line_dec::{LineDecoration, LineDecorationCacheKey};
-use prim_store::picture::{Picture, PictureCompositeKey, PictureKey};
-use prim_store::text_run::TextRun;
-use render_backend::{DocumentView};
-use resource_cache::{FontInstanceMap, ImageRequest};
-use scene::{Scene, StackingContextHelpers};
-use scene_builder::{DocumentStats, Interners};
-use spatial_node::{StickyFrameInfo, ScrollFrameKind, SpatialNodeType};
+use crate::clip::{ClipChainId, ClipRegion, ClipItemKey, ClipStore};
+use crate::clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex};
+use crate::frame_builder::{ChasePrimitive, FrameBuilder, FrameBuilderConfig};
+use crate::glyph_rasterizer::FontInstance;
+use crate::hit_test::{HitTestingItem, HitTestingScene};
+use crate::image::simplify_repeated_primitive;
+use crate::intern::Interner;
+use crate::internal_types::{FastHashMap, FastHashSet, LayoutPrimitiveInfo};
+use crate::picture::{Picture3DContext, PictureCompositeMode, PicturePrimitive, PictureOptions};
+use crate::picture::{BlitReason, PrimitiveList, TileCache};
+use crate::prim_store::{PrimitiveInstance, PrimitiveSceneData};
+use crate::prim_store::{PrimitiveInstanceKind, NinePatchDescriptor, PrimitiveStore};
+use crate::prim_store::{ScrollNodeAndClipChain, PictureIndex};
+use crate::prim_store::{InternablePrimitive, SegmentInstanceIndex};
+use crate::prim_store::{register_prim_chase_id, get_line_decoration_sizes};
+use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+use crate::prim_store::gradient::{GradientStopKey, LinearGradient, RadialGradient, RadialGradientParams};
+use crate::prim_store::image::{Image, YuvImage};
+use crate::prim_store::line_dec::{LineDecoration, LineDecorationCacheKey};
+use crate::prim_store::picture::{Picture, PictureCompositeKey, PictureKey};
+use crate::prim_store::text_run::TextRun;
+use crate::render_backend::{DocumentView};
+use crate::resource_cache::{FontInstanceMap, ImageRequest};
+use crate::scene::{Scene, StackingContextHelpers};
+use crate::scene_builder::{DocumentStats, Interners};
+use crate::spatial_node::{StickyFrameInfo, ScrollFrameKind, SpatialNodeType};
 use std::{f32, mem, usize, ops};
 use std::collections::vec_deque::VecDeque;
 use std::sync::Arc;
-use tiling::{CompositeOps};
-use util::{MaxRect, VecHelper};
-use ::filterdata::{SFilterDataComponent, SFilterData, SFilterDataKey};
+use crate::tiling::{CompositeOps};
+use crate::util::{MaxRect, VecHelper};
+use crate::filterdata::{SFilterDataComponent, SFilterData, SFilterDataKey};
 
 #[derive(Debug, Copy, Clone)]
 struct ClipNode {
     id: ClipChainId,
     count: usize,
 }
 
 
--- a/gfx/wr/webrender/src/filterdata.rs
+++ b/gfx/wr/webrender/src/filterdata.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 std::{hash};
-use gpu_cache::{GpuCacheHandle};
-use frame_builder::FrameBuildingState;
-use gpu_cache::GpuDataRequest;
-use intern;
+use crate::gpu_cache::{GpuCacheHandle};
+use crate::frame_builder::FrameBuildingState;
+use crate::gpu_cache::GpuDataRequest;
+use crate::intern;
 use api::{FilterDataIntern, ComponentTransferFuncType};
 
 
 pub type FilterDataHandle = intern::Handle<FilterDataIntern>;
 
 #[derive(Debug, Clone, MallocSizeOf, PartialEq)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
--- a/gfx/wr/webrender/src/frame_builder.rs
+++ b/gfx/wr/webrender/src/frame_builder.rs
@@ -1,39 +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/. */
 
 use api::{ColorF, DebugFlags, DocumentLayer, FontRenderMode, PremultipliedColorF};
 use api::{PipelineId, RasterSpace};
 use api::units::*;
-use clip::{ClipDataStore, ClipStore, ClipChainStack};
-use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
-use display_list_flattener::{DisplayListFlattener};
-use gpu_cache::{GpuCache, GpuCacheHandle};
-use gpu_types::{PrimitiveHeaders, TransformPalette, UvRectKind, ZBufferIdGenerator};
-use hit_test::{HitTester, HitTestingScene};
+use crate::clip::{ClipDataStore, ClipStore, ClipChainStack};
+use crate::clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
+use crate::display_list_flattener::{DisplayListFlattener};
+use crate::gpu_cache::{GpuCache, GpuCacheHandle};
+use crate::gpu_types::{PrimitiveHeaders, TransformPalette, UvRectKind, ZBufferIdGenerator};
+use crate::hit_test::{HitTester, HitTestingScene};
 #[cfg(feature = "replay")]
-use hit_test::HitTestingSceneStats;
-use internal_types::{FastHashMap, PlaneSplitter};
-use picture::{PictureUpdateState, SurfaceInfo, ROOT_SURFACE_INDEX, SurfaceIndex};
-use picture::{RetainedTiles, TileCache, DirtyRegion};
-use prim_store::{PrimitiveStore, SpaceMapper, PictureIndex, PrimitiveDebugId, PrimitiveScratchBuffer};
+use crate::hit_test::HitTestingSceneStats;
+use crate::internal_types::{FastHashMap, PlaneSplitter};
+use crate::picture::{PictureUpdateState, SurfaceInfo, ROOT_SURFACE_INDEX, SurfaceIndex};
+use crate::picture::{RetainedTiles, TileCache, DirtyRegion};
+use crate::prim_store::{PrimitiveStore, SpaceMapper, PictureIndex, PrimitiveDebugId, PrimitiveScratchBuffer};
 #[cfg(feature = "replay")]
-use prim_store::{PrimitiveStoreStats};
-use profiler::{FrameProfileCounters, GpuCacheProfileCounters, TextureCacheProfileCounters};
-use render_backend::{DataStores, FrameStamp};
-use render_task::{RenderTask, RenderTaskId, RenderTaskLocation, RenderTaskTree, RenderTaskTreeCounters};
-use resource_cache::{ResourceCache};
-use scene::{ScenePipeline, SceneProperties};
-use scene_builder::DocumentStats;
-use segment::SegmentBuilder;
+use crate::prim_store::{PrimitiveStoreStats};
+use crate::profiler::{FrameProfileCounters, GpuCacheProfileCounters, TextureCacheProfileCounters};
+use crate::render_backend::{DataStores, FrameStamp};
+use crate::render_task::{RenderTask, RenderTaskId, RenderTaskLocation, RenderTaskTree, RenderTaskTreeCounters};
+use crate::resource_cache::{ResourceCache};
+use crate::scene::{ScenePipeline, SceneProperties};
+use crate::scene_builder::DocumentStats;
+use crate::segment::SegmentBuilder;
 use std::{f32, mem};
 use std::sync::Arc;
-use tiling::{Frame, RenderPassKind, RenderTargetContext, RenderTarget};
+use crate::tiling::{Frame, RenderPassKind, RenderTargetContext, RenderTarget};
 
 
 #[derive(Clone, Copy, Debug, PartialEq)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub enum ChasePrimitive {
     Nothing,
     Id(PrimitiveDebugId),
--- a/gfx/wr/webrender/src/glyph_rasterizer/mod.rs
+++ b/gfx/wr/webrender/src/glyph_rasterizer/mod.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/. */
 
 use api::{FontInstanceFlags, FontInstancePlatformOptions};
 use api::{FontKey, FontInstanceKey, FontRenderMode, FontTemplate, FontVariation};
 use api::{ColorU, GlyphIndex, GlyphDimensions, SyntheticItalics};
 use api::units::*;
 use euclid::approxeq::ApproxEq;
-use internal_types::ResourceCacheError;
+use crate::internal_types::ResourceCacheError;
 use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
-use platform::font::FontContext;
+use crate::platform::font::FontContext;
 use rayon::ThreadPool;
 use std::cmp;
 use std::hash::{Hash, Hasher};
 use std::mem;
 use std::ops::Deref;
 use std::sync::{Arc, Condvar, Mutex, MutexGuard};
 use std::sync::mpsc::{channel, Receiver, Sender};
 
@@ -803,17 +803,17 @@ impl AddFont for FontContext {
             FontTemplate::Native(ref native_font_handle) => {
                 self.add_native_font(font_key, (*native_font_handle).clone());
             }
         }
     }
 }
 
 #[allow(dead_code)]
-pub(in glyph_rasterizer) struct GlyphRasterJob {
+pub(in crate::glyph_rasterizer) struct GlyphRasterJob {
     key: GlyphKey,
     result: GlyphRasterResult,
 }
 
 #[allow(dead_code)]
 pub enum GlyphRasterError {
     LoadFailed,
 }
@@ -837,28 +837,28 @@ mod test_glyph_rasterizer {
     #[test]
     fn rasterize_200_glyphs() {
         // This test loads a font from disc, the renders 4 requests containing
         // 50 glyphs each, deletes the font and waits for the result.
 
         use rayon::ThreadPoolBuilder;
         use std::fs::File;
         use std::io::Read;
-        use texture_cache::TextureCache;
-        use glyph_cache::GlyphCache;
-        use gpu_cache::GpuCache;
-        use render_task::{RenderTaskCache, RenderTaskTree, RenderTaskTreeCounters};
-        use profiler::TextureCacheProfileCounters;
+        use crate::texture_cache::TextureCache;
+        use crate::glyph_cache::GlyphCache;
+        use crate::gpu_cache::GpuCache;
+        use crate::render_task::{RenderTaskCache, RenderTaskTree, RenderTaskTreeCounters};
+        use crate::profiler::TextureCacheProfileCounters;
         use api::{FontKey, FontInstanceKey, FontTemplate, FontRenderMode,
                   IdNamespace, ColorU};
         use api::units::{Au, DevicePoint};
-        use render_backend::FrameId;
+        use crate::render_backend::FrameId;
         use thread_profiler::register_thread_with_profiler;
         use std::sync::Arc;
-        use glyph_rasterizer::{FontInstance, BaseFontInstance, GlyphKey, GlyphRasterizer};
+        use crate::glyph_rasterizer::{FontInstance, BaseFontInstance, GlyphKey, GlyphRasterizer};
 
         let worker = ThreadPoolBuilder::new()
             .thread_name(|idx|{ format!("WRWorker#{}", idx) })
             .start_handler(move |idx| {
                 register_thread_with_profiler(format!("WRWorker#{}", idx));
             })
             .build();
         let workers = Arc::new(worker.unwrap());
@@ -922,17 +922,17 @@ mod test_glyph_rasterizer {
             &mut render_task_cache,
             &mut render_task_tree,
             &mut TextureCacheProfileCounters::new(),
         );
     }
 
     #[test]
     fn test_subpx_quantize() {
-        use glyph_rasterizer::SubpixelOffset;
+        use crate::glyph_rasterizer::SubpixelOffset;
 
         assert_eq!(SubpixelOffset::quantize(0.0), SubpixelOffset::Zero);
         assert_eq!(SubpixelOffset::quantize(-0.0), SubpixelOffset::Zero);
 
         assert_eq!(SubpixelOffset::quantize(0.1), SubpixelOffset::Zero);
         assert_eq!(SubpixelOffset::quantize(0.01), SubpixelOffset::Zero);
         assert_eq!(SubpixelOffset::quantize(0.05), SubpixelOffset::Zero);
         assert_eq!(SubpixelOffset::quantize(0.12), SubpixelOffset::Zero);
--- a/gfx/wr/webrender/src/glyph_rasterizer/no_pathfinder.rs
+++ b/gfx/wr/webrender/src/glyph_rasterizer/no_pathfinder.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/. */
 
 //! Module only available when pathfinder is deactivated when webrender is
 //! compiled regularly (i.e. any configuration without feature = "pathfinder")
 
 use api::{ImageDescriptor, ImageFormat, DirtyRect};
-use device::TextureFilter;
+use crate::device::TextureFilter;
 use euclid::size2;
-use gpu_types::UvRectKind;
+use crate::gpu_types::UvRectKind;
 use rayon::prelude::*;
 use std::sync::{Arc, MutexGuard};
-use platform::font::FontContext;
-use glyph_rasterizer::{FontInstance, FontContexts, GlyphKey};
-use glyph_rasterizer::{GlyphRasterizer, GlyphRasterJob, GlyphRasterJobs};
-use glyph_cache::{GlyphCache, CachedGlyphInfo, GlyphCacheEntry};
-use resource_cache::CachedImageData;
-use texture_cache::{TextureCache, TextureCacheHandle, Eviction};
-use gpu_cache::GpuCache;
-use render_task::{RenderTaskTree, RenderTaskCache};
-use profiler::TextureCacheProfileCounters;
+use crate::platform::font::FontContext;
+use crate::glyph_rasterizer::{FontInstance, FontContexts, GlyphKey};
+use crate::glyph_rasterizer::{GlyphRasterizer, GlyphRasterJob, GlyphRasterJobs};
+use crate::glyph_cache::{GlyphCache, CachedGlyphInfo, GlyphCacheEntry};
+use crate::resource_cache::CachedImageData;
+use crate::texture_cache::{TextureCache, TextureCacheHandle, Eviction};
+use crate::gpu_cache::GpuCache;
+use crate::render_task::{RenderTaskTree, RenderTaskCache};
+use crate::profiler::TextureCacheProfileCounters;
 use std::collections::hash_map::Entry;
 
 impl FontContexts {
     /// Get access to the font context associated to the current thread.
     pub fn lock_current_context(&self) -> MutexGuard<FontContext> {
         let id = self.current_worker_id();
         self.lock_context(id)
     }
--- a/gfx/wr/webrender/src/gpu_cache.rs
+++ b/gfx/wr/webrender/src/gpu_cache.rs
@@ -24,20 +24,20 @@
 //! address in the GPU cache of a given resource slot
 //! for this frame.
 
 use api::{DebugFlags, DocumentId, PremultipliedColorF};
 #[cfg(test)]
 use api::IdNamespace;
 use api::units::TexelRect;
 use euclid::{HomogeneousVector, TypedRect};
-use internal_types::{FastHashMap, FastHashSet};
-use profiler::GpuCacheProfileCounters;
-use render_backend::{FrameStamp, FrameId};
-use renderer::MAX_VERTEX_TEXTURE_WIDTH;
+use crate::internal_types::{FastHashMap, FastHashSet};
+use crate::profiler::GpuCacheProfileCounters;
+use crate::render_backend::{FrameStamp, FrameId};
+use crate::renderer::MAX_VERTEX_TEXTURE_WIDTH;
 use std::{mem, u16, u32};
 use std::num::NonZeroU32;
 use std::ops::Add;
 use std::time::{Duration, Instant};
 
 
 /// At the time of this writing, Firefox uses about 15 GPU cache rows on
 /// startup, and then gradually works its way up to the mid-30s with normal
@@ -136,17 +136,17 @@ impl From<TexelRect> for GpuBlockData {
     }
 }
 
 
 // Any data type that can be stored in the GPU cache should
 // implement this trait.
 pub trait ToGpuBlocks {
     // Request an arbitrary number of GPU data blocks.
-    fn write_gpu_blocks(&self, GpuDataRequest);
+    fn write_gpu_blocks(&self, _: GpuDataRequest);
 }
 
 // A handle to a GPU resource.
 #[derive(Debug, Copy, Clone, MallocSizeOf)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct GpuCacheHandle {
     location: Option<CacheLocation>,
--- a/gfx/wr/webrender/src/gpu_types.rs
+++ b/gfx/wr/webrender/src/gpu_types.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/. */
 
 use api::{DocumentLayer, PremultipliedColorF};
 use api::units::*;
-use clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
-use gpu_cache::{GpuCacheAddress, GpuDataRequest};
-use internal_types::FastHashMap;
-use prim_store::EdgeAaSegmentMask;
-use render_task::RenderTaskAddress;
+use crate::clip_scroll_tree::{ClipScrollTree, ROOT_SPATIAL_NODE_INDEX, SpatialNodeIndex};
+use crate::gpu_cache::{GpuCacheAddress, GpuDataRequest};
+use crate::internal_types::FastHashMap;
+use crate::prim_store::EdgeAaSegmentMask;
+use crate::render_task::RenderTaskAddress;
 use std::i32;
-use util::{TransformedRectKind, MatrixHelpers};
+use crate::util::{TransformedRectKind, MatrixHelpers};
 
 // Contains type that must exactly match the same structures declared in GLSL.
 
 pub const VECS_PER_TRANSFORM: usize = 8;
 
 #[derive(Copy, Clone, Debug, PartialEq)]
 #[repr(C)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
--- a/gfx/wr/webrender/src/hit_test.rs
+++ b/gfx/wr/webrender/src/hit_test.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 api::{BorderRadius, ClipMode, HitTestFlags, HitTestItem, HitTestResult, ItemTag};
 use api::PipelineId;
 use api::units::*;
-use clip::{ClipChainId, ClipDataStore, ClipNode, ClipItem, ClipStore};
-use clip::{rounded_rectangle_contains_point};
-use clip_scroll_tree::{SpatialNodeIndex, ClipScrollTree};
-use internal_types::{FastHashMap, LayoutPrimitiveInfo};
+use crate::clip::{ClipChainId, ClipDataStore, ClipNode, ClipItem, ClipStore};
+use crate::clip::{rounded_rectangle_contains_point};
+use crate::clip_scroll_tree::{SpatialNodeIndex, ClipScrollTree};
+use crate::internal_types::{FastHashMap, LayoutPrimitiveInfo};
 use std::{ops, u32};
 use std::sync::Arc;
-use util::{LayoutToWorldFastTransform, WorldToLayoutFastTransform};
+use crate::util::{LayoutToWorldFastTransform, WorldToLayoutFastTransform};
 
 /// A copy of important clip scroll node data to use during hit testing. This a copy of
 /// data from the ClipScrollTree that will persist as a new frame is under construction,
 /// allowing hit tests consistent with the currently rendered frame.
 #[derive(MallocSizeOf)]
 pub struct HitTestSpatialNode {
     /// The pipeline id of this node.
     pipeline_id: PipelineId,
--- a/gfx/wr/webrender/src/image.rs
+++ b/gfx/wr/webrender/src/image.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/. */
 
 use api::TileSize;
 use api::units::*;
 use euclid::{point2, size2};
-use prim_store::EdgeAaSegmentMask;
+use crate::prim_store::EdgeAaSegmentMask;
 
 use std::i32;
 use std::ops::Range;
 
 /// If repetitions are far enough apart that only one is within
 /// the primitive rect, then we can simplify the parameters and
 /// treat the primitive as not repeated.
 /// This can let us avoid unnecessary work later to handle some
--- a/gfx/wr/webrender/src/intern.rs
+++ b/gfx/wr/webrender/src/intern.rs
@@ -28,25 +28,25 @@
 //! free-list structure, for content access and memory
 //! usage efficiency.
 //!
 //! The epoch is incremented each time a scene is
 //! built. The most recently used scene epoch is
 //! stored inside each handle. This is then used for
 //! cache invalidation.
 
-use internal_types::FastHashMap;
+use crate::internal_types::FastHashMap;
 use malloc_size_of::MallocSizeOf;
-use profiler::ResourceProfileCounter;
+use crate::profiler::ResourceProfileCounter;
 use std::fmt::Debug;
 use std::hash::Hash;
 use std::marker::PhantomData;
 use std::{mem, ops, u64};
 use std::sync::atomic::{AtomicUsize, Ordering};
-use util::VecHelper;
+use crate::util::VecHelper;
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq)]
 struct Epoch(u64);
 
 /// A list of updates to be applied to the data store,
 /// provided by the interning structure.
--- a/gfx/wr/webrender/src/internal_types.rs
+++ b/gfx/wr/webrender/src/internal_types.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/. */
 
 use api::{DebugCommand, DocumentId, ExternalImageData, ExternalImageId};
 use api::{ImageFormat, ItemTag, NotificationRequest};
 use api::units::*;
-use device::TextureFilter;
-use renderer::PipelineInfo;
-use gpu_cache::GpuCacheUpdateList;
+use crate::device::TextureFilter;
+use crate::renderer::PipelineInfo;
+use crate::gpu_cache::GpuCacheUpdateList;
 use fxhash::FxHasher;
 use plane_split::BspSplitter;
-use profiler::BackendProfileCounters;
+use crate::profiler::BackendProfileCounters;
 use std::{usize, i32};
 use std::collections::{HashMap, HashSet};
 use std::f32;
 use std::hash::BuildHasherDefault;
 use std::path::PathBuf;
 use std::sync::Arc;
 
 #[cfg(feature = "capture")]
-use capture::{CaptureConfig, ExternalCaptureImage};
+use crate::capture::{CaptureConfig, ExternalCaptureImage};
 #[cfg(feature = "replay")]
-use capture::PlainExternalImage;
-use tiling;
+use crate::capture::PlainExternalImage;
+use crate::tiling;
 
 pub type FastHashMap<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher>>;
 pub type FastHashSet<K> = HashSet<K, BuildHasherDefault<FxHasher>>;
 
 /// A concrete plane splitter type used in WebRender.
 pub type PlaneSplitter = BspSplitter<f64, WorldPixel>;
 
 /// An ID for a texture that is owned by the `texture_cache` module.
--- a/gfx/wr/webrender/src/lib.rs
+++ b/gfx/wr/webrender/src/lib.rs
@@ -123,21 +123,21 @@ mod texture_allocator;
 mod texture_cache;
 mod tiling;
 mod util;
 
 mod shader_source {
     include!(concat!(env!("OUT_DIR"), "/shaders.rs"));
 }
 
-pub use record::{ApiRecordingReceiver, BinaryRecorder, WEBRENDER_RECORDING_HEADER};
+pub use crate::record::{ApiRecordingReceiver, BinaryRecorder, WEBRENDER_RECORDING_HEADER};
 
 mod platform {
     #[cfg(target_os = "macos")]
-    pub use platform::macos::font;
+    pub use crate::platform::macos::font;
     #[cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))]
     pub use crate::platform::unix::font;
     #[cfg(target_os = "windows")]
     pub use crate::platform::windows::font;
 
     #[cfg(target_os = "macos")]
     pub mod macos {
         pub mod font;
@@ -201,20 +201,20 @@ extern crate png;
 #[cfg(test)]
 extern crate rand;
 
 #[macro_use]
 pub extern crate api;
 extern crate webrender_build;
 
 #[doc(hidden)]
-pub use device::{build_shader_strings, UploadMethod, VertexUsageHint};
-pub use device::{ProgramBinary, ProgramCache, ProgramCacheObserver};
-pub use device::Device;
-pub use frame_builder::ChasePrimitive;
-pub use profiler::{ProfilerHooks, set_profiler_hooks};
-pub use renderer::{AsyncPropertySampler, AsyncScreenshotHandle, CpuProfile, DebugFlags};
-pub use renderer::{OutputImageHandler, RendererKind, ExternalImage, ExternalImageHandler};
-pub use renderer::{ExternalImageSource, GpuProfile, GraphicsApi, GraphicsApiInfo, PipelineInfo};
-pub use renderer::{Renderer, RendererOptions, RenderResults, RendererStats, SceneBuilderHooks};
-pub use renderer::{ThreadListener, ShaderPrecacheFlags, MAX_VERTEX_TEXTURE_WIDTH};
-pub use shade::{Shaders, WrShaders};
+pub use crate::device::{build_shader_strings, UploadMethod, VertexUsageHint};
+pub use crate::device::{ProgramBinary, ProgramCache, ProgramCacheObserver};
+pub use crate::device::Device;
+pub use crate::frame_builder::ChasePrimitive;
+pub use crate::profiler::{ProfilerHooks, set_profiler_hooks};
+pub use crate::renderer::{AsyncPropertySampler, AsyncScreenshotHandle, CpuProfile, DebugFlags};
+pub use crate::renderer::{OutputImageHandler, RendererKind, ExternalImage, ExternalImageHandler};
+pub use crate::renderer::{ExternalImageSource, GpuProfile, GraphicsApi, GraphicsApiInfo, PipelineInfo};
+pub use crate::renderer::{Renderer, RendererOptions, RenderResults, RendererStats, SceneBuilderHooks};
+pub use crate::renderer::{ThreadListener, ShaderPrecacheFlags, MAX_VERTEX_TEXTURE_WIDTH};
+pub use crate::shade::{Shaders, WrShaders};
 pub use api as webrender_api;
--- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.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/. */
 
 use api::{FilterOp, MixBlendMode, PipelineId, PremultipliedColorF};
 use api::{PropertyBinding, PropertyBindingId};
 use api::{DebugFlags, RasterSpace, ColorF, ImageKey, ClipMode};
 use api::units::*;
-use box_shadow::{BLUR_SAMPLE_SCALE};
-use clip::{ClipChainId, ClipChainNode, ClipItem, ClipStore, ClipDataStore, ClipChainStack};
-use clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX,
+use crate::box_shadow::{BLUR_SAMPLE_SCALE};
+use crate::clip::{ClipChainId, ClipChainNode, ClipItem, ClipStore, ClipDataStore, ClipChainStack};
+use crate::clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX,
     ClipScrollTree, CoordinateSystemId, SpatialNodeIndex, VisibleFace
 };
-use debug_colors;
+use crate::debug_colors;
 use euclid::{size2, vec3, TypedPoint2D, TypedScale, TypedSize2D};
 use euclid::approxeq::ApproxEq;
-use frame_builder::{FrameVisibilityContext, FrameVisibilityState};
-use intern::ItemUid;
-use internal_types::{FastHashMap, FastHashSet, PlaneSplitter};
-use frame_builder::{FrameBuildingContext, FrameBuildingState, PictureState, PictureContext};
-use gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
-use gpu_types::{TransformPalette, UvRectKind};
+use crate::frame_builder::{FrameVisibilityContext, FrameVisibilityState};
+use crate::intern::ItemUid;
+use crate::internal_types::{FastHashMap, FastHashSet, PlaneSplitter};
+use crate::frame_builder::{FrameBuildingContext, FrameBuildingState, PictureState, PictureContext};
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
+use crate::gpu_types::{TransformPalette, UvRectKind};
 use plane_split::{Clipper, Polygon, Splitter};
-use prim_store::{CoordinateSpaceMapping, SpaceMapper};
-use prim_store::{PictureIndex, PrimitiveInstance, PrimitiveInstanceKind};
-use prim_store::{get_raster_rects, PrimitiveScratchBuffer, VectorKey, PointKey};
-use prim_store::{OpacityBindingStorage, ImageInstanceStorage, OpacityBindingIndex, RectangleKey};
-use print_tree::PrintTreePrinter;
-use render_backend::DataStores;
-use render_task::{ClearMode, RenderTask, TileBlit};
-use render_task::{RenderTaskId, RenderTaskLocation};
-use resource_cache::ResourceCache;
-use scene::{FilterOpHelpers, SceneProperties};
-use scene_builder::Interners;
+use crate::prim_store::{CoordinateSpaceMapping, SpaceMapper};
+use crate::prim_store::{PictureIndex, PrimitiveInstance, PrimitiveInstanceKind};
+use crate::prim_store::{get_raster_rects, PrimitiveScratchBuffer, VectorKey, PointKey};
+use crate::prim_store::{OpacityBindingStorage, ImageInstanceStorage, OpacityBindingIndex, RectangleKey};
+use crate::print_tree::PrintTreePrinter;
+use crate::render_backend::DataStores;
+use crate::render_task::{ClearMode, RenderTask, TileBlit};
+use crate::render_task::{RenderTaskId, RenderTaskLocation};
+use crate::resource_cache::ResourceCache;
+use crate::scene::{FilterOpHelpers, SceneProperties};
+use crate::scene_builder::Interners;
 use smallvec::SmallVec;
 use std::{mem, u16};
 use std::sync::atomic::{AtomicUsize, Ordering};
-use texture_cache::TextureCacheHandle;
-use tiling::RenderTargetKind;
-use util::{ComparableVec, TransformedRectKind, MatrixHelpers, MaxRect, scale_factors};
-use ::filterdata::{FilterDataHandle};
+use crate::texture_cache::TextureCacheHandle;
+use crate::tiling::RenderTargetKind;
+use crate::util::{ComparableVec, TransformedRectKind, MatrixHelpers, MaxRect, scale_factors};
+use crate::filterdata::{FilterDataHandle};
 
 /*
  A picture represents a dynamically rendered image. It consists of:
 
  * A number of primitives that are drawn onto the picture.
  * A composite operation describing how to composite this
    picture into its parent.
  * A configuration describing how to draw the primitives on
--- a/gfx/wr/webrender/src/platform/macos/font.rs
+++ b/gfx/wr/webrender/src/platform/macos/font.rs
@@ -20,23 +20,23 @@ use core_graphics::data_provider::CGData
 use core_graphics::font::{CGFont, CGGlyph};
 use core_graphics::geometry::{CGAffineTransform, CGPoint, CGSize};
 #[cfg(not(feature = "pathfinder"))]
 use core_graphics::geometry::{CG_AFFINE_TRANSFORM_IDENTITY, CGRect};
 use core_text;
 use core_text::font::{CTFont, CTFontRef};
 use core_text::font_descriptor::{kCTFontDefaultOrientation, kCTFontColorGlyphsTrait};
 use euclid::Size2D;
-use gamma_lut::{ColorLut, GammaLut};
-use glyph_rasterizer::{FontInstance, FontTransform, GlyphKey};
+use crate::gamma_lut::{ColorLut, GammaLut};
+use crate::glyph_rasterizer::{FontInstance, FontTransform, GlyphKey};
 #[cfg(feature = "pathfinder")]
 use crate::glyph_rasterizer::NativeFontHandleWrapper;
 #[cfg(not(feature = "pathfinder"))]
-use glyph_rasterizer::{GlyphFormat, GlyphRasterError, GlyphRasterResult, RasterizedGlyph};
-use internal_types::{FastHashMap, ResourceCacheError};
+use crate::glyph_rasterizer::{GlyphFormat, GlyphRasterError, GlyphRasterResult, RasterizedGlyph};
+use crate::internal_types::{FastHashMap, ResourceCacheError};
 use std::collections::hash_map::Entry;
 use std::sync::Arc;
 
 const INITIAL_CG_CONTEXT_SIDE_LENGTH: u32 = 32;
 
 pub struct FontContext {
     cg_fonts: FastHashMap<FontKey, CGFont>,
     ct_fonts: FastHashMap<(FontKey, Au, Vec<FontVariation>), CTFont>,
--- a/gfx/wr/webrender/src/prim_store/borders.rs
+++ b/gfx/wr/webrender/src/prim_store/borders.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/. */
 
 use api::{NormalBorder, PremultipliedColorF, Shadow};
 use api::units::*;
-use border::create_border_segments;
-use border::NormalBorderAu;
-use display_list_flattener::{CreateShadow, IsVisible};
-use frame_builder::{FrameBuildingState};
-use gpu_cache::{GpuCache, GpuDataRequest};
-use intern;
-use internal_types::LayoutPrimitiveInfo;
-use prim_store::{
+use crate::border::create_border_segments;
+use crate::border::NormalBorderAu;
+use crate::display_list_flattener::{CreateShadow, IsVisible};
+use crate::frame_builder::{FrameBuildingState};
+use crate::gpu_cache::{GpuCache, GpuDataRequest};
+use crate::intern;
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{
     BorderSegmentInfo, BrushSegment, NinePatchDescriptor, PrimKey,
     PrimKeyCommonData, PrimTemplate, PrimTemplateCommonData,
     PrimitiveInstanceKind, PrimitiveOpacity, PrimitiveSceneData,
     PrimitiveStore, InternablePrimitive,
 };
-use resource_cache::{ImageRequest, ResourceCache};
-use storage;
+use crate::resource_cache::{ImageRequest, ResourceCache};
+use crate::storage;
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
 pub struct NormalBorderPrim {
     pub border: NormalBorderAu,
     pub widths: LayoutSideOffsetsAu,
 }
--- a/gfx/wr/webrender/src/prim_store/gradient.rs
+++ b/gfx/wr/webrender/src/prim_store/gradient.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/. */
 
 use api::{
     ColorF, ColorU, ExtendMode, GradientStop,
     PremultipliedColorF, LineOrientation,
 };
 use api::units::{LayoutPoint, LayoutSize, LayoutVector2D};
-use display_list_flattener::IsVisible;
+use crate::display_list_flattener::IsVisible;
 use euclid::approxeq::ApproxEq;
-use frame_builder::FrameBuildingState;
-use gpu_cache::{GpuCacheHandle, GpuDataRequest};
-use intern::{Internable, InternDebug, Handle as InternHandle};
-use internal_types::LayoutPrimitiveInfo;
-use prim_store::{BrushSegment, GradientTileRange, VectorKey};
-use prim_store::{PrimitiveInstanceKind, PrimitiveOpacity, PrimitiveSceneData};
-use prim_store::{PrimKeyCommonData, PrimTemplateCommonData, PrimitiveStore};
-use prim_store::{NinePatchDescriptor, PointKey, SizeKey, InternablePrimitive};
-use render_task::RenderTaskCacheEntryHandle;
+use crate::frame_builder::FrameBuildingState;
+use crate::gpu_cache::{GpuCacheHandle, GpuDataRequest};
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{BrushSegment, GradientTileRange, VectorKey};
+use crate::prim_store::{PrimitiveInstanceKind, PrimitiveOpacity, PrimitiveSceneData};
+use crate::prim_store::{PrimKeyCommonData, PrimTemplateCommonData, PrimitiveStore};
+use crate::prim_store::{NinePatchDescriptor, PointKey, SizeKey, InternablePrimitive};
+use crate::render_task::RenderTaskCacheEntryHandle;
 use std::{hash, ops::{Deref, DerefMut}, mem};
-use util::pack_as_float;
+use crate::util::pack_as_float;
 
 /// The maximum number of stops a gradient may have to use the fast path.
 pub const GRADIENT_FP_STOPS: usize = 4;
 
 /// A hashable gradient stop that can be used in primitive keys.
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Debug, Copy, Clone, MallocSizeOf, PartialEq)]
--- a/gfx/wr/webrender/src/prim_store/image.rs
+++ b/gfx/wr/webrender/src/prim_store/image.rs
@@ -3,33 +3,33 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use api::{
     AlphaType, ColorDepth, ColorF, ColorU,
     ImageKey as ApiImageKey, ImageRendering,
     PremultipliedColorF, Shadow, YuvColorSpace, YuvFormat,
 };
 use api::units::*;
-use display_list_flattener::{CreateShadow, IsVisible};
-use frame_builder::FrameBuildingState;
-use gpu_cache::{GpuCache, GpuDataRequest};
-use intern::{Internable, InternDebug, Handle as InternHandle};
-use internal_types::LayoutPrimitiveInfo;
-use prim_store::{
+use crate::display_list_flattener::{CreateShadow, IsVisible};
+use crate::frame_builder::FrameBuildingState;
+use crate::gpu_cache::{GpuCache, GpuDataRequest};
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{
     EdgeAaSegmentMask, OpacityBindingIndex, PrimitiveInstanceKind,
     PrimitiveOpacity, PrimitiveSceneData, PrimKey, PrimKeyCommonData,
     PrimTemplate, PrimTemplateCommonData, PrimitiveStore, SegmentInstanceIndex,
     SizeKey, InternablePrimitive,
 };
-use render_task::{
+use crate::render_task::{
     BlitSource, RenderTask, RenderTaskCacheEntryHandle, RenderTaskCacheKey,
     RenderTaskCacheKeyKind
 };
-use resource_cache::{ImageRequest, ResourceCache};
-use util::pack_as_float;
+use crate::resource_cache::{ImageRequest, ResourceCache};
+use crate::util::pack_as_float;
 
 #[derive(Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct VisibleImageTile {
     pub tile_offset: TileOffset,
     pub edge_flags: EdgeAaSegmentMask,
     pub local_rect: LayoutRect,
--- a/gfx/wr/webrender/src/prim_store/interned.rs
+++ b/gfx/wr/webrender/src/prim_store/interned.rs
@@ -1,12 +1,12 @@
 /* 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/. */
 
 // list of all interned primitives to match enumerate_interners!
 
-pub use prim_store::borders::{ImageBorder, NormalBorderPrim};
-pub use prim_store::image::{Image, YuvImage};
-pub use prim_store::line_dec::{LineDecoration};
-pub use prim_store::gradient::{LinearGradient, RadialGradient};
-pub use prim_store::picture::Picture;
-pub use prim_store::text_run::TextRun;
+pub use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+pub use crate::prim_store::image::{Image, YuvImage};
+pub use crate::prim_store::line_dec::{LineDecoration};
+pub use crate::prim_store::gradient::{LinearGradient, RadialGradient};
+pub use crate::prim_store::picture::Picture;
+pub use crate::prim_store::text_run::TextRun;
--- a/gfx/wr/webrender/src/prim_store/line_dec.rs
+++ b/gfx/wr/webrender/src/prim_store/line_dec.rs
@@ -2,26 +2,26 @@
  * 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 api::{
     ColorF, ColorU,
     LineOrientation, LineStyle, PremultipliedColorF, Shadow,
 };
 use api::units::{Au, LayoutSizeAu, LayoutVector2D};
-use display_list_flattener::{CreateShadow, IsVisible};
-use frame_builder::{FrameBuildingState};
-use gpu_cache::GpuDataRequest;
-use intern;
-use internal_types::LayoutPrimitiveInfo;
-use prim_store::{
+use crate::display_list_flattener::{CreateShadow, IsVisible};
+use crate::frame_builder::{FrameBuildingState};
+use crate::gpu_cache::GpuDataRequest;
+use crate::intern;
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::prim_store::{
     PrimKey, PrimKeyCommonData, PrimTemplate, PrimTemplateCommonData,
     InternablePrimitive, PrimitiveSceneData, PrimitiveStore,
 };
-use prim_store::PrimitiveInstanceKind;
+use crate::prim_store::PrimitiveInstanceKind;
 
 
 #[derive(Clone, Debug, Hash, MallocSizeOf, PartialEq, Eq)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct LineDecorationCacheKey {
     pub style: LineStyle,
     pub orientation: LineOrientation,
--- a/gfx/wr/webrender/src/prim_store/mod.rs
+++ b/gfx/wr/webrender/src/prim_store/mod.rs
@@ -3,62 +3,62 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use api::{BorderRadius, ClipMode, ColorF};
 use api::{FilterOp, ImageRendering, RepeatMode};
 use api::{PremultipliedColorF, PropertyBinding, Shadow, GradientStop};
 use api::{BoxShadowClipMode, LineStyle, LineOrientation};
 use api::{PrimitiveKeyKind, RasterSpace};
 use api::units::*;
-use border::{get_max_scale_for_border, build_border_instances};
-use border::BorderSegmentCacheKey;
-use box_shadow::{BLUR_SAMPLE_SCALE};
-use clip::{ClipStore};
-use clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex, VisibleFace};
-use clip::{ClipDataStore, ClipNodeFlags, ClipChainId, ClipChainInstance, ClipItem};
-use debug_colors;
-use debug_render::DebugItem;
-use display_list_flattener::{CreateShadow, IsVisible};
+use crate::border::{get_max_scale_for_border, build_border_instances};
+use crate::border::BorderSegmentCacheKey;
+use crate::box_shadow::{BLUR_SAMPLE_SCALE};
+use crate::clip::{ClipStore};
+use crate::clip_scroll_tree::{ROOT_SPATIAL_NODE_INDEX, ClipScrollTree, SpatialNodeIndex, VisibleFace};
+use crate::clip::{ClipDataStore, ClipNodeFlags, ClipChainId, ClipChainInstance, ClipItem};
+use crate::debug_colors;
+use crate::debug_render::DebugItem;
+use crate::display_list_flattener::{CreateShadow, IsVisible};
 use euclid::{SideOffsets2D, TypedTransform3D, TypedRect, TypedScale, TypedSize2D, TypedPoint2D};
 use euclid::approxeq::ApproxEq;
-use frame_builder::{FrameBuildingContext, FrameBuildingState, PictureContext, PictureState};
-use frame_builder::{FrameVisibilityContext, FrameVisibilityState};
-use glyph_rasterizer::GlyphKey;
-use gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle, GpuDataRequest, ToGpuBlocks};
-use gpu_types::{BrushFlags, SnapOffsets};
-use image::{Repetition};
-use intern;
+use crate::frame_builder::{FrameBuildingContext, FrameBuildingState, PictureContext, PictureState};
+use crate::frame_builder::{FrameVisibilityContext, FrameVisibilityState};
+use crate::glyph_rasterizer::GlyphKey;
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle, GpuDataRequest, ToGpuBlocks};
+use crate::gpu_types::{BrushFlags, SnapOffsets};
+use crate::image::{Repetition};
+use crate::intern;
 use malloc_size_of::MallocSizeOf;
-use picture::{PictureCompositeMode, PicturePrimitive, SurfaceInfo};
-use picture::{ClusterIndex, PrimitiveList, RecordedDirtyRegion, SurfaceIndex, RetainedTiles};
-use prim_store::borders::{ImageBorderDataHandle, NormalBorderDataHandle};
-use prim_store::gradient::{GRADIENT_FP_STOPS, GradientCacheKey, GradientStopKey};
-use prim_store::gradient::{LinearGradientPrimitive, LinearGradientDataHandle, RadialGradientDataHandle};
-use prim_store::image::{ImageDataHandle, ImageInstance, VisibleImageTile, YuvImageDataHandle};
-use prim_store::line_dec::LineDecorationDataHandle;
-use prim_store::picture::PictureDataHandle;
-use prim_store::text_run::{TextRunDataHandle, TextRunPrimitive};
+use crate::picture::{PictureCompositeMode, PicturePrimitive, SurfaceInfo};
+use crate::picture::{ClusterIndex, PrimitiveList, RecordedDirtyRegion, SurfaceIndex, RetainedTiles};
+use crate::prim_store::borders::{ImageBorderDataHandle, NormalBorderDataHandle};
+use crate::prim_store::gradient::{GRADIENT_FP_STOPS, GradientCacheKey, GradientStopKey};
+use crate::prim_store::gradient::{LinearGradientPrimitive, LinearGradientDataHandle, RadialGradientDataHandle};
+use crate::prim_store::image::{ImageDataHandle, ImageInstance, VisibleImageTile, YuvImageDataHandle};
+use crate::prim_store::line_dec::LineDecorationDataHandle;
+use crate::prim_store::picture::PictureDataHandle;
+use crate::prim_store::text_run::{TextRunDataHandle, TextRunPrimitive};
 #[cfg(debug_assertions)]
-use render_backend::{FrameId};
-use render_backend::DataStores;
-use render_task::{RenderTask, RenderTaskCacheKey, to_cache_size};
-use render_task::{RenderTaskCacheKeyKind, RenderTaskId, RenderTaskCacheEntryHandle};
-use renderer::{MAX_VERTEX_TEXTURE_WIDTH};
-use resource_cache::{ImageProperties, ImageRequest};
-use scene::SceneProperties;
-use segment::SegmentBuilder;
+use crate::render_backend::{FrameId};
+use crate::render_backend::DataStores;
+use crate::render_task::{RenderTask, RenderTaskCacheKey, to_cache_size};
+use crate::render_task::{RenderTaskCacheKeyKind, RenderTaskId, RenderTaskCacheEntryHandle};
+use crate::renderer::{MAX_VERTEX_TEXTURE_WIDTH};
+use crate::resource_cache::{ImageProperties, ImageRequest};
+use crate::scene::SceneProperties;
+use crate::segment::SegmentBuilder;
 use std::{cmp, fmt, hash, ops, u32, usize, mem};
 #[cfg(debug_assertions)]
 use std::sync::atomic::{AtomicUsize, Ordering};
-use storage;
-use texture_cache::TEXTURE_REGION_DIMENSIONS;
-use util::{ScaleOffset, MatrixHelpers, MaxRect, Recycler};
-use util::{pack_as_float, project_rect, raster_rect_to_device_pixels};
-use util::{scale_factors, clamp_to_scale_factor};
-use internal_types::LayoutPrimitiveInfo;
+use crate::storage;
+use crate::texture_cache::TEXTURE_REGION_DIMENSIONS;
+use crate::util::{ScaleOffset, MatrixHelpers, MaxRect, Recycler};
+use crate::util::{pack_as_float, project_rect, raster_rect_to_device_pixels};
+use crate::util::{scale_factors, clamp_to_scale_factor};
+use crate::internal_types::LayoutPrimitiveInfo;
 use smallvec::SmallVec;
 
 pub mod borders;
 pub mod gradient;
 pub mod image;
 pub mod line_dec;
 pub mod picture;
 pub mod text_run;
@@ -1694,17 +1694,17 @@ impl PrimitiveStore {
             image_count: self.images.len(),
             opacity_binding_count: self.opacity_bindings.len(),
             linear_gradient_count: self.linear_gradients.len(),
         }
     }
 
     #[allow(unused)]
     pub fn print_picture_tree(&self, root: PictureIndex) {
-        use print_tree::PrintTree;
+        use crate::print_tree::PrintTree;
         let mut pt = PrintTree::new("picture tree");
         self.pictures[root.0].print(&self.pictures, root, &mut pt);
     }
 
     /// Destroy an existing primitive store. This is called just before
     /// a primitive store is replaced with a newly built scene.
     pub fn destroy(
         mut self,
@@ -2257,31 +2257,31 @@ impl PrimitiveStore {
                             &tight_clip_rect,
                             map_local_to_surface,
                         );
 
                         let base_edge_flags = edge_flags_for_tile_spacing(&image_data.tile_spacing);
 
                         let stride = image_data.stretch_size + image_data.tile_spacing;
 
-                        let repetitions = ::image::repetitions(
+                        let repetitions = crate::image::repetitions(
                             &prim_rect,
                             &visible_rect,
                             stride,
                         );
 
                         for Repetition { origin, edge_flags } in repetitions {
                             let edge_flags = base_edge_flags | edge_flags;
 
                             let layout_image_rect = LayoutRect {
                                 origin,
                                 size: image_data.stretch_size,
                             };
 
-                            let tiles = ::image::tiles(
+                            let tiles = crate::image::tiles(
                                 &layout_image_rect,
                                 &visible_rect,
                                 &device_image_rect,
                                 tile_size as i32,
                             );
 
                             for tile in tiles {
                                 frame_state.resource_cache.request_image(
@@ -3165,17 +3165,17 @@ fn decompose_repeated_primitive(
         .intersection(prim_local_rect).unwrap();
 
     let visible_rect = compute_conservative_visible_rect(
         &tight_clip_rect,
         map_local_to_pic,
     );
     let stride = *stretch_size + *tile_spacing;
 
-    let repetitions = ::image::repetitions(prim_local_rect, &visible_rect, stride);
+    let repetitions = crate::image::repetitions(prim_local_rect, &visible_rect, stride);
     for Repetition { origin, .. } in repetitions {
         let mut handle = GpuCacheHandle::new();
         let rect = LayoutRect {
             origin: origin,
             size: *stretch_size,
         };
 
         if let Some(request) = frame_state.gpu_cache.request(&mut handle) {
--- a/gfx/wr/webrender/src/prim_store/picture.rs
+++ b/gfx/wr/webrender/src/prim_store/picture.rs
@@ -2,22 +2,22 @@
  * 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 api::{
     ColorU, FilterOp, MixBlendMode,
     PropertyBinding, PropertyBindingId,
 };
 use api::units::{Au, LayoutSize, LayoutVector2D};
-use intern::ItemUid;
-use display_list_flattener::IsVisible;
-use intern::{Internable, InternDebug, Handle as InternHandle};
-use internal_types::LayoutPrimitiveInfo;
-use picture::PictureCompositeMode;
-use prim_store::{
+use crate::intern::ItemUid;
+use crate::display_list_flattener::IsVisible;
+use crate::intern::{Internable, InternDebug, Handle as InternHandle};
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::picture::PictureCompositeMode;
+use crate::prim_store::{
     PrimKey, PrimKeyCommonData, PrimTemplate, PrimTemplateCommonData,
     PrimitiveInstanceKind, PrimitiveSceneData, PrimitiveStore, VectorKey,
     InternablePrimitive,
 };
 
 /// Represents a hashable description of how a picture primitive
 /// will be composited into its parent.
 #[cfg_attr(feature = "capture", derive(Serialize))]
--- a/gfx/wr/webrender/src/prim_store/text_run.rs
+++ b/gfx/wr/webrender/src/prim_store/text_run.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 api::{ColorF, GlyphInstance, RasterSpace, Shadow};
 use api::units::{DevicePixelScale, LayoutToWorldTransform, LayoutVector2D};
-use display_list_flattener::{CreateShadow, IsVisible};
-use frame_builder::FrameBuildingState;
-use glyph_rasterizer::{FontInstance, FontTransform, GlyphKey, FONT_SIZE_LIMIT};
-use gpu_cache::GpuCache;
-use intern;
-use internal_types::LayoutPrimitiveInfo;
-use picture::SurfaceInfo;
-use prim_store::{PrimitiveOpacity, PrimitiveSceneData,  PrimitiveScratchBuffer};
-use prim_store::{PrimitiveStore, PrimKeyCommonData, PrimTemplateCommonData};
-use render_task::{RenderTaskTree};
-use renderer::{MAX_VERTEX_TEXTURE_WIDTH};
-use resource_cache::{ResourceCache};
-use util::{MatrixHelpers};
-use prim_store::{InternablePrimitive, PrimitiveInstanceKind};
+use crate::display_list_flattener::{CreateShadow, IsVisible};
+use crate::frame_builder::FrameBuildingState;
+use crate::glyph_rasterizer::{FontInstance, FontTransform, GlyphKey, FONT_SIZE_LIMIT};
+use crate::gpu_cache::GpuCache;
+use crate::intern;
+use crate::internal_types::LayoutPrimitiveInfo;
+use crate::picture::SurfaceInfo;
+use crate::prim_store::{PrimitiveOpacity, PrimitiveSceneData,  PrimitiveScratchBuffer};
+use crate::prim_store::{PrimitiveStore, PrimKeyCommonData, PrimTemplateCommonData};
+use crate::render_task::{RenderTaskTree};
+use crate::renderer::{MAX_VERTEX_TEXTURE_WIDTH};
+use crate::resource_cache::{ResourceCache};
+use crate::util::{MatrixHelpers};
+use crate::prim_store::{InternablePrimitive, PrimitiveInstanceKind};
 use std::ops;
 use std::sync::Arc;
-use storage;
-use util::PrimaryArc;
+use crate::storage;
+use crate::util::PrimaryArc;
 
 /// A run of glyphs, with associated font information.
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Debug, Clone, Eq, MallocSizeOf, PartialEq, Hash)]
 pub struct TextRunKey {
     pub common: PrimKeyCommonData,
     pub font: FontInstance,
--- a/gfx/wr/webrender/src/profiler.rs
+++ b/gfx/wr/webrender/src/profiler.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/. */
 
 use api::{ColorF, ColorU};
-use debug_render::DebugRenderer;
-use device::query::{GpuSampler, GpuTimer, NamedTag};
+use crate::debug_render::DebugRenderer;
+use crate::device::query::{GpuSampler, GpuTimer, NamedTag};
 use euclid::{Point2D, Rect, Size2D, vec2};
-use internal_types::FastHashMap;
-use renderer::{MAX_VERTEX_TEXTURE_WIDTH, wr_has_been_initialized};
+use crate::internal_types::FastHashMap;
+use crate::renderer::{MAX_VERTEX_TEXTURE_WIDTH, wr_has_been_initialized};
 use std::collections::vec_deque::VecDeque;
 use std::{f32, mem};
 use std::ffi::CStr;
 use std::time::Duration;
 use time::precise_time_ns;
 
 const GRAPH_WIDTH: f32 = 1024.0;
 const GRAPH_HEIGHT: f32 = 320.0;
--- a/gfx/wr/webrender/src/render_backend.rs
+++ b/gfx/wr/webrender/src/render_backend.rs
@@ -17,56 +17,56 @@ use api::{ScrollLocation, ScrollNodeStat
 use api::{NotificationRequest, Checkpoint};
 use api::{ClipIntern, FilterDataIntern, PrimitiveKeyKind};
 use api::units::*;
 use api::channel::{MsgReceiver, MsgSender, Payload};
 #[cfg(feature = "capture")]
 use api::CaptureBits;
 #[cfg(feature = "replay")]
 use api::CapturedDocument;
-use clip_scroll_tree::{SpatialNodeIndex, ClipScrollTree};
+use crate::clip_scroll_tree::{SpatialNodeIndex, ClipScrollTree};
 #[cfg(feature = "debugger")]
-use debug_server;
-use frame_builder::{FrameBuilder, FrameBuilderConfig};
-use glyph_rasterizer::{FontInstance};
-use gpu_cache::GpuCache;
-use hit_test::{HitTest, HitTester};
-use intern::DataStore;
-use internal_types::{DebugOutput, FastHashMap, FastHashSet, RenderedDocument, ResultMsg};
+use crate::debug_server;
+use crate::frame_builder::{FrameBuilder, FrameBuilderConfig};
+use crate::glyph_rasterizer::{FontInstance};
+use crate::gpu_cache::GpuCache;
+use crate::hit_test::{HitTest, HitTester};
+use crate::intern::DataStore;
+use crate::internal_types::{DebugOutput, FastHashMap, FastHashSet, RenderedDocument, ResultMsg};
 use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
-use picture::RetainedTiles;
-use prim_store::{PrimitiveScratchBuffer, PrimitiveInstance};
-use prim_store::{PrimitiveInstanceKind, PrimTemplateCommonData};
-use prim_store::interned::*;
-use profiler::{BackendProfileCounters, IpcProfileCounters, ResourceProfileCounters};
-use record::ApiRecordingReceiver;
-use render_task::RenderTaskTreeCounters;
-use renderer::{AsyncPropertySampler, PipelineInfo};
-use resource_cache::ResourceCache;
+use crate::picture::RetainedTiles;
+use crate::prim_store::{PrimitiveScratchBuffer, PrimitiveInstance};
+use crate::prim_store::{PrimitiveInstanceKind, PrimTemplateCommonData};
+use crate::prim_store::interned::*;
+use crate::profiler::{BackendProfileCounters, IpcProfileCounters, ResourceProfileCounters};
+use crate::record::ApiRecordingReceiver;
+use crate::render_task::RenderTaskTreeCounters;
+use crate::renderer::{AsyncPropertySampler, PipelineInfo};
+use crate::resource_cache::ResourceCache;
 #[cfg(feature = "replay")]
-use resource_cache::PlainCacheOwn;
+use crate::resource_cache::PlainCacheOwn;
 #[cfg(any(feature = "capture", feature = "replay"))]
-use resource_cache::PlainResources;
-use scene::{Scene, SceneProperties};
-use scene_builder::*;
+use crate::resource_cache::PlainResources;
+use crate::scene::{Scene, SceneProperties};
+use crate::scene_builder::*;
 #[cfg(feature = "serialize")]
 use serde::{Serialize, Deserialize};
 #[cfg(feature = "debugger")]
 use serde_json;
 #[cfg(any(feature = "capture", feature = "replay"))]
 use std::path::PathBuf;
 use std::sync::Arc;
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::sync::mpsc::{channel, Sender, Receiver};
 use std::time::{UNIX_EPOCH, SystemTime};
 use std::u32;
 #[cfg(feature = "replay")]
-use tiling::Frame;
+use crate::tiling::Frame;
 use time::precise_time_ns;
-use util::{Recycler, VecHelper, drain_filter};
+use crate::util::{Recycler, VecHelper, drain_filter};
 
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 #[derive(Clone)]
 pub struct DocumentView {
     pub device_rect: DeviceIntRect,
     pub layer: DocumentLayer,
@@ -1583,17 +1583,17 @@ impl RenderBackend {
 
     #[cfg(not(feature = "debugger"))]
     fn get_clip_scroll_tree_for_debugger(&self) -> String {
         String::new()
     }
 
     #[cfg(feature = "debugger")]
     fn get_clip_scroll_tree_for_debugger(&self) -> String {
-        use print_tree::PrintableTree;
+        use crate::print_tree::PrintableTree;
 
         let mut debug_root = debug_server::ClipScrollTreeList::new();
 
         for (_, doc) in &self.documents {
             let debug_node = debug_server::TreeNode::new("document clip-scroll tree");
             let mut builder = debug_server::TreeNodeBuilder::new(debug_node);
 
             doc.clip_scroll_tree.print_with(&mut builder);
@@ -1649,18 +1649,18 @@ impl RenderBackend {
     // Note: the mutable `self` is only needed here for resolving blob images
     fn save_capture(
         &mut self,
         root: PathBuf,
         bits: CaptureBits,
         profile_counters: &mut BackendProfileCounters,
     ) -> DebugOutput {
         use std::fs;
-        use capture::CaptureConfig;
-        use render_task::dump_render_tasks_as_svg;
+        use crate::capture::CaptureConfig;
+        use crate::render_task::dump_render_tasks_as_svg;
 
         debug!("capture: saving {:?}", root);
         if !root.is_dir() {
             if let Err(e) = fs::create_dir_all(&root) {
                 panic!("Unable to create capture dir: {:?}", e);
             }
         }
         let config = CaptureConfig::new(root, bits);
@@ -1755,17 +1755,17 @@ impl RenderBackend {
     }
 
     #[cfg(feature = "replay")]
     fn load_capture(
         &mut self,
         root: &PathBuf,
         profile_counters: &mut BackendProfileCounters,
     ) {
-        use capture::CaptureConfig;
+        use crate::capture::CaptureConfig;
 
         debug!("capture: loading {:?}", root);
         let backend = CaptureConfig::deserialize::<PlainRenderBackend, _>(root, "backend")
             .expect("Unable to open backend.ron");
         let caches_maybe = CaptureConfig::deserialize::<PlainCacheOwn, _>(root, "resource_cache");
 
         // Note: it would be great to have `RenderBackend` to be split
         // rather explicitly on what's used before and after scene building
--- a/gfx/wr/webrender/src/render_task.rs
+++ b/gfx/wr/webrender/src/render_task.rs
@@ -2,43 +2,43 @@
  * 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 api::{ImageDescriptor, ImageFormat};
 use api::{LineStyle, LineOrientation, ClipMode, DirtyRect};
 use api::units::*;
 #[cfg(feature = "pathfinder")]
 use api::FontRenderMode;
-use border::BorderSegmentCacheKey;
-use box_shadow::{BoxShadowCacheKey};
-use clip::{ClipDataStore, ClipItem, ClipStore, ClipNodeRange, ClipNodeFlags};
-use clip_scroll_tree::SpatialNodeIndex;
-use device::TextureFilter;
+use crate::border::BorderSegmentCacheKey;
+use crate::box_shadow::{BoxShadowCacheKey};
+use crate::clip::{ClipDataStore, ClipItem, ClipStore, ClipNodeRange, ClipNodeFlags};
+use crate::clip_scroll_tree::SpatialNodeIndex;
+use crate::device::TextureFilter;
 #[cfg(feature = "pathfinder")]
 use euclid::{TypedPoint2D, TypedVector2D};
-use frame_builder::FrameBuilderConfig;
-use freelist::{FreeList, FreeListHandle, WeakFreeListHandle};
-use glyph_rasterizer::GpuGlyphCacheKey;
-use gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
-use gpu_types::{BorderInstance, ImageSource, UvRectKind, SnapOffsets};
-use internal_types::{CacheTextureId, FastHashMap, LayerIndex, SavedTargetIndex};
+use crate::frame_builder::FrameBuilderConfig;
+use crate::freelist::{FreeList, FreeListHandle, WeakFreeListHandle};
+use crate::glyph_rasterizer::GpuGlyphCacheKey;
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
+use crate::gpu_types::{BorderInstance, ImageSource, UvRectKind, SnapOffsets};
+use crate::internal_types::{CacheTextureId, FastHashMap, LayerIndex, SavedTargetIndex};
 #[cfg(feature = "pathfinder")]
 use pathfinder_partitioner::mesh::Mesh;
-use prim_store::PictureIndex;
-use prim_store::image::ImageCacheKey;
-use prim_store::gradient::{GRADIENT_FP_STOPS, GradientCacheKey, GradientStopKey};
-use prim_store::line_dec::LineDecorationCacheKey;
+use crate::prim_store::PictureIndex;
+use crate::prim_store::image::ImageCacheKey;
+use crate::prim_store::gradient::{GRADIENT_FP_STOPS, GradientCacheKey, GradientStopKey};
+use crate::prim_store::line_dec::LineDecorationCacheKey;
 #[cfg(feature = "debugger")]
-use print_tree::{PrintTreePrinter};
-use render_backend::FrameId;
-use resource_cache::{CacheItem, ResourceCache};
+use crate::print_tree::{PrintTreePrinter};
+use crate::render_backend::FrameId;
+use crate::resource_cache::{CacheItem, ResourceCache};
 use std::{ops, mem, usize, f32, i32, u32};
-use texture_cache::{TextureCache, TextureCacheHandle, Eviction};
-use tiling::{RenderPass, RenderTargetIndex};
-use tiling::{RenderTargetKind};
+use crate::texture_cache::{TextureCache, TextureCacheHandle, Eviction};
+use crate::tiling::{RenderPass, RenderTargetIndex};
+use crate::tiling::{RenderTargetKind};
 use std::io;
 
 
 const RENDER_TASK_SIZE_SANITY_CHECK: i32 = 16000;
 const FLOATS_PER_RENDER_TASK_INFO: usize = 8;
 pub const MAX_BLUR_STD_DEVIATION: f32 = 4.0;
 pub const MIN_DOWNSCALING_RT_SIZE: i32 = 8;
 
--- a/gfx/wr/webrender/src/renderer.rs
+++ b/gfx/wr/webrender/src/renderer.rs
@@ -39,86 +39,86 @@ use api::{DocumentId, Epoch, ExternalIma
 use api::{ExternalImageType, FontRenderMode, FrameMsg, ImageFormat, PipelineId};
 use api::{ImageRendering, Checkpoint, NotificationRequest};
 use api::{DebugCommand, MemoryReport, VoidPtrToSizeFn};
 use api::{RenderApiSender, RenderNotifier, TextureTarget};
 use api::channel;
 use api::units::*;
 pub use api::DebugFlags;
 use api::channel::{MsgSender, PayloadReceiverHelperMethods};
-use batch::{BatchKind, BatchTextures, BrushBatchKind, ClipBatchList};
+use crate::batch::{BatchKind, BatchTextures, BrushBatchKind, ClipBatchList};
 #[cfg(any(feature = "capture", feature = "replay"))]
-use capture::{CaptureConfig, ExternalCaptureImage, PlainExternalImage};
-use debug_colors;
-use debug_render::{DebugItem, DebugRenderer};
-use device::{DepthFunction, Device, GpuFrameId, Program, UploadMethod, Texture, PBO};
-use device::{DrawTarget, ExternalTexture, FBOId, ReadTarget, TextureSlot};
-use device::{ShaderError, TextureFilter, TextureFlags,
+use crate::capture::{CaptureConfig, ExternalCaptureImage, PlainExternalImage};
+use crate::debug_colors;
+use crate::debug_render::{DebugItem, DebugRenderer};
+use crate::device::{DepthFunction, Device, GpuFrameId, Program, UploadMethod, Texture, PBO};
+use crate::device::{DrawTarget, ExternalTexture, FBOId, ReadTarget, TextureSlot};
+use crate::device::{ShaderError, TextureFilter, TextureFlags,
              VertexUsageHint, VAO, VBO, CustomVAO};
-use device::{ProgramCache};
-use device::query::GpuTimer;
+use crate::device::{ProgramCache};
+use crate::device::query::GpuTimer;
 use euclid::rect;
 use euclid::{Transform3D, TypedScale};
-use frame_builder::{ChasePrimitive, FrameBuilderConfig};
+use crate::frame_builder::{ChasePrimitive, FrameBuilderConfig};
 use gleam::gl;
-use glyph_rasterizer::{GlyphFormat, GlyphRasterizer};
-use gpu_cache::{GpuBlockData, GpuCacheUpdate, GpuCacheUpdateList};
-use gpu_cache::{GpuCacheDebugChunk, GpuCacheDebugCmd};
+use crate::glyph_rasterizer::{GlyphFormat, GlyphRasterizer};
+use crate::gpu_cache::{GpuBlockData, GpuCacheUpdate, GpuCacheUpdateList};
+use crate::gpu_cache::{GpuCacheDebugChunk, GpuCacheDebugCmd};
 #[cfg(feature = "pathfinder")]
 use crate::gpu_glyph_renderer::GpuGlyphRenderer;
 use crate::gpu_types::{PrimitiveHeaderI, PrimitiveHeaderF, ScalingInstance, TransformData, ResolveInstanceData};
 use crate::internal_types::{TextureSource, ORTHO_FAR_PLANE, ORTHO_NEAR_PLANE, ResourceCacheError};
 use crate::internal_types::{CacheTextureId, DebugOutput, FastHashMap, FastHashSet, LayerIndex, RenderedDocument, ResultMsg};
 use crate::internal_types::{TextureCacheAllocationKind, TextureCacheUpdate, TextureUpdateList, TextureUpdateSource};
 use crate::internal_types::{RenderTargetInfo, SavedTargetIndex};
 use malloc_size_of::MallocSizeOfOps;
-use picture::{RecordedDirtyRegion, TileCache};
-use prim_store::DeferredResolve;
-use profiler::{BackendProfileCounters, FrameProfileCounters, TimeProfileCounter,
+use crate::picture::{RecordedDirtyRegion, TileCache};
+use crate::prim_store::DeferredResolve;
+use crate::profiler::{BackendProfileCounters, FrameProfileCounters, TimeProfileCounter,
                GpuProfileTag, RendererProfileCounters, RendererProfileTimers};
-use profiler::{Profiler, ChangeIndicator};
-use device::query::{GpuProfiler, GpuDebugMethod};
+use crate::profiler::{Profiler, ChangeIndicator};
+use crate::device::query::{GpuProfiler, GpuDebugMethod};
 use rayon::{ThreadPool, ThreadPoolBuilder};
-use record::ApiRecordingReceiver;
-use render_backend::{FrameId, RenderBackend};
-use scene_builder::{SceneBuilder, LowPrioritySceneBuilder};
-use shade::{Shaders, WrShaders};
+use crate::record::ApiRecordingReceiver;
+use crate::render_backend::{FrameId, RenderBackend};
+use crate::scene_builder::{SceneBuilder, LowPrioritySceneBuilder};
+use crate::shade::{Shaders, WrShaders};
 use smallvec::SmallVec;
-use render_task::{RenderTask, RenderTaskData, RenderTaskKind, RenderTaskTree};
-use resource_cache::ResourceCache;
-use util::drain_filter;
+use crate::render_task::{RenderTask, RenderTaskData, RenderTaskKind, RenderTaskTree};
+use crate::resource_cache::ResourceCache;
+use crate::util::drain_filter;
 
 use std;
 use std::cmp;
 use std::collections::{HashMap, VecDeque};
 use std::collections::hash_map::Entry;
 use std::f32;
 use std::marker::PhantomData;
 use std::mem;
 use std::os::raw::c_void;
 use std::path::PathBuf;
 use std::rc::Rc;
 use std::sync::Arc;
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::sync::mpsc::{channel, Receiver};
 use std::thread;
 use std::cell::RefCell;
-use texture_cache::TextureCache;
+use crate::texture_cache::TextureCache;
 use thread_profiler::{register_thread_with_profiler, write_profile};
-use tiling::{AlphaRenderTarget, ColorRenderTarget};
-use tiling::{BlitJob, BlitJobSource, RenderPassKind, RenderTargetList};
-use tiling::{Frame, RenderTarget, RenderTargetKind, TextureCacheRenderTarget};
+use crate::tiling::{AlphaRenderTarget, ColorRenderTarget};
+use crate::tiling::{BlitJob, BlitJobSource, RenderPassKind, RenderTargetList};
+use crate::tiling::{Frame, RenderTarget, RenderTargetKind, TextureCacheRenderTarget};
 #[cfg(not(feature = "pathfinder"))]
-use tiling::GlyphJob;
+use crate::tiling::GlyphJob;
 use time::precise_time_ns;
 
 cfg_if! {
     if #[cfg(feature = "debugger")] {
         use serde_json;
-        use debug_server;
+        use crate::debug_server;
     }
 }
 
 /// Is only false if no WR instances have ever been created.
 static HAS_BEEN_INITIALIZED: AtomicBool = AtomicBool::new(false);
 
 /// Returns true if a WR instance has ever been initialized in this process.
 pub fn wr_has_been_initialized() -> bool {
@@ -353,17 +353,17 @@ impl Into<TextureSlot> for TextureSample
 
 #[derive(Debug, Clone, Copy)]
 #[repr(C)]
 pub struct PackedVertex {
     pub pos: [f32; 2],
 }
 
 pub(crate) mod desc {
-    use device::{VertexAttribute, VertexAttributeKind, VertexDescriptor};
+    use crate::device::{VertexAttribute, VertexAttributeKind, VertexDescriptor};
 
     pub const PRIM_INSTANCES: VertexDescriptor = VertexDescriptor {
         vertex_attributes: &[
             VertexAttribute {
                 name: "aPosition",
                 count: 2,
                 kind: VertexAttributeKind::F32,
             },
@@ -2168,17 +2168,17 @@ impl Renderer {
             PackedVertex { pos: [x1, y1] },
         ];
 
         let prim_vao = device.create_vao(&desc::PRIM_INSTANCES);
         device.bind_vao(&prim_vao);
         device.update_vao_indices(&prim_vao, &quad_indices, VertexUsageHint::Static);
         device.update_vao_main_vertices(&prim_vao, &quad_vertices, VertexUsageHint::Static);
 
-        let gpu_glyph_renderer = try!(GpuGlyphRenderer::new(&mut device,
+        let gpu_glyph_renderer = r#try!(GpuGlyphRenderer::new(&mut device,
                                                             &prim_vao,
                                                             options.precache_flags));
 
         let blur_vao = device.create_vao_with_new_instances(&desc::BLUR, &prim_vao);
         let clip_vao = device.create_vao_with_new_instances(&desc::CLIP, &prim_vao);
         let border_vao = device.create_vao_with_new_instances(&desc::BORDER, &prim_vao);
         let scale_vao = device.create_vao_with_new_instances(&desc::SCALE, &prim_vao);
         let line_vao = device.create_vao_with_new_instances(&desc::LINE, &prim_vao);
--- a/gfx/wr/webrender/src/resource_cache.rs
+++ b/gfx/wr/webrender/src/resource_cache.rs
@@ -7,49 +7,49 @@ use api::{BlobImageDescriptor, BlobImage
 use api::{ClearCache, DebugFlags, FontInstanceKey, FontKey, FontTemplate, GlyphIndex};
 use api::{ExternalImageData, ExternalImageType, BlobImageResult, BlobImageParams};
 use api::{FontInstanceData, FontInstanceOptions, FontInstancePlatformOptions, FontVariation};
 use api::{DirtyRect, GlyphDimensions, IdNamespace};
 use api::{ImageData, ImageDescriptor, ImageKey, ImageRendering, TileSize};
 use api::{BlobImageData, BlobImageKey, MemoryReport, VoidPtrToSizeFn};
 use api::units::*;
 #[cfg(feature = "capture")]
-use capture::ExternalCaptureImage;
+use crate::capture::ExternalCaptureImage;
 #[cfg(feature = "replay")]
-use capture::PlainExternalImage;
+use crate::capture::PlainExternalImage;
 #[cfg(any(feature = "replay", feature = "png"))]
-use capture::CaptureConfig;
-use device::TextureFilter;
+use crate::capture::CaptureConfig;
+use crate::device::TextureFilter;
 use euclid::{point2, size2};
-use glyph_cache::GlyphCache;
+use crate::glyph_cache::GlyphCache;
 #[cfg(not(feature = "pathfinder"))]
-use glyph_cache::GlyphCacheEntry;
-use glyph_rasterizer::{BaseFontInstance, FontInstance, GlyphFormat, GlyphKey, GlyphRasterizer};
-use gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
-use gpu_types::UvRectKind;
-use image::{compute_tile_size, compute_tile_range, for_each_tile_in_range};
-use internal_types::{FastHashMap, FastHashSet, TextureSource, TextureUpdateList};
-use profiler::{ResourceProfileCounters, TextureCacheProfileCounters};
-use render_backend::{FrameId, FrameStamp};
-use render_task::{RenderTaskCache, RenderTaskCacheKey, RenderTaskId};
-use render_task::{RenderTaskCacheEntry, RenderTaskCacheEntryHandle, RenderTaskTree};
+use crate::glyph_cache::GlyphCacheEntry;
+use crate::glyph_rasterizer::{BaseFontInstance, FontInstance, GlyphFormat, GlyphKey, GlyphRasterizer};
+use crate::gpu_cache::{GpuCache, GpuCacheAddress, GpuCacheHandle};
+use crate::gpu_types::UvRectKind;
+use crate::image::{compute_tile_size, compute_tile_range, for_each_tile_in_range};
+use crate::internal_types::{FastHashMap, FastHashSet, TextureSource, TextureUpdateList};
+use crate::profiler::{ResourceProfileCounters, TextureCacheProfileCounters};
+use crate::render_backend::{FrameId, FrameStamp};
+use crate::render_task::{RenderTaskCache, RenderTaskCacheKey, RenderTaskId};
+use crate::render_task::{RenderTaskCacheEntry, RenderTaskCacheEntryHandle, RenderTaskTree};
 use smallvec::SmallVec;
 use std::collections::hash_map::Entry::{self, Occupied, Vacant};
 use std::collections::hash_map::IterMut;
 use std::collections::VecDeque;
 use std::{cmp, mem};
 use std::fmt::Debug;
 use std::hash::Hash;
 use std::os::raw::c_void;
 #[cfg(any(feature = "capture", feature = "replay"))]
 use std::path::PathBuf;
 use std::sync::{Arc, RwLock};
 use std::time::SystemTime;
-use texture_cache::{TextureCache, TextureCacheHandle, Eviction};
-use util::drain_filter;
+use crate::texture_cache::{TextureCache, TextureCacheHandle, Eviction};
+use crate::util::drain_filter;
 
 const DEFAULT_TILE_SIZE: TileSize = 512;
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct GlyphFetchResult {
     pub index_in_text_run: i32,
     pub uv_rect_address: GpuCacheAddress,
--- a/gfx/wr/webrender/src/scene.rs
+++ b/gfx/wr/webrender/src/scene.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 api::{BuiltDisplayList, ColorF, DynamicProperties, Epoch};
 use api::{FilterOp, TempFilterData, FilterData, ComponentTransferFuncType};
 use api::{PipelineId, PropertyBinding, PropertyBindingId, ItemRange, MixBlendMode, StackingContext};
 use api::units::{LayoutSize, LayoutTransform};
-use internal_types::FastHashMap;
+use crate::internal_types::FastHashMap;
 use std::sync::Arc;
 
 /// Stores a map of the animated property bindings for the current display list. These
 /// can be used to animate the transform and/or opacity of a display list without
 /// re-submitting the display list itself.
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct SceneProperties {
--- a/gfx/wr/webrender/src/scene_builder.rs
+++ b/gfx/wr/webrender/src/scene_builder.rs
@@ -4,40 +4,40 @@
 
 use api::{AsyncBlobImageRasterizer, BlobImageRequest, BlobImageParams, BlobImageResult};
 use api::{DocumentId, PipelineId, ApiMsg, FrameMsg, ResourceUpdate, ExternalEvent, Epoch};
 use api::{BuiltDisplayList, ColorF, NotificationRequest, Checkpoint, IdNamespace};
 use api::{ClipIntern, FilterDataIntern, MemoryReport, PrimitiveKeyKind};
 use api::channel::MsgSender;
 use api::units::LayoutSize;
 #[cfg(feature = "capture")]
-use capture::CaptureConfig;
-use frame_builder::{FrameBuilderConfig, FrameBuilder};
-use clip_scroll_tree::ClipScrollTree;
-use display_list_flattener::DisplayListFlattener;
-use hit_test::HitTestingSceneStats;
-use intern::{Internable, Interner, UpdateList};
-use internal_types::{FastHashMap, FastHashSet};
+use crate::capture::CaptureConfig;
+use crate::frame_builder::{FrameBuilderConfig, FrameBuilder};
+use crate::clip_scroll_tree::ClipScrollTree;
+use crate::display_list_flattener::DisplayListFlattener;
+use crate::hit_test::HitTestingSceneStats;
+use crate::intern::{Internable, Interner, UpdateList};
+use crate::internal_types::{FastHashMap, FastHashSet};
 use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
-use prim_store::PrimitiveStoreStats;
-use prim_store::borders::{ImageBorder, NormalBorderPrim};
-use prim_store::gradient::{LinearGradient, RadialGradient};
-use prim_store::image::{Image, YuvImage};
-use prim_store::line_dec::LineDecoration;
-use prim_store::picture::Picture;
-use prim_store::text_run::TextRun;
-use resource_cache::{AsyncBlobImageInfo, FontInstanceMap};
-use render_backend::DocumentView;
-use renderer::{PipelineInfo, SceneBuilderHooks};
-use scene::Scene;
+use crate::prim_store::PrimitiveStoreStats;
+use crate::prim_store::borders::{ImageBorder, NormalBorderPrim};
+use crate::prim_store::gradient::{LinearGradient, RadialGradient};
+use crate::prim_store::image::{Image, YuvImage};
+use crate::prim_store::line_dec::LineDecoration;
+use crate::prim_store::picture::Picture;
+use crate::prim_store::text_run::TextRun;
+use crate::resource_cache::{AsyncBlobImageInfo, FontInstanceMap};
+use crate::render_backend::DocumentView;
+use crate::renderer::{PipelineInfo, SceneBuilderHooks};
+use crate::scene::Scene;
 use std::iter;
 use std::sync::mpsc::{channel, Receiver, Sender};
 use std::mem::replace;
 use time::precise_time_ns;
-use util::drain_filter;
+use crate::util::drain_filter;
 use std::thread;
 use std::time::Duration;
 
 
 /// Represents the work associated to a transaction before scene building.
 pub struct Transaction {
     pub document_id: DocumentId,
     pub display_list_updates: Vec<DisplayListUpdate>,
--- a/gfx/wr/webrender/src/segment.rs
+++ b/gfx/wr/webrender/src/segment.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 api::{BorderRadius, ClipMode};
 use api::units::*;
-use prim_store::EdgeAaSegmentMask;
+use crate::prim_store::EdgeAaSegmentMask;
 use std::{cmp, usize};
-use util::{extract_inner_rect_safe, RectHelpers};
+use crate::util::{extract_inner_rect_safe, RectHelpers};
 use smallvec::SmallVec;
 
 bitflags! {
     pub struct ItemFlags: u8 {
         const X_ACTIVE = 0x1;
         const Y_ACTIVE = 0x2;
         const HAS_MASK = 0x4;
     }
@@ -630,17 +630,17 @@ fn emit_segment_if_needed(
         region_y,
     })
 }
 
 #[cfg(test)]
 mod test {
     use api::{BorderRadius, ClipMode};
     use api::units::{LayoutPoint, LayoutRect, LayoutSize};
-    use prim_store::EdgeAaSegmentMask;
+    use crate::prim_store::EdgeAaSegmentMask;
     use super::{Segment, SegmentBuilder};
     use std::cmp;
 
     fn rect(x0: f32, y0: f32, x1: f32, y1: f32) -> LayoutRect {
         LayoutRect::new(
             LayoutPoint::new(x0, y0),
             LayoutSize::new(x1-x0, y1-y0),
         )
--- a/gfx/wr/webrender/src/shade.rs
+++ b/gfx/wr/webrender/src/shade.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 batch::{BatchKey, BatchKind, BrushBatchKind};
-use device::{Device, Program, ShaderError};
+use crate::batch::{BatchKey, BatchKind, BrushBatchKind};
+use crate::device::{Device, Program, ShaderError};
 use euclid::{Transform3D};
-use glyph_rasterizer::GlyphFormat;
-use renderer::{
+use crate::glyph_rasterizer::GlyphFormat;
+use crate::renderer::{
     desc,
     MAX_VERTEX_TEXTURE_WIDTH,
     BlendMode, DebugFlags, ImageBufferKind, RendererError, RendererOptions,
     TextureSampler, VertexArrayKind, ShaderPrecacheFlags,
 };
 
 use gleam::gl::GlType;
 use time::precise_time_ns;
--- a/gfx/wr/webrender/src/spatial_node.rs
+++ b/gfx/wr/webrender/src/spatial_node.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/. */
 
 use api::{ExternalScrollId, PipelineId, PropertyBinding, ReferenceFrameKind, ScrollClamping, ScrollLocation};
 use api::{TransformStyle, ScrollSensitivity, StickyOffsetBounds};
 use api::units::*;
-use clip_scroll_tree::{CoordinateSystem, CoordinateSystemId, SpatialNodeIndex, TransformUpdateState};
+use crate::clip_scroll_tree::{CoordinateSystem, CoordinateSystemId, SpatialNodeIndex, TransformUpdateState};
 use euclid::SideOffsets2D;
-use gpu_types::TransformPalette;
-use scene::SceneProperties;
-use util::{LayoutFastTransform, LayoutToWorldFastTransform, ScaleOffset, TransformedRectKind};
+use crate::gpu_types::TransformPalette;
+use crate::scene::SceneProperties;
+use crate::util::{LayoutFastTransform, LayoutToWorldFastTransform, ScaleOffset, TransformedRectKind};
 
 #[derive(Clone, Debug)]
 pub enum SpatialNodeType {
     /// A special kind of node that adjusts its position based on the position
     /// of its parent node and a given set of sticky positioning offset bounds.
     /// Sticky positioned is described in the CSS Positioned Layout Module Level 3 here:
     /// https://www.w3.org/TR/css-position-3/#sticky-pos
     StickyFrame(StickyFrameInfo),
@@ -797,17 +797,17 @@ fn test_cst_perspective_relative_scroll(
     // to a relative scroll node that any external scroll offset is
     // ignored. This is because external scroll offsets are not
     // propagated across reference frame boundaries.
 
     // It's not currently possible to verify this with a wrench reftest,
     // since wrench doesn't understand external scroll ids. When wrench
     // supports this, we could also verify with a reftest.
 
-    use clip_scroll_tree::ClipScrollTree;
+    use crate::clip_scroll_tree::ClipScrollTree;
     use euclid::approxeq::ApproxEq;
 
     let mut cst = ClipScrollTree::new();
     let pipeline_id = PipelineId::dummy();
     let ext_scroll_id = ExternalScrollId(1, pipeline_id);
     let transform = LayoutTransform::create_perspective(100.0);
 
     let root = cst.add_reference_frame(
--- a/gfx/wr/webrender/src/storage.rs
+++ b/gfx/wr/webrender/src/storage.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 std::{iter::Extend, ops, marker::PhantomData, u32};
-use util::Recycler;
+use crate::util::Recycler;
 
 #[derive(Debug, Hash)]
 #[cfg_attr(feature = "capture", derive(Serialize))]
 #[cfg_attr(feature = "replay", derive(Deserialize))]
 pub struct Index<T>(u32, PhantomData<T>);
 
 // We explicitly implement Copy + Clone instead of using #[derive(Copy, Clone)]
 // because we don't want to require that T implements Clone + Copy.
--- a/gfx/wr/webrender/src/texture_cache.rs
+++ b/gfx/wr/webrender/src/texture_cache.rs
@@ -2,25 +2,25 @@
  * 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 api::{DirtyRect, DocumentId, ExternalImageType, ImageFormat};
 use api::{DebugFlags, ImageDescriptor};
 use api::units::*;
 #[cfg(test)]
 use api::IdNamespace;
-use device::{TextureFilter, total_gpu_bytes_allocated};
-use freelist::{FreeList, FreeListHandle, UpsertResult, WeakFreeListHandle};
-use gpu_cache::{GpuCache, GpuCacheHandle};
-use gpu_types::{ImageSource, UvRectKind};
-use internal_types::{CacheTextureId, FastHashMap, LayerIndex, TextureUpdateList, TextureUpdateSource};
-use internal_types::{TextureSource, TextureCacheAllocInfo, TextureCacheUpdate};
-use profiler::{ResourceProfileCounter, TextureCacheProfileCounters};
-use render_backend::{FrameId, FrameStamp};
-use resource_cache::{CacheItem, CachedImageData};
+use crate::device::{TextureFilter, total_gpu_bytes_allocated};
+use crate::freelist::{FreeList, FreeListHandle, UpsertResult, WeakFreeListHandle};
+use crate::gpu_cache::{GpuCache, GpuCacheHandle};
+use crate::gpu_types::{ImageSource, UvRectKind};
+use crate::internal_types::{CacheTextureId, FastHashMap, LayerIndex, TextureUpdateList, TextureUpdateSource};
+use crate::internal_types::{TextureSource, TextureCacheAllocInfo, TextureCacheUpdate};
+use crate::profiler::{ResourceProfileCounter, TextureCacheProfileCounters};
+use crate::render_backend::{FrameId, FrameStamp};
+use crate::resource_cache::{CacheItem, CachedImageData};
 use std::cell::Cell;
 use std::cmp;
 use std::mem;
 use std::time::{Duration, SystemTime};
 use std::rc::Rc;
 
 /// The size of each region/layer in shared cache texture arrays.
 pub const TEXTURE_REGION_DIMENSIONS: i32 = 512;
--- a/gfx/wr/webrender/src/tiling.rs
+++ b/gfx/wr/webrender/src/tiling.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/. */
 
 use api::{ColorF, BorderStyle, MixBlendMode, PipelineId, PremultipliedColorF};
 use api::{DocumentLayer, FilterData, FilterOp, ImageFormat, LineOrientation};
 use api::units::*;
 #[cfg(feature = "pathfinder")]
 use api::FontRenderMode;
-use batch::{AlphaBatchBuilder, AlphaBatchContainer, ClipBatcher, resolve_image};
-use clip::ClipStore;
-use clip_scroll_tree::{ClipScrollTree};
-use debug_render::DebugItem;
-use device::{Texture};
+use crate::batch::{AlphaBatchBuilder, AlphaBatchContainer, ClipBatcher, resolve_image};
+use crate::clip::ClipStore;
+use crate::clip_scroll_tree::{ClipScrollTree};
+use crate::debug_render::DebugItem;
+use crate::device::{Texture};
 #[cfg(feature = "pathfinder")]
 use euclid::{TypedPoint2D, TypedVector2D};
-use frame_builder::FrameGlobalResources;
-use gpu_cache::{GpuCache};
-use gpu_types::{BorderInstance, BlurDirection, BlurInstance, PrimitiveHeaders, ScalingInstance};
-use gpu_types::{TransformData, TransformPalette, ZBufferIdGenerator};
-use internal_types::{CacheTextureId, FastHashMap, SavedTargetIndex, TextureSource};
+use crate::frame_builder::FrameGlobalResources;
+use crate::gpu_cache::{GpuCache};
+use crate::gpu_types::{BorderInstance, BlurDirection, BlurInstance, PrimitiveHeaders, ScalingInstance};
+use crate::gpu_types::{TransformData, TransformPalette, ZBufferIdGenerator};
+use crate::internal_types::{CacheTextureId, FastHashMap, SavedTargetIndex, TextureSource};
 #[cfg(feature = "pathfinder")]
 use pathfinder_partitioner::mesh::Mesh;
-use picture::{RecordedDirtyRegion, SurfaceInfo};
-use prim_store::gradient::GRADIENT_FP_STOPS;
-use prim_store::{PrimitiveStore, DeferredResolve, PrimitiveScratchBuffer};
-use profiler::FrameProfileCounters;
-use render_backend::{DataStores, FrameId};
-use render_task::{BlitSource, RenderTaskAddress, RenderTaskId, RenderTaskKind};
-use render_task::{BlurTask, ClearMode, GlyphTask, RenderTaskLocation, RenderTaskTree, ScalingTask};
-use resource_cache::ResourceCache;
+use crate::picture::{RecordedDirtyRegion, SurfaceInfo};
+use crate::prim_store::gradient::GRADIENT_FP_STOPS;
+use crate::prim_store::{PrimitiveStore, DeferredResolve, PrimitiveScratchBuffer};
+use crate::profiler::FrameProfileCounters;
+use crate::render_backend::{DataStores, FrameId};
+use crate::render_task::{BlitSource, RenderTaskAddress, RenderTaskId, RenderTaskKind};
+use crate::render_task::{BlurTask, ClearMode, GlyphTask, RenderTaskLocation, RenderTaskTree, ScalingTask};
+use crate::resource_cache::ResourceCache;
 use std::{cmp, usize, f32, i32, mem};
-use texture_allocator::{ArrayAllocationTracker, FreeRectSlice};
+use crate::texture_allocator::{ArrayAllocationTracker, FreeRectSlice};
 
 
 const STYLE_SOLID: i32 = ((BorderStyle::Solid as i32) << 8) | ((BorderStyle::Solid as i32) << 16);
 const STYLE_MASK: i32 = 0x00FF_FF00;
 
 /// According to apitrace, textures larger than 2048 break fast clear
 /// optimizations on some intel drivers. We sometimes need to go larger, but
 /// we try to avoid it. This can go away when proper tiling support lands,
--- a/gfx/wr/webrender_api/src/api.rs
+++ b/gfx/wr/webrender_api/src/api.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/. */
 
 extern crate serde_bytes;
 
-use channel::{self, MsgSender, Payload, PayloadSender, PayloadSenderHelperMethods};
+use crate::channel::{self, MsgSender, Payload, PayloadSender, PayloadSenderHelperMethods};
 use std::cell::Cell;
 use std::fmt;
 use std::marker::PhantomData;
 use std::os::raw::c_void;
 use std::path::PathBuf;
 use std::sync::Arc;
 use std::u32;
 // local imports
-use {display_item as di, font};
-use color::{ColorU, ColorF};
-use display_list::{BuiltDisplayList, BuiltDisplayListDescriptor};
-use image::{BlobImageData, BlobImageKey, ImageData, ImageDescriptor, ImageKey};
-use units::*;
+use crate::{display_item as di, font};
+use crate::color::{ColorU, ColorF};
+use crate::display_list::{BuiltDisplayList, BuiltDisplayListDescriptor};
+use crate::image::{BlobImageData, BlobImageKey, ImageData, ImageDescriptor, ImageKey};
+use crate::units::*;
 
 
 pub type TileSize = u16;
 /// Documents are rendered in the ascending order of their associated layer values.
 pub type DocumentLayer = i8;
 
 #[derive(Clone, Deserialize, Serialize)]
 pub enum ResourceUpdate {
@@ -1478,17 +1478,17 @@ pub struct PropertyValue<T> {
 pub struct DynamicProperties {
     pub transforms: Vec<PropertyValue<LayoutTransform>>,
     pub floats: Vec<PropertyValue<f32>>,
 }
 
 pub trait RenderNotifier: Send {
     fn clone(&self) -> Box<RenderNotifier>;
     fn wake_up(&self);
-    fn new_frame_ready(&self, DocumentId, scrolled: bool, composite_needed: bool, render_time_ns: Option<u64>);
+    fn new_frame_ready(&self, _: DocumentId, scrolled: bool, composite_needed: bool, render_time_ns: Option<u64>);
     fn external_event(&self, _evt: ExternalEvent) {
         unimplemented!()
     }
     fn shut_down(&self) {}
 }
 
 #[repr(u32)]
 #[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
--- a/gfx/wr/webrender_api/src/channel.rs
+++ b/gfx/wr/webrender_api/src/channel.rs
@@ -1,13 +1,13 @@
 /* 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 api::{Epoch, PipelineId};
+use crate::api::{Epoch, PipelineId};
 use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
 use std::io::{Cursor, Read};
 use std::mem;
 use std::sync::mpsc::Receiver;
 
 #[derive(Clone)]
 pub struct Payload {
     /// An epoch used to get the proper payload for a pipeline id frame request.
--- a/gfx/wr/webrender_api/src/display_item.rs
+++ b/gfx/wr/webrender_api/src/display_item.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/. */
 
 use euclid::SideOffsets2D;
 use std::ops::Not;
 // local imports
-use font;
-use api::{PipelineId, PropertyBinding};
-use color::ColorF;
-use image::{ColorDepth, ImageKey};
-use units::*;
+use crate::font;
+use crate::api::{PipelineId, PropertyBinding};
+use crate::color::ColorF;
+use crate::image::{ColorDepth, ImageKey};
+use crate::units::*;
 
 // Maximum blur radius.
 // Taken from nsCSSRendering.cpp in Gecko.
 pub const MAX_BLUR_RADIUS: f32 = 300.;
 
 // ******************************************************************
 // * NOTE: some of these structs have an "IMPLICIT" comment.        *
 // * This indicates that the BuiltDisplayList will have serialized  *
--- a/gfx/wr/webrender_api/src/display_list.rs
+++ b/gfx/wr/webrender_api/src/display_list.rs
@@ -11,23 +11,23 @@ use serde::ser::{Serializer, SerializeSe
 use serde::{Deserialize, Serialize};
 use std::io::{Read, stdout, Write};
 use std::marker::PhantomData;
 use std::ops::Range;
 use std::{io, mem, ptr, slice};
 use std::collections::HashMap;
 use time::precise_time_ns;
 // local imports
-use display_item as di;
-use api::{PipelineId, PropertyBinding};
-use gradient_builder::GradientBuilder;
-use color::ColorF;
-use font::{FontInstanceKey, GlyphInstance, GlyphOptions};
-use image::{ColorDepth, ImageKey};
-use units::*;
+use crate::display_item as di;
+use crate::api::{PipelineId, PropertyBinding};
+use crate::gradient_builder::GradientBuilder;
+use crate::color::ColorF;
+use crate::font::{FontInstanceKey, GlyphInstance, GlyphOptions};
+use crate::image::{ColorDepth, ImageKey};
+use crate::units::*;
 
 
 // We don't want to push a long text-run. If a text-run is too long, split it into several parts.
 // This needs to be set to (renderer::MAX_VERTEX_TEXTURE_WIDTH - VECS_PER_TEXT_RUN) * 2
 pub const MAX_TEXT_RUN_LENGTH: usize = 2040;
 
 // See ROOT_REFERENCE_FRAME_SPATIAL_ID and ROOT_SCROLL_NODE_SPATIAL_ID
 // TODO(mrobinson): It would be a good idea to eliminate the root scroll frame which is only
@@ -258,17 +258,17 @@ impl<'a> BuiltDisplayListIter<'a> {
         }
     }
 
     pub fn display_list(&self) -> &'a BuiltDisplayList {
         self.list
     }
 
     pub fn next<'b>(&'b mut self) -> Option<DisplayItemRef<'a, 'b>> {
-        use DisplayItem::*;
+        use crate::DisplayItem::*;
 
         match self.peeking {
             Peek::IsPeeking => {
                 self.peeking = Peek::NotPeeking;
                 return Some(self.as_ref());
             }
             Peek::StartPeeking => {
                 self.peeking = Peek::IsPeeking;
@@ -298,17 +298,17 @@ impl<'a> BuiltDisplayListIter<'a> {
 
         Some(self.as_ref())
     }
 
     /// Gets the next display item, even if it's a dummy. Also doesn't handle peeking
     /// and may leave irrelevant ranges live (so a Clip may have GradientStops if
     /// for some reason you ask).
     pub fn next_raw<'b>(&'b mut self) -> Option<DisplayItemRef<'a, 'b>> {
-        use DisplayItem::*;
+        use crate::DisplayItem::*;
 
         if self.data.is_empty() {
             return None;
         }
 
         {
             let reader = bincode::IoReader::new(UnsafeReader::new(&mut self.data));
             bincode::deserialize_in_place(reader, &mut self.cur_item)
@@ -548,18 +548,18 @@ impl<'a, T: for<'de> Deserialize<'de>> I
 }
 
 impl<'a, T: for<'de> Deserialize<'de>> ::std::iter::ExactSizeIterator for AuxIter<'a, T> {}
 
 
 #[cfg(feature = "serialize")]
 impl Serialize for BuiltDisplayList {
     fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
-        use display_item::DisplayItem as Real;
-        use display_item::DebugDisplayItem as Debug;
+        use crate::display_item::DisplayItem as Real;
+        use crate::display_item::DebugDisplayItem as Debug;
 
         let mut seq = serializer.serialize_seq(None)?;
         let mut traversal = self.iter();
         while let Some(item) = traversal.next_raw() {
             let serial_di = match *item.item() {
                 Real::Clip(v) => Debug::Clip(
                     v,
                     item.iter.list.get(item.iter.cur_complex_clip.0).collect()
@@ -631,18 +631,18 @@ impl Serialize for BuiltDisplayList {
 // serialize then into a "built" `Vec<u8>`.
 
 #[cfg(feature = "deserialize")]
 impl<'de> Deserialize<'de> for BuiltDisplayList {
     fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
     where
         D: Deserializer<'de>,
     {
-        use display_item::DisplayItem as Real;
-        use display_item::DebugDisplayItem as Debug;
+        use crate::display_item::DisplayItem as Real;
+        use crate::display_item::DebugDisplayItem as Debug;
 
         let list = Vec::<Debug>::deserialize(deserializer)?;
 
         let mut data = Vec::new();
         let mut temp = Vec::new();
         let mut total_clip_nodes = FIRST_CLIP_NODE_INDEX;
         let mut total_spatial_nodes = FIRST_SPATIAL_NODE_INDEX;
         for complete in list {
--- a/gfx/wr/webrender_api/src/font.rs
+++ b/gfx/wr/webrender_api/src/font.rs
@@ -12,19 +12,19 @@ use serde::de::{self, Deserialize, Deser
 #[cfg(target_os = "macos")]
 use serde::ser::{Serialize, Serializer};
 use std::cmp::Ordering;
 use std::hash::{Hash, Hasher};
 #[cfg(not(target_os = "macos"))]
 use std::path::PathBuf;
 use std::sync::Arc;
 // local imports
-use api::IdNamespace;
-use color::ColorU;
-use units::LayoutPoint;
+use crate::api::IdNamespace;
+use crate::color::ColorU;
+use crate::units::LayoutPoint;
 
 
 #[cfg(not(target_os = "macos"))]
 #[derive(Clone, Debug, Serialize, Deserialize)]
 pub struct NativeFontHandle {
     pub path: PathBuf,
     pub index: u32,
 }
--- a/gfx/wr/webrender_api/src/gradient_builder.rs
+++ b/gfx/wr/webrender_api/src/gradient_builder.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 display_item as di;
-use units::*;
+use crate::display_item as di;
+use crate::units::*;
 
 
 /// Construct a gradient to be used in display lists.
 ///
 /// Each gradient needs at least two stops.
 pub struct GradientBuilder {
     stops: Vec<di::GradientStop>,
 }
--- a/gfx/wr/webrender_api/src/image.rs
+++ b/gfx/wr/webrender_api/src/image.rs
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #![deny(missing_docs)]
 
 use euclid::{size2, TypedRect, num::Zero};
 use std::ops::{Add, Sub};
 use std::sync::Arc;
 // local imports
-use api::{IdNamespace, TileSize};
-use font::{FontInstanceKey, FontInstanceData, FontKey, FontTemplate};
-use units::*;
+use crate::api::{IdNamespace, TileSize};
+use crate::font::{FontInstanceKey, FontInstanceData, FontKey, FontTemplate};
+use crate::units::*;
 
 /// An opaque identifier describing an image registered with WebRender.
 /// This is used as a handle to reference images, and is used as the
 /// hash map key for the actual image storage in the `ResourceCache`.
 #[repr(C)]
 #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)]
 pub struct ImageKey(pub IdNamespace, pub u32);
 
@@ -393,48 +393,48 @@ where
     pub fn replace_with_empty(&mut self) -> Self {
         ::std::mem::replace(self, DirtyRect::empty())
     }
 
     /// Maps over the contents of Partial.
     pub fn map<F>(self, func: F) -> Self
         where F: FnOnce(TypedRect<T, U>) -> TypedRect<T, U>,
     {
-        use DirtyRect::*;
+        use crate::DirtyRect::*;
 
         match self {
             All        => All,
             Partial(rect) => Partial(func(rect)),
         }
     }
 
     /// Unions the dirty rects.
     pub fn union(&self, other: &Self) -> Self {
-        use DirtyRect::*;
+        use crate::DirtyRect::*;
 
         match (*self, *other) {
             (All, _) | (_, All)        => All,
             (Partial(rect1), Partial(rect2)) => Partial(rect1.union(&rect2)),
         }
     }
 
     /// Intersects the dirty rects.
     pub fn intersection(&self, other: &Self) -> Self {
-        use DirtyRect::*;
+        use crate::DirtyRect::*;
 
         match (*self, *other) {
             (All, rect) | (rect, All)  => rect,
             (Partial(rect1), Partial(rect2)) => Partial(rect1.intersection(&rect2)
                                                                    .unwrap_or(TypedRect::zero()))
         }
     }
 
     /// Converts the dirty rect into a subrect of the given one via intersection.
     pub fn to_subrect_of(&self, rect: &TypedRect<T, U>) -> TypedRect<T, U> {
-        use DirtyRect::*;
+        use crate::DirtyRect::*;
 
         match *self {
             All              => *rect,
             Partial(dirty_rect) => dirty_rect.intersection(rect)
                                                .unwrap_or(TypedRect::zero()),
         }
     }
 }
--- a/gfx/wr/webrender_api/src/lib.rs
+++ b/gfx/wr/webrender_api/src/lib.rs
@@ -44,15 +44,15 @@ pub mod channel;
 mod color;
 mod display_item;
 mod display_list;
 mod font;
 mod gradient_builder;
 mod image;
 pub mod units;
 
-pub use api::*;
-pub use color::*;
-pub use display_item::*;
-pub use display_list::*;
-pub use font::*;
-pub use gradient_builder::*;
-pub use image::*;
+pub use crate::api::*;
+pub use crate::color::*;
+pub use crate::display_item::*;
+pub use crate::display_list::*;
+pub use crate::font::*;
+pub use crate::gradient_builder::*;
+pub use crate::image::*;
--- a/gfx/wr/webrender_api/src/units.rs
+++ b/gfx/wr/webrender_api/src/units.rs
@@ -12,17 +12,17 @@
 //! The terms "layer" and "stacking context" can be used interchangeably
 //! in the context of coordinate systems.
 
 pub use app_units::Au;
 use euclid::{Length, TypedRect, TypedScale, TypedSize2D, TypedTransform3D, TypedTranslation2D};
 use euclid::{TypedPoint2D, TypedPoint3D, TypedVector2D, TypedVector3D, TypedSideOffsets2D};
 use euclid::HomogeneousVector;
 // local imports
-use image::DirtyRect;
+use crate::image::DirtyRect;
 
 /// Geometry in the coordinate system of the render target (screen or intermediate
 /// surface) in physical pixels.
 #[derive(Hash, Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
 pub struct DevicePixel;
 
 pub type DeviceIntRect = TypedRect<i32, DevicePixel>;
 pub type DeviceIntPoint = TypedPoint2D<i32, DevicePixel>;
--- a/gfx/wr/wrench/src/binary_frame_reader.rs
+++ b/gfx/wr/wrench/src/binary_frame_reader.rs
@@ -7,17 +7,17 @@ use byteorder::{LittleEndian, ReadBytesE
 use clap;
 use std::any::TypeId;
 use std::fs::File;
 use std::io::{Read, Seek, SeekFrom};
 use std::path::{Path, PathBuf};
 use std::{mem, process};
 use webrender::WEBRENDER_RECORDING_HEADER;
 use webrender::api::{ApiMsg, SceneMsg};
-use wrench::{Wrench, WrenchThing};
+use crate::wrench::{Wrench, WrenchThing};
 
 #[derive(Clone)]
 enum Item {
     Message(ApiMsg),
     Data(Vec<u8>),
 }
 
 pub struct BinaryFrameReader {
--- a/gfx/wr/wrench/src/egl.rs
+++ b/gfx/wr/wrench/src/egl.rs
@@ -126,17 +126,17 @@ impl Context {
                     } else {
                         (Some(opengles_version), Api::OpenGlEs)
                     }
                 },
             }
         };
 
         let (config_id, pixel_format) = unsafe {
-            try!(choose_fbconfig(display, &egl_version, api, version, pf_reqs))
+            r#try!(choose_fbconfig(display, &egl_version, api, version, pf_reqs))
         };
 
         Ok(ContextPrototype {
             opengl: opengl,
             display: display,
             egl_version: egl_version,
             extensions: extensions,
             api: api,
@@ -280,17 +280,17 @@ impl<'a> ContextPrototype<'a> {
         self.finish_impl(surface)
     }
 
     fn finish_impl(self, surface: ffi::egl::types::EGLSurface)
                    -> Result<Context, CreationError>
     {
         let context = unsafe {
             if let Some(version) = self.version {
-                try!(create_context(self.display, &self.egl_version,
+                r#try!(create_context(self.display, &self.egl_version,
                                     &self.extensions, self.api, version, self.config_id,
                                     self.opengl.debug, self.opengl.robustness))
 
             } else if self.api == Api::OpenGlEs {
                 if let Ok(ctxt) = create_context(self.display, &self.egl_version,
                                                  &self.extensions, self.api, (2, 0), self.config_id,
                                                  self.opengl.debug, self.opengl.robustness)
                 {
--- a/gfx/wr/wrench/src/json_frame_writer.rs
+++ b/gfx/wr/wrench/src/json_frame_writer.rs
@@ -2,17 +2,17 @@
  * 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 json code is largely unfinished; allow these to silence a bunch of warnings
 #![allow(unused_variables)]
 #![allow(dead_code)]
 
 use image::{save_buffer, ColorType};
-use premultiply::unpremultiply;
+use crate::premultiply::unpremultiply;
 use serde_json;
 use std::collections::HashMap;
 use std::io::Write;
 use std::path::{Path, PathBuf};
 use std::{fmt, fs};
 use super::CURRENT_FRAME_NUMBER;
 use time;
 use webrender;
--- a/gfx/wr/wrench/src/main.rs
+++ b/gfx/wr/wrench/src/main.rs
@@ -54,41 +54,41 @@ mod ron_frame_writer;
 mod scene;
 mod wrench;
 mod yaml_frame_reader;
 mod yaml_frame_writer;
 mod yaml_helper;
 #[cfg(target_os = "macos")]
 mod cgfont_to_data;
 
-use binary_frame_reader::BinaryFrameReader;
+use crate::binary_frame_reader::BinaryFrameReader;
 use gleam::gl;
 use glutin::GlContext;
-use perf::PerfHarness;
-use png::save_flipped;
-use rawtest::RawtestHarness;
-use reftest::{ReftestHarness, ReftestOptions};
+use crate::perf::PerfHarness;
+use crate::png::save_flipped;
+use crate::rawtest::RawtestHarness;
+use crate::reftest::{ReftestHarness, ReftestOptions};
 use std::fs;
 #[cfg(feature = "headless")]
 use std::ffi::CString;
 #[cfg(feature = "headless")]
 use std::mem;
 use std::os::raw::c_void;
 use std::path::{Path, PathBuf};
 use std::process;
 use std::ptr;
 use std::rc::Rc;
 use std::sync::mpsc::{channel, Sender, Receiver};
 use webrender::DebugFlags;
 use webrender::api::*;
 use webrender::api::units::*;
 use winit::dpi::{LogicalPosition, LogicalSize};
 use winit::VirtualKeyCode;
-use wrench::{Wrench, WrenchThing};
-use yaml_frame_reader::YamlFrameReader;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
 
 lazy_static! {
     static ref PLATFORM_DEFAULT_FACE_NAME: String = String::from("Arial");
 }
 
 pub static mut CURRENT_FRAME_NUMBER: u32 = 0;
 
 #[cfg(feature = "headless")]
--- a/gfx/wr/wrench/src/perf.rs
+++ b/gfx/wr/wrench/src/perf.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/. */
 
-use NotifierEvent;
-use WindowWrapper;
+use crate::NotifierEvent;
+use crate::WindowWrapper;
 use serde_json;
 use std::collections::{HashMap, HashSet};
 use std::fs::File;
 use std::io::{BufRead, BufReader};
 use std::io::{Read, Write};
 use std::path::{Path, PathBuf};
 use std::sync::mpsc::Receiver;
-use wrench::{Wrench, WrenchThing};
-use yaml_frame_reader::YamlFrameReader;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
 
 const COLOR_DEFAULT: &str = "\x1b[0m";
 const COLOR_RED: &str = "\x1b[31m";
 const COLOR_GREEN: &str = "\x1b[32m";
 const COLOR_MAGENTA: &str = "\x1b[95m";
 
 const MIN_SAMPLE_COUNT: usize = 50;
 const SAMPLE_EXCLUDE_COUNT: usize = 10;
--- a/gfx/wr/wrench/src/png.rs
+++ b/gfx/wr/wrench/src/png.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/. */
 
-use {WindowWrapper, NotifierEvent};
+use crate::{WindowWrapper, NotifierEvent};
 use image::png::PNGEncoder;
 use image::{self, ColorType, GenericImageView};
 use std::fs::File;
 use std::path::{Path, PathBuf};
 use std::sync::mpsc::Receiver;
 use webrender::api::units::*;
-use wrench::{Wrench, WrenchThing};
-use yaml_frame_reader::YamlFrameReader;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
 
 pub enum ReadSurface {
     Screen,
     GpuCache,
 }
 
 pub struct SaveSettings {
     pub flip_vertical: bool,
--- a/gfx/wr/wrench/src/rawtest.rs
+++ b/gfx/wr/wrench/src/rawtest.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/. */
 
-use {WindowWrapper, NotifierEvent};
-use blob;
+use crate::{WindowWrapper, NotifierEvent};
+use crate::blob;
 use euclid::{point2, size2, rect};
 use std::sync::Arc;
 use std::sync::atomic::{AtomicIsize, Ordering};
 use std::sync::mpsc::Receiver;
 use webrender::api::*;
 use webrender::api::units::*;
-use wrench::Wrench;
+use crate::wrench::Wrench;
 
 pub struct RawtestHarness<'a> {
     wrench: &'a mut Wrench,
     rx: &'a Receiver<NotifierEvent>,
     window: &'a mut WindowWrapper,
 }
 
 
--- a/gfx/wr/wrench/src/reftest.rs
+++ b/gfx/wr/wrench/src/reftest.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/. */
 
-use {WindowWrapper, NotifierEvent};
+use crate::{WindowWrapper, NotifierEvent};
 use base64;
 use image::load as load_piston_image;
 use image::png::PNGEncoder;
 use image::{ColorType, ImageFormat};
-use parse_function::parse_function;
-use png::save_flipped;
+use crate::parse_function::parse_function;
+use crate::png::save_flipped;
 use std::cmp;
 use std::fmt::{Display, Error, Formatter};
 use std::fs::File;
 use std::io::{BufRead, BufReader};
 use std::path::{Path, PathBuf};
 use std::sync::mpsc::Receiver;
 use webrender::RenderResults;
 use webrender::api::*;
 use webrender::api::units::*;
-use wrench::{Wrench, WrenchThing};
-use yaml_frame_reader::YamlFrameReader;
+use crate::wrench::{Wrench, WrenchThing};
+use crate::yaml_frame_reader::YamlFrameReader;
 
 
 #[cfg(target_os = "windows")]
 const PLATFORM: &str = "win";
 #[cfg(target_os = "linux")]
 const PLATFORM: &str = "linux";
 #[cfg(target_os = "macos")]
 const PLATFORM: &str = "mac";
--- a/gfx/wr/wrench/src/wrench.rs
+++ b/gfx/wr/wrench/src/wrench.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/. */
 
 
-use blob;
+use crate::blob;
 use crossbeam::sync::chase_lev;
 #[cfg(windows)]
 use dwrote;
 #[cfg(all(unix, not(target_os = "android")))]
 use font_loader::system_fonts;
 use winit::EventsLoopProxy;
-use json_frame_writer::JsonFrameWriter;
-use ron_frame_writer::RonFrameWriter;
+use crate::json_frame_writer::JsonFrameWriter;
+use crate::ron_frame_writer::RonFrameWriter;
 use std::collections::HashMap;
 use std::path::PathBuf;
 use std::sync::{Arc, Mutex};
 use std::sync::mpsc::Receiver;
 use time;
 use webrender;
 use webrender::api::*;
 use webrender::api::units::*;
 use webrender::{DebugFlags, RenderResults, ShaderPrecacheFlags};
-use yaml_frame_writer::YamlFrameWriterReceiver;
-use {WindowWrapper, NotifierEvent};
+use crate::yaml_frame_writer::YamlFrameWriterReceiver;
+use crate::{WindowWrapper, NotifierEvent};
 
 // TODO(gw): This descriptor matches what we currently support for fonts
 //           but is quite a mess. We should at least document and
 //           use better types for things like the style and stretch.
 #[derive(Debug, Clone, Hash, PartialEq, Eq)]
 pub enum FontDescriptor {
     Path { path: PathBuf, font_index: u32 },
     Family { name: String },
@@ -115,17 +115,17 @@ impl RenderNotifier for Notifier {
                        _render_time: Option<u64>) {
         self.update(!scrolled);
     }
 }
 
 pub trait WrenchThing {
     fn next_frame(&mut self);
     fn prev_frame(&mut self);
-    fn do_frame(&mut self, &mut Wrench) -> u32;
+    fn do_frame(&mut self, _: &mut Wrench) -> u32;
 }
 
 impl WrenchThing for CapturedDocument {
     fn next_frame(&mut self) {}
     fn prev_frame(&mut self) {}
     fn do_frame(&mut self, wrench: &mut Wrench) -> u32 {
         match self.root_pipeline_id.take() {
             Some(root_pipeline_id) => {
--- a/gfx/wr/wrench/src/yaml_frame_reader.rs
+++ b/gfx/wr/wrench/src/yaml_frame_reader.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/. */
 
 use clap;
 use euclid::SideOffsets2D;
 use image;
 use image::GenericImageView;
-use parse_function::parse_function;
-use premultiply::premultiply;
+use crate::parse_function::parse_function;
+use crate::premultiply::premultiply;
 use std::collections::HashMap;
 use std::fs::File;
 use std::io::Read;
 use std::path::{Path, PathBuf};
 use std::usize;
 use webrender::api::*;
 use webrender::api::units::*;
-use wrench::{FontDescriptor, Wrench, WrenchThing};
-use yaml_helper::{StringEnum, YamlHelper, make_perspective};
+use crate::wrench::{FontDescriptor, Wrench, WrenchThing};
+use crate::yaml_helper::{StringEnum, YamlHelper, make_perspective};
 use yaml_rust::{Yaml, YamlLoader};
-use PLATFORM_DEFAULT_FACE_NAME;
+use crate::PLATFORM_DEFAULT_FACE_NAME;
 
 macro_rules! try_intersect {
     ($first: expr, $second: expr) => {
         if let Some(rect) = ($first).intersection($second) {
             rect
         } else {
             warn!("skipping item with non-intersecting bounds and clip_rect");
             return;
--- a/gfx/wr/wrench/src/yaml_frame_writer.rs
+++ b/gfx/wr/wrench/src/yaml_frame_writer.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/. */
 
 extern crate yaml_rust;
 
 use euclid::{TypedPoint2D, TypedRect, TypedSize2D, TypedTransform3D, TypedVector2D};
 use image::{save_buffer, ColorType};
-use premultiply::unpremultiply;
-use scene::{Scene, SceneProperties};
+use crate::premultiply::unpremultiply;
+use crate::scene::{Scene, SceneProperties};
 use std::collections::HashMap;
 use std::io::Write;
 use std::path::{Path, PathBuf};
 use std::{fmt, fs};
 use super::CURRENT_FRAME_NUMBER;
 use time;
 use webrender;
 use webrender::api::*;
 use webrender::api::channel::Payload;
 use webrender::api::units::*;
-use yaml_helper::StringEnum;
+use crate::yaml_helper::StringEnum;
 use yaml_rust::{Yaml, YamlEmitter};
 
 type Table = yaml_rust::yaml::Hash;
 
 fn array_elements_are_same<T: PartialEq>(v: &[T]) -> bool {
     if !v.is_empty() {
         let first = &v[0];
         for o in v.iter() {
@@ -345,17 +345,17 @@ fn native_font_handle_to_yaml(
     rsrc: &mut ResourceGenerator,
     handle: &NativeFontHandle,
     parent: &mut yaml_rust::yaml::Hash,
     path_opt: &mut Option<PathBuf>,
 ) {
     let path = match *path_opt {
         Some(ref path) => { path.clone() },
         None => {
-            use cgfont_to_data;
+            use crate::cgfont_to_data;
             let bytes = cgfont_to_data::font_to_data(handle.0.clone()).unwrap();
             let (path_file, path) = rsrc.next_rsrc_paths(
                 "font",
                 "ttf",
             );
             let mut file = fs::File::create(&path_file).unwrap();
             file.write_all(&bytes).unwrap();
             *path_opt = Some(path.clone());
--- a/gfx/wr/wrench/src/yaml_helper.rs
+++ b/gfx/wr/wrench/src/yaml_helper.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 euclid::{Angle, TypedSize2D};
-use parse_function::parse_function;
+use crate::parse_function::parse_function;
 use std::f32;
 use std::str::FromStr;
 use webrender::api::*;
 use webrender::api::units::*;
 use yaml_rust::{Yaml, YamlLoader};
 
 pub trait YamlHelper {
     fn as_f32(&self) -> Option<f32>;
@@ -70,17 +70,17 @@ fn string_to_color(color: &str) -> Optio
             } else {
                 None
             }
         }
     }
 }
 
 pub trait StringEnum: Sized {
-    fn from_str(&str) -> Option<Self>;
+    fn from_str(_: &str) -> Option<Self>;
     fn as_str(&self) -> &'static str;
 }
 
 macro_rules! define_string_enum {
     ($T:ident, [ $( $y:ident = $x:expr ),* ]) => {
         impl StringEnum for $T {
             fn from_str(text: &str) -> Option<$T> {
                 match text {