servo: Merge #12817 - Update to euclid 0.8 (from servo:euclid); r=nox
authorMartin Robinson <mrobinson@igalia.com>
Thu, 11 Aug 2016 20:12:29 -0500
changeset 386121 0c5058d27b3987c227c29bf903951feb19da43ba
parent 386120 024b9af9935d4c86c1d6a6aead18e5fba6fe8487
child 386122 aa7b1288feb658f367d4997b4ccee99bf72078fd
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox
servo: Merge #12817 - Update to euclid 0.8 (from servo:euclid); r=nox Source-Repo: https://github.com/servo/servo Source-Revision: 5b915c403d2e96bd2917e7df4f2a58a6668a0c0e
servo/components/canvas/Cargo.toml
servo/components/canvas/canvas_paint_thread.rs
servo/components/canvas_traits/Cargo.toml
servo/components/compositing/Cargo.toml
servo/components/compositing/compositor.rs
servo/components/compositing/compositor_layer.rs
servo/components/compositing/lib.rs
servo/components/compositing/touch.rs
servo/components/compositing/windowing.rs
servo/components/constellation/Cargo.toml
servo/components/constellation/constellation.rs
servo/components/constellation/pipeline.rs
servo/components/gfx/Cargo.toml
servo/components/gfx/display_list/mod.rs
servo/components/gfx/paint_context.rs
servo/components/gfx/paint_thread.rs
servo/components/gfx_traits/Cargo.toml
servo/components/layout/Cargo.toml
servo/components/layout/block.rs
servo/components/layout/model.rs
servo/components/layout/multicol.rs
servo/components/layout_thread/Cargo.toml
servo/components/layout_thread/lib.rs
servo/components/script/Cargo.toml
servo/components/script/dom/document.rs
servo/components/script/dom/window.rs
servo/components/script_layout_interface/Cargo.toml
servo/components/script_traits/Cargo.toml
servo/components/script_traits/lib.rs
servo/components/servo/Cargo.lock
servo/components/servo/Cargo.toml
servo/components/style/Cargo.toml
servo/components/style/logical_geometry.rs
servo/components/style/media_queries.rs
servo/components/style/properties/longhand/box.mako.rs
servo/components/style/viewport.rs
servo/components/style_traits/Cargo.toml
servo/components/style_traits/viewport.rs
servo/components/util/Cargo.toml
servo/components/util/geometry.rs
servo/components/util/lib.rs
servo/components/util/opts.rs
servo/components/webdriver_server/Cargo.toml
servo/components/webdriver_server/lib.rs
servo/ports/cef/Cargo.lock
servo/ports/cef/Cargo.toml
servo/ports/cef/browser_host.rs
servo/ports/cef/window.rs
servo/ports/geckolib/Cargo.lock
servo/ports/geckolib/Cargo.toml
servo/ports/geckolib/data.rs
servo/ports/glutin/Cargo.toml
servo/ports/glutin/window.rs
servo/tests/unit/style/Cargo.toml
servo/tests/unit/style/media_queries.rs
servo/tests/unit/style/viewport.rs
--- a/servo/components/canvas/Cargo.toml
+++ b/servo/components/canvas/Cargo.toml
@@ -7,22 +7,22 @@ publish = false
 
 [lib]
 name = "canvas"
 path = "lib.rs"
 
 [dependencies]
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
 canvas_traits = {path = "../canvas_traits"}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx_traits = {path = "../gfx_traits"}
 gleam = "0.2.8"
 ipc-channel = "0.4.0"
 log = "0.3.5"
 num-traits = "0.1.32"
-offscreen_gl_context = "0.1.2"
+offscreen_gl_context = "0.2.0"
 plugins = {path = "../plugins"}
 util = {path = "../util"}
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender_traits"
 default_features = false
 features = ["serde_macros"]
--- a/servo/components/canvas/canvas_paint_thread.rs
+++ b/servo/components/canvas/canvas_paint_thread.rs
@@ -515,17 +515,17 @@ impl<'a> CanvasPaintThread<'a> {
         self.state.stroke_opts.line_join = join.to_azure_style();
     }
 
     fn set_miter_limit(&mut self, limit: f32) {
         self.state.stroke_opts.miter_limit = limit;
     }
 
     fn set_transform(&mut self, transform: &Matrix2D<f32>) {
-        self.state.transform = *transform;
+        self.state.transform = transform.clone();
         self.drawtarget.set_transform(transform)
     }
 
     fn set_global_alpha(&mut self, alpha: f32) {
         self.state.draw_options.alpha = alpha;
     }
 
     fn set_global_composition(&mut self, op: CompositionOrBlending) {
--- a/servo/components/canvas_traits/Cargo.toml
+++ b/servo/components/canvas_traits/Cargo.toml
@@ -7,17 +7,17 @@ publish = false
 
 [lib]
 name = "canvas_traits"
 path = "lib.rs"
 
 [dependencies]
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
 cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 ipc-channel = "0.4.0"
 plugins = {path = "../plugins"}
 serde = {version = "0.7.15", features = ["nightly"]}
 serde_macros = "0.7.15"
 
--- a/servo/components/compositing/Cargo.toml
+++ b/servo/components/compositing/Cargo.toml
@@ -7,17 +7,17 @@ publish = false
 
 [lib]
 name = "compositing"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.2.5"
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx_traits = {path = "../gfx_traits"}
 gleam = "0.2.8"
 image = "0.10"
 ipc-channel = "0.4.0"
 layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
 log = "0.3.5"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
--- a/servo/components/compositing/compositor.rs
+++ b/servo/components/compositing/compositor.rs
@@ -148,34 +148,34 @@ pub struct IOCompositor<Window: WindowMe
 
     /// Tracks details about each active pipeline that the compositor knows about.
     pipeline_details: HashMap<PipelineId, PipelineDetails>,
 
     /// The canvas to paint a page.
     scene: Scene<CompositorData>,
 
     /// The application window size.
-    window_size: TypedSize2D<DevicePixel, u32>,
+    window_size: TypedSize2D<u32, DevicePixel>,
 
     /// The overridden viewport.
-    viewport: Option<(TypedPoint2D<DevicePixel, u32>, TypedSize2D<DevicePixel, u32>)>,
+    viewport: Option<(TypedPoint2D<u32, DevicePixel>, TypedSize2D<u32, DevicePixel>)>,
 
     /// "Mobile-style" zoom that does not reflow the page.
-    viewport_zoom: ScaleFactor<PagePx, ViewportPx, f32>,
+    viewport_zoom: ScaleFactor<f32, PagePx, ViewportPx>,
 
     /// Viewport zoom constraints provided by @viewport.
-    min_viewport_zoom: Option<ScaleFactor<PagePx, ViewportPx, f32>>,
-    max_viewport_zoom: Option<ScaleFactor<PagePx, ViewportPx, f32>>,
+    min_viewport_zoom: Option<ScaleFactor<f32, PagePx, ViewportPx>>,
+    max_viewport_zoom: Option<ScaleFactor<f32, PagePx, ViewportPx>>,
 
     /// "Desktop-style" zoom that resizes the viewport to fit the window.
     /// See `ViewportPx` docs in util/geom.rs for details.
-    page_zoom: ScaleFactor<ViewportPx, ScreenPx, f32>,
+    page_zoom: ScaleFactor<f32, ViewportPx, ScreenPx>,
 
     /// The device pixel ratio for this window.
-    scale_factor: ScaleFactor<ScreenPx, DevicePixel, f32>,
+    scale_factor: ScaleFactor<f32, ScreenPx, DevicePixel>,
 
     channel_to_self: Box<CompositorProxy + Send>,
 
     /// A handle to the delayed composition timer.
     delayed_composition_timer: DelayedCompositionTimerProxy,
 
     /// The type of composition to perform
     composite_target: CompositeTarget,
@@ -249,19 +249,19 @@ pub struct IOCompositor<Window: WindowMe
     webrender_api: Option<webrender_traits::RenderApi>,
 }
 
 #[derive(Copy, Clone)]
 struct ScrollZoomEvent {
     /// Change the pinch zoom level by this factor
     magnification: f32,
     /// Scroll by this offset
-    delta: TypedPoint2D<DevicePixel, f32>,
+    delta: TypedPoint2D<f32, DevicePixel>,
     /// Apply changes to the frame at this location
-    cursor: TypedPoint2D<DevicePixel, i32>,
+    cursor: TypedPoint2D<i32, DevicePixel>,
     /// The scroll event phase.
     phase: ScrollEventPhase,
     /// The number of OS events that have been coalesced together into this one event.
     event_count: u32,
 }
 
 #[derive(PartialEq, Debug)]
 enum CompositionRequest {
@@ -276,17 +276,17 @@ enum ShutdownState {
     ShuttingDown,
     FinishedShuttingDown,
 }
 
 struct HitTestResult {
     /// The topmost layer containing the requested point
     layer: Rc<Layer<CompositorData>>,
     /// The point in client coordinates of the innermost window or frame containing `layer`
-    point: TypedPoint2D<LayerPixel, f32>,
+    point: TypedPoint2D<f32, LayerPixel>,
 }
 
 struct PipelineDetails {
     /// The pipeline associated with this PipelineDetails object.
     pipeline: Option<CompositionPipeline>,
 
     /// The current layout epoch that this pipeline wants to draw.
     current_epoch: Epoch,
@@ -462,20 +462,17 @@ impl<Window: WindowMethods> IOCompositor
 
         IOCompositor {
             window: window,
             native_display: native_display,
             port: state.receiver,
             context: None,
             root_pipeline: None,
             pipeline_details: HashMap::new(),
-            scene: Scene::new(Rect {
-                origin: Point2D::zero(),
-                size: window_size.as_f32(),
-            }),
+            scene: Scene::new(TypedRect::new(TypedPoint2D::zero(), window_size.as_f32())),
             window_size: window_size,
             viewport: None,
             scale_factor: scale_factor,
             channel_to_self: state.sender.clone_compositor_proxy(),
             delayed_composition_timer: DelayedCompositionTimerProxy::new(state.sender),
             composition_request: CompositionRequest::NoCompositingNecessary,
             touch_handler: TouchHandler::new(),
             pending_scroll_zoom_events: Vec::new(),
@@ -787,17 +784,17 @@ impl<Window: WindowMethods> IOCompositor
                 self.remove_pipeline_root_layer(pipeline_id);
                 let _ = sender.send(());
             }
 
             (Msg::GetScrollOffset(pipeline_id, layer_id, sender), ShutdownState::NotShuttingDown) => {
                 match self.find_layer_with_pipeline_and_layer_id(pipeline_id, layer_id) {
                     Some(ref layer) => {
                         let typed = layer.extra_data.borrow().scroll_offset;
-                        let _ = sender.send(Point2D::new(typed.x.get(), typed.y.get()));
+                        let _ = sender.send(Point2D::new(typed.x, typed.y));
                     },
                     None => {
                         warn!("Can't find requested layer in handling Msg::GetScrollOffset");
                     },
                 }
             }
 
             (Msg::NewScrollFrameReady(recomposite_needed), ShutdownState::NotShuttingDown) => {
@@ -908,17 +905,17 @@ impl<Window: WindowMethods> IOCompositor
         self.send_window_size(WindowSizeType::Initial);
 
         self.frame_tree_id.next();
         self.composite_if_necessary_if_not_using_webrender(CompositingReason::NewFrameTree);
     }
 
     fn create_root_layer_for_pipeline_and_size(&mut self,
                                                pipeline: &CompositionPipeline,
-                                               frame_size: Option<TypedSize2D<PagePx, f32>>)
+                                               frame_size: Option<TypedSize2D<f32, PagePx>>)
                                                -> Rc<Layer<CompositorData>> {
         let layer_properties = LayerProperties {
             id: LayerId::null(),
             parent_id: None,
             rect: Rect::zero(),
             background_color: color::transparent(),
             scroll_policy: ScrollPolicy::Scrollable,
             transform: Matrix4D::identity(),
@@ -934,18 +931,18 @@ impl<Window: WindowMethods> IOCompositor
                                                    opts::get().tile_size);
 
         self.pipeline_details(pipeline.id).pipeline = Some(pipeline.clone());
 
         // All root layers mask to bounds.
         *root_layer.masks_to_bounds.borrow_mut() = true;
 
         if let Some(ref frame_size) = frame_size {
-            let frame_size = frame_size.to_untyped();
-            root_layer.bounds.borrow_mut().size = Size2D::from_untyped(&frame_size);
+            root_layer.bounds.borrow_mut().size =
+                TypedSize2D::new(frame_size.width, frame_size.height);
         }
 
         root_layer
     }
 
     fn create_pipeline_details_for_frame_tree(&mut self, frame_tree: &SendableFrameTree) {
         self.pipeline_details(frame_tree.pipeline.id).pipeline = Some(frame_tree.pipeline.clone());
 
@@ -993,18 +990,19 @@ impl<Window: WindowMethods> IOCompositor
 
     fn update_layer_if_exists(&mut self,
                               pipeline_id: PipelineId,
                               properties: LayerProperties)
                               -> bool {
         if let Some(subpage_id) = properties.subpage_pipeline_id {
             match self.find_layer_with_pipeline_and_layer_id(subpage_id, LayerId::null()) {
                 Some(layer) => {
-                    *layer.bounds.borrow_mut() = Rect::from_untyped(
-                        &Rect::new(Point2D::zero(), properties.rect.size));
+                    *layer.bounds.borrow_mut() =
+                        TypedRect::new(TypedPoint2D::zero(),
+                                       TypedSize2D::from_untyped(&properties.rect.size));
                 }
                 None => warn!("Tried to update non-existent subpage root layer: {:?}", subpage_id),
             }
         }
 
         match self.find_layer_with_pipeline_and_layer_id(pipeline_id, properties.id) {
             Some(existing_layer) => {
                 // If this layer contains a subpage, then create the root layer for that subpage
@@ -1173,34 +1171,34 @@ impl<Window: WindowMethods> IOCompositor
         if let Err(e) = self.constellation_chan.send(msg) {
             warn!("Sending subpage resize to constellation failed ({}).", e);
         }
     }
 
     fn move_layer(&self,
                   pipeline_id: PipelineId,
                   layer_id: LayerId,
-                  origin: TypedPoint2D<LayerPixel, f32>)
+                  origin: TypedPoint2D<f32, LayerPixel>)
                   -> bool {
         match self.find_layer_with_pipeline_and_layer_id(pipeline_id, layer_id) {
             Some(ref layer) => {
                 if layer.wants_scroll_events() == WantsScrollEventsFlag::WantsScrollEvents {
-                    layer.clamp_scroll_offset_and_scroll_layer(Point2D::typed(0f32, 0f32) - origin);
+                    layer.clamp_scroll_offset_and_scroll_layer(TypedPoint2D::zero() - origin);
                 }
                 true
             }
             None => false,
         }
     }
 
     fn scroll_layer_to_fragment_point_if_necessary(&mut self,
                                                    pipeline_id: PipelineId,
                                                    layer_id: LayerId) {
         if let Some(point) = self.fragment_point.take() {
-            if !self.move_layer(pipeline_id, layer_id, Point2D::from_untyped(&point)) {
+            if !self.move_layer(pipeline_id, layer_id, TypedPoint2D::from_untyped(&point)) {
                 return warn!("Compositor: Tried to scroll to fragment with unknown layer.");
             }
 
             self.perform_updates_after_scroll();
         }
     }
 
     fn schedule_delayed_composite_if_necessary(&mut self) {
@@ -1246,34 +1244,34 @@ impl<Window: WindowMethods> IOCompositor
         self.cache_unused_buffers(new_layer_buffer_set.buffers);
     }
 
     fn assign_painted_buffers_to_layer(&mut self,
                                        layer: Rc<Layer<CompositorData>>,
                                        new_layer_buffer_set: Box<LayerBufferSet>,
                                        epoch: Epoch) {
         debug!("compositor received new frame at size {:?}x{:?}",
-               self.window_size.width.get(),
-               self.window_size.height.get());
+               self.window_size.width,
+               self.window_size.height);
 
         // From now on, if we destroy the buffers, they will leak.
         let mut new_layer_buffer_set = new_layer_buffer_set;
         new_layer_buffer_set.mark_will_leak();
 
         // FIXME(pcwalton): This is going to cause problems with inconsistent frames since
         // we only composite one layer at a time.
         layer.add_buffers(self, new_layer_buffer_set, epoch);
         self.composite_if_necessary_if_not_using_webrender(CompositingReason::NewPaintedBuffers);
     }
 
     fn scroll_fragment_to_point(&mut self,
                                 pipeline_id: PipelineId,
                                 layer_id: LayerId,
                                 point: Point2D<f32>) {
-        if self.move_layer(pipeline_id, layer_id, Point2D::from_untyped(&point)) {
+        if self.move_layer(pipeline_id, layer_id, TypedPoint2D::from_untyped(&point)) {
             self.perform_updates_after_scroll();
             self.send_viewport_rects_for_all_layers()
         } else {
             self.fragment_point = Some(point)
         }
     }
 
     fn handle_window_message(&mut self, event: WindowEvent) {
@@ -1364,17 +1362,17 @@ impl<Window: WindowMethods> IOCompositor
                 let msg = ConstellationMsg::Reload;
                 if let Err(e) = self.constellation_chan.send(msg) {
                     warn!("Sending reload to constellation failed ({}).", e);
                 }
             }
         }
     }
 
-    fn on_resize_window_event(&mut self, new_size: TypedSize2D<DevicePixel, u32>) {
+    fn on_resize_window_event(&mut self, new_size: TypedSize2D<u32, DevicePixel>) {
         debug!("compositor resizing to {:?}", new_size.to_untyped());
 
         // A size change could also mean a resolution change.
         let new_scale_factor = self.window.scale_factor();
         if self.scale_factor != new_scale_factor {
             self.scale_factor = new_scale_factor;
             self.update_zoom_transform();
         }
@@ -1452,17 +1450,17 @@ impl<Window: WindowMethods> IOCompositor
         }
 
         match self.find_topmost_layer_at_point(point / self.scene.scale) {
             Some(result) => result.layer.send_mouse_event(self, mouse_window_event, result.point),
             None => {},
         }
     }
 
-    fn on_mouse_window_move_event_class(&mut self, cursor: TypedPoint2D<DevicePixel, f32>) {
+    fn on_mouse_window_move_event_class(&mut self, cursor: TypedPoint2D<f32, DevicePixel>) {
         if opts::get().convert_mouse_to_touch {
             self.on_touch_move(TouchId(0), cursor);
             return
         }
 
         if self.webrender_api.is_some() {
             let root_pipeline_id = match self.get_root_pipeline_id() {
                 Some(root_pipeline_id) => root_pipeline_id,
@@ -1500,34 +1498,34 @@ impl<Window: WindowMethods> IOCompositor
 
                 self.last_mouse_move_recipient = Some(result.layer.pipeline_id());
                 result.layer.send_mouse_move_event(self, result.point);
             }
             None => {}
         }
     }
 
-    fn on_touch_down(&mut self, identifier: TouchId, point: TypedPoint2D<DevicePixel, f32>) {
+    fn on_touch_down(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) {
         self.touch_handler.on_touch_down(identifier, point);
         if let Some(result) = self.find_topmost_layer_at_point(point / self.scene.scale) {
             result.layer.send_event(self, TouchEvent(TouchEventType::Down, identifier,
                                                      result.point.to_untyped()));
         }
     }
 
-    fn on_touch_move(&mut self, identifier: TouchId, point: TypedPoint2D<DevicePixel, f32>) {
+    fn on_touch_move(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) {
         match self.touch_handler.on_touch_move(identifier, point) {
             TouchAction::Scroll(delta) => {
                 match point.cast() {
                     Some(point) => self.on_scroll_window_event(delta, point),
                     None => error!("Point cast failed."),
                 }
             }
             TouchAction::Zoom(magnification, scroll_delta) => {
-                let cursor = Point2D::typed(-1, -1);  // Make sure this hits the base layer.
+                let cursor = TypedPoint2D::new(-1, -1);  // Make sure this hits the base layer.
                 self.pending_scroll_zoom_events.push(ScrollZoomEvent {
                     magnification: magnification,
                     delta: scroll_delta,
                     cursor: cursor,
                     phase: ScrollEventPhase::Move(true),
                     event_count: 1,
                 });
                 self.composite_if_necessary_if_not_using_webrender(CompositingReason::Zoom);
@@ -1537,79 +1535,79 @@ impl<Window: WindowMethods> IOCompositor
                     result.layer.send_event(self, TouchEvent(TouchEventType::Move, identifier,
                                                              result.point.to_untyped()));
                 }
             }
             _ => {}
         }
     }
 
-    fn on_touch_up(&mut self, identifier: TouchId, point: TypedPoint2D<DevicePixel, f32>) {
+    fn on_touch_up(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) {
         if let Some(result) = self.find_topmost_layer_at_point(point / self.scene.scale) {
             result.layer.send_event(self, TouchEvent(TouchEventType::Up, identifier,
                                                      result.point.to_untyped()));
         }
         if let TouchAction::Click = self.touch_handler.on_touch_up(identifier, point) {
             self.simulate_mouse_click(point);
         }
     }
 
-    fn on_touch_cancel(&mut self, identifier: TouchId, point: TypedPoint2D<DevicePixel, f32>) {
+    fn on_touch_cancel(&mut self, identifier: TouchId, point: TypedPoint2D<f32, DevicePixel>) {
         // Send the event to script.
         self.touch_handler.on_touch_cancel(identifier, point);
         if let Some(result) = self.find_topmost_layer_at_point(point / self.scene.scale) {
             result.layer.send_event(self, TouchEvent(TouchEventType::Cancel, identifier,
                                                      result.point.to_untyped()));
         }
     }
 
     /// http://w3c.github.io/touch-events/#mouse-events
-    fn simulate_mouse_click(&self, p: TypedPoint2D<DevicePixel, f32>) {
+    fn simulate_mouse_click(&self, p: TypedPoint2D<f32, DevicePixel>) {
         match self.find_topmost_layer_at_point(p / self.scene.scale) {
             Some(HitTestResult { layer, point }) => {
                 let button = MouseButton::Left;
                 layer.send_mouse_move_event(self, point);
                 layer.send_mouse_event(self, MouseWindowEvent::MouseDown(button, p), point);
                 layer.send_mouse_event(self, MouseWindowEvent::MouseUp(button, p), point);
                 layer.send_mouse_event(self, MouseWindowEvent::Click(button, p), point);
             }
             None => {},
         }
     }
 
     fn on_scroll_window_event(&mut self,
-                              delta: TypedPoint2D<DevicePixel, f32>,
-                              cursor: TypedPoint2D<DevicePixel, i32>) {
+                              delta: TypedPoint2D<f32, DevicePixel>,
+                              cursor: TypedPoint2D<i32, DevicePixel>) {
         self.pending_scroll_zoom_events.push(ScrollZoomEvent {
             magnification: 1.0,
             delta: delta,
             cursor: cursor,
             phase: ScrollEventPhase::Move(self.scroll_in_progress),
             event_count: 1,
         });
         self.composite_if_necessary_if_not_using_webrender(CompositingReason::Scroll);
     }
 
     fn on_scroll_start_window_event(&mut self,
-                                    delta: TypedPoint2D<DevicePixel, f32>,
-                                    cursor: TypedPoint2D<DevicePixel, i32>) {
+                                    delta: TypedPoint2D<f32, DevicePixel>,
+                                    cursor: TypedPoint2D<i32, DevicePixel>) {
         self.scroll_in_progress = true;
         self.pending_scroll_zoom_events.push(ScrollZoomEvent {
             magnification: 1.0,
             delta: delta,
             cursor: cursor,
             phase: ScrollEventPhase::Start,
             event_count: 1,
         });
         self.composite_if_necessary_if_not_using_webrender(CompositingReason::Scroll);
     }
 
     fn on_scroll_end_window_event(&mut self,
-                                  delta: TypedPoint2D<DevicePixel, f32>,
-                                  cursor: TypedPoint2D<DevicePixel, i32>) {
+                                  delta: TypedPoint2D<f32, DevicePixel>,
+                                  cursor: TypedPoint2D<i32, DevicePixel>) {
         self.scroll_in_progress = false;
         self.pending_scroll_zoom_events.push(ScrollZoomEvent {
             magnification: 1.0,
             delta: delta,
             cursor: cursor,
             phase: ScrollEventPhase::End,
             event_count: 1,
         });
@@ -1705,27 +1703,29 @@ impl<Window: WindowMethods> IOCompositor
             self.send_viewport_rects_for_all_layers();
         }
     }
 
     /// Computes new display ports for each layer, taking the scroll position into account, and
     /// sends them to layout as necessary. This ultimately triggers a rerender of the content.
     fn send_updated_display_ports_to_layout(&mut self) {
         fn process_layer(layer: &Layer<CompositorData>,
-                         window_size: &TypedSize2D<LayerPixel, f32>,
+                         window_size: &TypedSize2D<f32, LayerPixel>,
                          new_display_ports: &mut HashMap<PipelineId, Vec<(LayerId, Rect<Au>)>>) {
             let visible_rect =
-                Rect::new(Point2D::zero(), *window_size).translate(&-*layer.content_offset.borrow())
-                                                        .intersection(&*layer.bounds.borrow())
-                                                        .unwrap_or(Rect::zero())
-                                                        .to_untyped();
-            let visible_rect = Rect::new(Point2D::new(Au::from_f32_px(visible_rect.origin.x),
-                                                      Au::from_f32_px(visible_rect.origin.y)),
-                                         Size2D::new(Au::from_f32_px(visible_rect.size.width),
-                                                     Au::from_f32_px(visible_rect.size.height)));
+                TypedRect::new(TypedPoint2D::zero(), *window_size)
+                    .translate(&-*layer.content_offset.borrow())
+                    .intersection(&*layer.bounds.borrow())
+                    .unwrap_or(TypedRect::zero())
+                    .to_untyped();
+            let visible_rect = TypedRect::new(
+                TypedPoint2D::new(Au::from_f32_px(visible_rect.origin.x),
+                                  Au::from_f32_px(visible_rect.origin.y)),
+                TypedSize2D::new(Au::from_f32_px(visible_rect.size.width),
+                                 Au::from_f32_px(visible_rect.size.height)));
 
             let extra_layer_data = layer.extra_data.borrow();
             if !new_display_ports.contains_key(&extra_layer_data.pipeline_id) {
                 new_display_ports.insert(extra_layer_data.pipeline_id, Vec::new());
             }
             if let Some(new_display_port) = new_display_ports.get_mut(&extra_layer_data.pipeline_id) {
                 new_display_port.push((extra_layer_data.id, visible_rect));
             }
@@ -1810,27 +1810,27 @@ impl<Window: WindowMethods> IOCompositor
 
             self.viewport_zoom = constraints.initial_zoom;
             self.min_viewport_zoom = constraints.min_zoom;
             self.max_viewport_zoom = constraints.max_zoom;
             self.update_zoom_transform();
         }
     }
 
-    fn device_pixels_per_screen_px(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32> {
+    fn device_pixels_per_screen_px(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
         match opts::get().device_pixels_per_px {
             Some(device_pixels_per_px) => ScaleFactor::new(device_pixels_per_px),
             None => match opts::get().output_file {
                 Some(_) => ScaleFactor::new(1.0),
                 None => self.scale_factor
             }
         }
     }
 
-    fn device_pixels_per_page_px(&self) -> ScaleFactor<PagePx, DevicePixel, f32> {
+    fn device_pixels_per_page_px(&self) -> ScaleFactor<f32, PagePx, DevicePixel> {
         self.viewport_zoom * self.page_zoom * self.device_pixels_per_screen_px()
     }
 
     fn update_zoom_transform(&mut self) {
         let scale = self.device_pixels_per_page_px();
         self.scene.scale = ScaleFactor::new(scale.get());
 
         // We need to set the size of the root layer again, since the window size
@@ -1850,18 +1850,18 @@ impl<Window: WindowMethods> IOCompositor
         self.update_zoom_transform();
         self.send_window_size(WindowSizeType::Resize);
     }
 
     /// Simulate a pinch zoom
     fn on_pinch_zoom_window_event(&mut self, magnification: f32) {
         self.pending_scroll_zoom_events.push(ScrollZoomEvent {
             magnification: magnification,
-            delta: Point2D::typed(0.0, 0.0), // TODO: Scroll to keep the center in view?
-            cursor:  Point2D::typed(-1, -1), // Make sure this hits the base layer.
+            delta: TypedPoint2D::zero(), // TODO: Scroll to keep the center in view?
+            cursor:  TypedPoint2D::new(-1, -1), // Make sure this hits the base layer.
             phase: ScrollEventPhase::Move(true),
             event_count: 1,
         });
         self.composite_if_necessary_if_not_using_webrender(CompositingReason::Zoom);
     }
 
     fn on_navigation_window_event(&self, direction: WindowNavigateMsg) {
         let direction = match direction {
@@ -1869,17 +1869,17 @@ impl<Window: WindowMethods> IOCompositor
             windowing::WindowNavigateMsg::Back => TraversalDirection::Back(1),
         };
         let msg = ConstellationMsg::TraverseHistory(None, direction);
         if let Err(e) = self.constellation_chan.send(msg) {
             warn!("Sending navigation to constellation failed ({}).", e);
         }
     }
 
-    fn on_touchpad_pressure_event(&self, cursor: TypedPoint2D<DevicePixel, f32>, pressure: f32,
+    fn on_touchpad_pressure_event(&self, cursor: TypedPoint2D<f32, DevicePixel>, pressure: f32,
                                   phase: TouchpadPressurePhase) {
         if let Some(true) = PREFS.get("dom.forcetouch.enabled").as_boolean() {
             match self.find_topmost_layer_at_point(cursor / self.scene.scale) {
                 Some(result) => result.layer.send_touchpad_pressure_event(self, result.point, pressure, phase),
                 None => {},
             }
         }
     }
@@ -2189,17 +2189,17 @@ impl<Window: WindowMethods> IOCompositor
     /// is WindowAndPng Ok(Some(png::Image)) is returned.
     fn composite_specific_target(&mut self,
                                  target: CompositeTarget)
                                  -> Result<Option<Image>, UnableToComposite> {
         if self.context.is_none() && self.webrender.is_none() {
             return Err(UnableToComposite::NoContext)
         }
         let (width, height) =
-            (self.window_size.width.get() as usize, self.window_size.height.get() as usize);
+            (self.window_size.width as usize, self.window_size.height as usize);
         if !self.window.prepare_for_composite(width, height) {
             return Err(UnableToComposite::WindowUnprepared)
         }
 
         if let Some(ref mut webrender) = self.webrender {
             assert!(self.context.is_none());
             webrender.update();
         }
@@ -2231,44 +2231,35 @@ impl<Window: WindowMethods> IOCompositor
             _ => initialize_png(width, height)
         };
 
         profile(ProfilerCategory::Compositing, None, self.time_profiler_chan.clone(), || {
             debug!("compositor: compositing");
             self.dump_layer_tree();
             // Adjust the layer dimensions as necessary to correspond to the size of the window.
             self.scene.viewport = match self.viewport {
-                Some((point, size)) => Rect {
-                    origin: point.as_f32(),
-                    size:   size.as_f32(),
-                },
-
-                None => Rect {
-                    origin: Point2D::zero(),
-                    size: self.window_size.as_f32(),
-                }
+                Some((point, size)) => TypedRect::new(point.as_f32(), size.as_f32()),
+                None => TypedRect::new(TypedPoint2D::zero(), self.window_size.as_f32()),
             };
 
             // Paint the scene.
             if let Some(ref mut webrender) = self.webrender {
                 assert!(self.context.is_none());
                 webrender.render(self.window_size.to_untyped());
             } else if let Some(ref layer) = self.scene.root {
                 match self.context {
                     Some(context) => {
                         if let Some((point, size)) = self.viewport {
-                            let point = point.to_untyped();
-                            let size  = size.to_untyped();
-
-                            gl::scissor(point.x as GLint, point.y as GLint,
-                                        size.width as GLsizei, size.height as GLsizei);
-
-                            gl::enable(gl::SCISSOR_TEST);
-                            rendergl::render_scene(layer.clone(), context, &self.scene);
-                            gl::disable(gl::SCISSOR_TEST);
+                            let point = point.to_untyped(); let size  = size.to_untyped();
+
+                            gl::scissor(point.x as GLint, point.y as GLint, size.width as GLsizei,
+                            size.height as GLsizei);
+
+                            gl::enable(gl::SCISSOR_TEST); rendergl::render_scene(layer.clone(),
+                            context, &self.scene); gl::disable(gl::SCISSOR_TEST);
 
                         } else {
                             rendergl::render_scene(layer.clone(), context, &self.scene);
                         }
                     }
 
                     None => {
                         debug!("compositor: not compositing because context not yet set up")
@@ -2384,18 +2375,18 @@ impl<Window: WindowMethods> IOCompositor
                                                              .expect("n_d should be Some when not using wr").clone(),
                                                              show_debug_borders,
                                                              opts::get().output_file.is_some()))
         }
     }
 
     fn find_topmost_layer_at_point_for_layer(&self,
                                              layer: Rc<Layer<CompositorData>>,
-                                             point_in_parent_layer: TypedPoint2D<LayerPixel, f32>,
-                                             clip_rect_in_parent_layer: &TypedRect<LayerPixel, f32>)
+                                             point_in_parent_layer: TypedPoint2D<f32, LayerPixel>,
+                                             clip_rect_in_parent_layer: &TypedRect<f32, LayerPixel>)
                                              -> Option<HitTestResult> {
         let layer_bounds = *layer.bounds.borrow();
         let masks_to_bounds = *layer.masks_to_bounds.borrow();
         if layer_bounds.is_empty() && masks_to_bounds {
             return None;
         }
         let scroll_offset = layer.extra_data.borrow().scroll_offset;
 
@@ -2434,17 +2425,17 @@ impl<Window: WindowMethods> IOCompositor
         if !clipped_layer_bounds.contains(&point_in_parent_layer) {
             return None;
         }
 
         Some(HitTestResult { layer: layer, point: point_in_parent_layer })
     }
 
     fn find_topmost_layer_at_point(&self,
-                                   point: TypedPoint2D<LayerPixel, f32>)
+                                   point: TypedPoint2D<f32, LayerPixel>)
                                    -> Option<HitTestResult> {
         match self.scene.root {
             Some(ref layer) => {
                 self.find_topmost_layer_at_point_for_layer(layer.clone(),
                                                            point,
                                                            &*layer.bounds.borrow())
             }
 
--- a/servo/components/compositing/compositor_layer.rs
+++ b/servo/components/compositing/compositor_layer.rs
@@ -1,17 +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 azure::azure_hl;
 use compositor::IOCompositor;
-use euclid::length::Length;
-use euclid::point::{Point2D, TypedPoint2D};
-use euclid::rect::Rect;
+use euclid::point::TypedPoint2D;
+use euclid::rect::TypedRect;
 use euclid::size::TypedSize2D;
 use gfx_traits::{Epoch, LayerId, LayerProperties, ScrollPolicy};
 use layers::color::Color;
 use layers::geometry::LayerPixel;
 use layers::layers::{Layer, LayerBufferSet};
 use msg::constellation_msg::PipelineId;
 use script_traits::CompositorEvent;
 use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent, TouchpadPressureEvent};
@@ -39,17 +38,17 @@ pub struct CompositorData {
     /// The epoch that has been requested for this layer (via send_buffer_requests).
     pub requested_epoch: Epoch,
 
     /// The last accepted painted buffer for this layer (via assign_pained_buffers).
     pub painted_epoch: Epoch,
 
     /// The scroll offset originating from this scrolling root. This allows scrolling roots
     /// to track their current scroll position even while their content_offset does not change.
-    pub scroll_offset: TypedPoint2D<LayerPixel, f32>,
+    pub scroll_offset: TypedPoint2D<f32, LayerPixel>,
 
     /// The pipeline ID of this layer, if it represents a subpage.
     pub subpage_info: Option<PipelineId>,
 }
 
 impl CompositorData {
     pub fn new_layer(pipeline_id: PipelineId,
                      layer_properties: LayerProperties,
@@ -58,21 +57,21 @@ impl CompositorData {
                      -> Rc<Layer<CompositorData>> {
         let new_compositor_data = CompositorData {
             pipeline_id: pipeline_id,
             id: layer_properties.id,
             wants_scroll_events: wants_scroll_events,
             scroll_policy: layer_properties.scroll_policy,
             requested_epoch: Epoch(0),
             painted_epoch: Epoch(0),
-            scroll_offset: Point2D::typed(0., 0.),
+            scroll_offset: TypedPoint2D::zero(),
             subpage_info: layer_properties.subpage_pipeline_id,
         };
 
-        Rc::new(Layer::new(Rect::from_untyped(&layer_properties.rect),
+        Rc::new(Layer::new(TypedRect::from_untyped(&layer_properties.rect),
                            tile_size,
                            to_layers_color(&layer_properties.background_color),
                            1.0,
                            layer_properties.establishes_3d_context,
                            new_compositor_data))
     }
 }
 
@@ -112,52 +111,52 @@ pub trait CompositorLayer {
     fn forget_all_tiles(&self);
 
     /// Move the layer's descendants that don't want scroll events and scroll by a relative
     /// specified amount in page coordinates. This also takes in a cursor position to see if the
     /// mouse is over child layers first. If a layer successfully scrolled returns either
     /// ScrollPositionUnchanged or ScrollPositionChanged. If no layer was targeted by the event
     /// returns ScrollEventUnhandled.
     fn handle_scroll_event(&self,
-                           delta: TypedPoint2D<LayerPixel, f32>,
-                           cursor: TypedPoint2D<LayerPixel, f32>)
+                           delta: TypedPoint2D<f32, LayerPixel>,
+                           cursor: TypedPoint2D<f32, LayerPixel>)
                            -> ScrollEventResult;
 
     // Takes in a MouseWindowEvent, determines if it should be passed to children, and
     // sends the event off to the appropriate pipeline. NB: the cursor position is in
     // client coordinates.
     fn send_mouse_event<Window>(&self,
                                 compositor: &IOCompositor<Window>,
                                 event: MouseWindowEvent,
-                                cursor: TypedPoint2D<LayerPixel, f32>)
+                                cursor: TypedPoint2D<f32, LayerPixel>)
                                 where Window: WindowMethods;
 
     fn send_mouse_move_event<Window>(&self,
                                      compositor: &IOCompositor<Window>,
-                                     cursor: TypedPoint2D<LayerPixel, f32>)
+                                     cursor: TypedPoint2D<f32, LayerPixel>)
                                      where Window: WindowMethods;
 
     fn send_event<Window>(&self,
                           compositor: &IOCompositor<Window>,
                           event: CompositorEvent)
                           where Window: WindowMethods;
 
     fn send_touchpad_pressure_event<Window>(&self,
                                             compositor: &IOCompositor<Window>,
-                                            cursor: TypedPoint2D<LayerPixel, f32>,
+                                            cursor: TypedPoint2D<f32, LayerPixel>,
                                             pressure: f32,
                                             phase: TouchpadPressurePhase)
                                             where Window: WindowMethods;
 
     fn clamp_scroll_offset_and_scroll_layer(&self,
-                                            new_offset: TypedPoint2D<LayerPixel, f32>)
+                                            new_offset: TypedPoint2D<f32, LayerPixel>)
                                             -> ScrollEventResult;
 
     fn scroll_layer_and_all_child_layers(&self,
-                                         new_offset: TypedPoint2D<LayerPixel, f32>)
+                                         new_offset: TypedPoint2D<f32, LayerPixel>)
                                          -> bool;
 
     /// Return a flag describing how this layer deals with scroll events.
     fn wants_scroll_events(&self) -> WantsScrollEventsFlag;
 
     /// Return the pipeline id associated with this layer.
     fn pipeline_id(&self) -> PipelineId;
 }
@@ -197,18 +196,18 @@ impl Clampable for f32 {
             _ if !(*self <= *mx) => *mx,
             _ if !(*self >= *mn) => *mn,
             _                    => *self,
         }
     }
 }
 
 fn calculate_content_size_for_layer(layer: &Layer<CompositorData>)
-                                    -> TypedSize2D<LayerPixel, f32> {
-    layer.children().iter().fold(Rect::zero(),
+                                    -> TypedSize2D<f32, LayerPixel> {
+    layer.children().iter().fold(TypedRect::zero(),
                                  |unioned_rect, child_rect| {
                                     unioned_rect.union(&*child_rect.bounds.borrow())
                                  }).size
 }
 
 #[derive(PartialEq)]
 pub enum ScrollEventResult {
     ScrollEventUnhandled,
@@ -224,21 +223,21 @@ impl CompositorLayer for Layer<Composito
         *self.perspective.borrow_mut() = layer_properties.perspective;
 
         *self.background_color.borrow_mut() = to_layers_color(&layer_properties.background_color);
 
         self.contents_changed();
     }
 
     fn update_layer(&self, layer_properties: LayerProperties) {
-        *self.bounds.borrow_mut() = Rect::from_untyped(&layer_properties.rect);
+        *self.bounds.borrow_mut() = TypedRect::from_untyped(&layer_properties.rect);
 
         // Call scroll for bounds checking if the page shrunk. Use (-1, -1) as the
         // cursor position to make sure the scroll isn't propagated downwards.
-        self.handle_scroll_event(Point2D::typed(0f32, 0f32), Point2D::typed(-1f32, -1f32));
+        self.handle_scroll_event(TypedPoint2D::zero(), TypedPoint2D::new(-1f32, -1f32));
         self.update_layer_except_bounds(layer_properties);
     }
 
     // Add LayerBuffers to the specified layer. Returns the layer buffer set back if the layer that
     // matches the given pipeline ID was not found; otherwise returns None and consumes the layer
     // buffer set.
     //
     // If the epoch of the message does not match the layer's epoch, the message is ignored, the
@@ -315,18 +314,18 @@ impl CompositorLayer for Layer<Composito
         }
 
         for kid in &*self.children() {
             kid.forget_all_tiles();
         }
     }
 
     fn handle_scroll_event(&self,
-                           delta: TypedPoint2D<LayerPixel, f32>,
-                           cursor: TypedPoint2D<LayerPixel, f32>)
+                           delta: TypedPoint2D<f32, LayerPixel>,
+                           cursor: TypedPoint2D<f32, LayerPixel>)
                            -> ScrollEventResult {
         // Allow children to scroll.
         let scroll_offset = self.extra_data.borrow().scroll_offset;
         let new_cursor = cursor - scroll_offset;
         for child in self.children().iter().rev() {
             let child_bounds = child.bounds.borrow();
             if child_bounds.contains(&new_cursor) {
                 let result = child.handle_scroll_event(delta, new_cursor - child_bounds.origin);
@@ -339,25 +338,25 @@ impl CompositorLayer for Layer<Composito
         // If this layer doesn't want scroll events, it can't handle scroll events.
         if self.wants_scroll_events() != WantsScrollEventsFlag::WantsScrollEvents {
             return ScrollEventResult::ScrollEventUnhandled;
         }
 
         self.clamp_scroll_offset_and_scroll_layer(scroll_offset + delta)
     }
 
-    fn clamp_scroll_offset_and_scroll_layer(&self, new_offset: TypedPoint2D<LayerPixel, f32>)
+    fn clamp_scroll_offset_and_scroll_layer(&self, new_offset: TypedPoint2D<f32, LayerPixel>)
                                             -> ScrollEventResult {
         let layer_size = self.bounds.borrow().size;
         let content_size = calculate_content_size_for_layer(self);
-        let min_x = (layer_size.width - content_size.width).get().min(0.0);
-        let min_y = (layer_size.height - content_size.height).get().min(0.0);
-        let new_offset: TypedPoint2D<LayerPixel, f32> =
-            Point2D::new(Length::new(new_offset.x.get().clamp(&min_x, &0.0)),
-                         Length::new(new_offset.y.get().clamp(&min_y, &0.0)));
+        let min_x = (layer_size.width - content_size.width).min(0.0);
+        let min_y = (layer_size.height - content_size.height).min(0.0);
+        let new_offset: TypedPoint2D<f32, LayerPixel> =
+            TypedPoint2D::new(new_offset.x.clamp(&min_x, &0.0),
+                              new_offset.y.clamp(&min_y, &0.0));
 
         if self.extra_data.borrow().scroll_offset == new_offset {
             return ScrollEventResult::ScrollPositionUnchanged;
         }
 
         // The scroll offset is just a record of the scroll position of this scrolling root,
         // but scroll_layer_and_all_child_layers actually moves the child layers.
         self.extra_data.borrow_mut().scroll_offset = new_offset;
@@ -372,66 +371,66 @@ impl CompositorLayer for Layer<Composito
         } else {
             ScrollEventResult::ScrollPositionUnchanged
         }
     }
 
     fn send_mouse_event<Window>(&self,
                                 compositor: &IOCompositor<Window>,
                                 event: MouseWindowEvent,
-                                cursor: TypedPoint2D<LayerPixel, f32>)
+                                cursor: TypedPoint2D<f32, LayerPixel>)
                                 where Window: WindowMethods {
         let event_point = cursor.to_untyped();
         let message = match event {
             MouseWindowEvent::Click(button, _) =>
                 MouseButtonEvent(MouseEventType::Click, button, event_point),
             MouseWindowEvent::MouseDown(button, _) =>
                 MouseButtonEvent(MouseEventType::MouseDown, button, event_point),
             MouseWindowEvent::MouseUp(button, _) =>
                 MouseButtonEvent(MouseEventType::MouseUp, button, event_point),
         };
         self.send_event(compositor, message);
     }
 
     fn send_mouse_move_event<Window>(&self,
                                      compositor: &IOCompositor<Window>,
-                                     cursor: TypedPoint2D<LayerPixel, f32>)
+                                     cursor: TypedPoint2D<f32, LayerPixel>)
                                      where Window: WindowMethods {
         self.send_event(compositor, MouseMoveEvent(Some(cursor.to_untyped())));
     }
 
     fn send_event<Window>(&self,
                           compositor: &IOCompositor<Window>,
                           event: CompositorEvent) where Window: WindowMethods {
         if let Some(pipeline) = compositor.pipeline(self.pipeline_id()) {
             let _ = pipeline.script_chan
                     .send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), event));
         }
     }
 
     fn send_touchpad_pressure_event<Window>(&self,
                                             compositor: &IOCompositor<Window>,
-                                            cursor: TypedPoint2D<LayerPixel, f32>,
+                                            cursor: TypedPoint2D<f32, LayerPixel>,
                                             pressure: f32,
                                             phase: TouchpadPressurePhase)
                                             where Window: WindowMethods {
         if let Some(pipeline) = compositor.pipeline(self.pipeline_id()) {
             let message = TouchpadPressureEvent(cursor.to_untyped(), pressure, phase);
             let _ = pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message));
         }
     }
 
-    fn scroll_layer_and_all_child_layers(&self, new_offset: TypedPoint2D<LayerPixel, f32>)
+    fn scroll_layer_and_all_child_layers(&self, new_offset: TypedPoint2D<f32, LayerPixel>)
                                          -> bool {
         let mut result = false;
 
         // Only scroll this layer if it's not fixed-positioned.
         if self.extra_data.borrow().scroll_policy != ScrollPolicy::FixedPosition {
             let new_offset = new_offset.to_untyped();
-            *self.content_offset.borrow_mut() = Point2D::from_untyped(&new_offset);
+            *self.content_offset.borrow_mut() = TypedPoint2D::from_untyped(&new_offset);
             result = true
         }
 
         let offset_for_children = new_offset + self.extra_data.borrow().scroll_offset;
         for child in &*self.children() {
             result |= child.scroll_layer_and_all_child_layers(offset_for_children);
         }
 
--- a/servo/components/compositing/lib.rs
+++ b/servo/components/compositing/lib.rs
@@ -50,17 +50,17 @@ mod compositor_layer;
 pub mod compositor_thread;
 mod delayed_composition;
 mod surface_map;
 mod touch;
 pub mod windowing;
 
 pub struct SendableFrameTree {
     pub pipeline: CompositionPipeline,
-    pub size: Option<TypedSize2D<PagePx, f32>>,
+    pub size: Option<TypedSize2D<f32, PagePx>>,
     pub children: Vec<SendableFrameTree>,
 }
 
 /// The subset of the pipeline that is needed for layer composition.
 #[derive(Clone)]
 pub struct CompositionPipeline {
     pub id: PipelineId,
     pub script_chan: IpcSender<ConstellationControlMsg>,
--- a/servo/components/compositing/touch.rs
+++ b/servo/components/compositing/touch.rs
@@ -14,21 +14,21 @@ const TOUCH_PAN_MIN_SCREEN_PX: f32 = 20.
 pub struct TouchHandler {
     pub state: TouchState,
     pub active_touch_points: Vec<TouchPoint>,
 }
 
 #[derive(Clone, Copy, Debug)]
 pub struct TouchPoint {
     pub id: TouchId,
-    pub point: TypedPoint2D<DevicePixel, f32>
+    pub point: TypedPoint2D<f32, DevicePixel>
 }
 
 impl TouchPoint {
-    pub fn new(id: TouchId, point: TypedPoint2D<DevicePixel, f32>) -> Self {
+    pub fn new(id: TouchId, point: TypedPoint2D<f32, DevicePixel>) -> Self {
         TouchPoint { id: id, point: point }
     }
 }
 
 /// The states of the touch input state machine.
 ///
 /// TODO: Add support for "flinging" (scrolling inertia)
 #[derive(Clone, Copy, Debug, Eq, PartialEq)]
@@ -52,64 +52,64 @@ pub enum TouchState {
 }
 
 /// The action to take in response to a touch event
 #[derive(Clone, Copy, Debug)]
 pub enum TouchAction {
     /// Simulate a mouse click.
     Click,
     /// Scroll by the provided offset.
-    Scroll(TypedPoint2D<DevicePixel, f32>),
+    Scroll(TypedPoint2D<f32, DevicePixel>),
     /// Zoom by a magnification factor and scroll by the provided offset.
-    Zoom(f32, TypedPoint2D<DevicePixel, f32>),
+    Zoom(f32, TypedPoint2D<f32, DevicePixel>),
     /// Send a JavaScript event to content.
     DispatchEvent,
     /// Don't do anything.
     NoAction,
 }
 
 impl TouchHandler {
     pub fn new() -> Self {
         TouchHandler {
             state: Nothing,
             active_touch_points: Vec::new(),
         }
     }
 
-    pub fn on_touch_down(&mut self, id: TouchId, point: TypedPoint2D<DevicePixel, f32>) {
+    pub fn on_touch_down(&mut self, id: TouchId, point: TypedPoint2D<f32, DevicePixel>) {
         let point = TouchPoint::new(id, point);
         self.active_touch_points.push(point);
 
         self.state = match self.state {
             Nothing               => WaitingForScript,
             Touching | Panning    => Pinching,
             WaitingForScript      => WaitingForScript,
             DefaultPrevented      => DefaultPrevented,
             Pinching | MultiTouch => MultiTouch,
         };
     }
 
-    pub fn on_touch_move(&mut self, id: TouchId, point: TypedPoint2D<DevicePixel, f32>)
+    pub fn on_touch_move(&mut self, id: TouchId, point: TypedPoint2D<f32, DevicePixel>)
                          -> TouchAction {
         let idx = match self.active_touch_points.iter_mut().position(|t| t.id == id) {
             Some(i) => i,
             None => {
                 warn!("Got a touchmove event for a non-active touch point");
                 return TouchAction::NoAction;
             }
         };
         let old_point = self.active_touch_points[idx].point;
 
         let action = match self.state {
             Touching => {
                 let delta = point - old_point;
-                // TODO let delta: TypedPoint2D<ScreenPx, _> = delta / self.device_pixels_per_screen_px();
+                // TODO let delta: TypedPoint2D<_, ScreenPx> = delta / self.device_pixels_per_screen_px();
 
-                if delta.x.get().abs() > TOUCH_PAN_MIN_SCREEN_PX ||
-                   delta.y.get().abs() > TOUCH_PAN_MIN_SCREEN_PX
+                if delta.x.abs() > TOUCH_PAN_MIN_SCREEN_PX ||
+                   delta.y.abs() > TOUCH_PAN_MIN_SCREEN_PX
                 {
                     self.state = Panning;
                     TouchAction::Scroll(delta)
                 } else {
                     TouchAction::NoAction
                 }
             }
             Panning => {
@@ -137,17 +137,17 @@ impl TouchHandler {
         // If we're still waiting to see whether this is a click or pan, remember the original
         // location.  Otherwise, update the touch point with the latest location.
         if self.state != Touching && self.state != WaitingForScript {
             self.active_touch_points[idx].point = point;
         }
         action
     }
 
-    pub fn on_touch_up(&mut self, id: TouchId, _point: TypedPoint2D<DevicePixel, f32>)
+    pub fn on_touch_up(&mut self, id: TouchId, _point: TypedPoint2D<f32, DevicePixel>)
                        -> TouchAction {
         match self.active_touch_points.iter().position(|t| t.id == id) {
             Some(i) => {
                 self.active_touch_points.swap_remove(i);
             }
             None => {
                 warn!("Got a touch up event for a non-active touch point");
             }
@@ -171,17 +171,17 @@ impl TouchHandler {
                 if self.active_touch_points.is_empty() {
                     self.state = Nothing;
                 }
                 TouchAction::NoAction
             }
         }
     }
 
-    pub fn on_touch_cancel(&mut self, id: TouchId, _point: TypedPoint2D<DevicePixel, f32>) {
+    pub fn on_touch_cancel(&mut self, id: TouchId, _point: TypedPoint2D<f32, DevicePixel>) {
         match self.active_touch_points.iter().position(|t| t.id == id) {
             Some(i) => {
                 self.active_touch_points.swap_remove(i);
             }
             None => {
                 warn!("Got a touchcancel event for a non-active touch point");
                 return;
             }
@@ -214,22 +214,20 @@ impl TouchHandler {
             }
         }
     }
 
     fn touch_count(&self) -> usize {
         self.active_touch_points.len()
     }
 
-    fn pinch_distance_and_center(&self) -> (f32, TypedPoint2D<DevicePixel, f32>) {
+    fn pinch_distance_and_center(&self) -> (f32, TypedPoint2D<f32, DevicePixel>) {
         debug_assert!(self.touch_count() == 2);
         let p0 = self.active_touch_points[0].point;
         let p1 = self.active_touch_points[1].point;
         let center = (p0 + p1) / ScaleFactor::new(2.0);
 
         let d = p0 - p1;
-        let dx = d.x.get();
-        let dy = d.y.get();
-        let distance = f32::sqrt(dx * dx + dy * dy);
+        let distance = f32::sqrt(d.x * d.x + d.y * d.y);
 
         (distance, center)
     }
 }
--- a/servo/components/compositing/windowing.rs
+++ b/servo/components/compositing/windowing.rs
@@ -16,19 +16,19 @@ use net_traits::net_error_list::NetError
 use script_traits::{MouseButton, TouchpadPressurePhase, TouchEventType, TouchId};
 use std::fmt::{Debug, Error, Formatter};
 use style_traits::cursor::Cursor;
 use url::Url;
 use util::geometry::ScreenPx;
 
 #[derive(Clone)]
 pub enum MouseWindowEvent {
-    Click(MouseButton, TypedPoint2D<DevicePixel, f32>),
-    MouseDown(MouseButton, TypedPoint2D<DevicePixel, f32>),
-    MouseUp(MouseButton, TypedPoint2D<DevicePixel, f32>),
+    Click(MouseButton, TypedPoint2D<f32, DevicePixel>),
+    MouseDown(MouseButton, TypedPoint2D<f32, DevicePixel>),
+    MouseUp(MouseButton, TypedPoint2D<f32, DevicePixel>),
 }
 
 #[derive(Clone)]
 pub enum WindowNavigateMsg {
     Forward,
     Back,
 }
 
@@ -44,32 +44,32 @@ pub enum WindowEvent {
     Idle,
     /// Sent when part of the window is marked dirty and needs to be redrawn. Before sending this
     /// message, the window must make the same GL context as in `PrepareRenderingEvent` current.
     Refresh,
     /// Sent to initialize the GL context. The windowing system must have a valid, current GL
     /// context when this message is sent.
     InitializeCompositing,
     /// Sent when the window is resized.
-    Resize(TypedSize2D<DevicePixel, u32>),
+    Resize(TypedSize2D<u32, DevicePixel>),
     /// Touchpad Pressure
-    TouchpadPressure(TypedPoint2D<DevicePixel, f32>, f32, TouchpadPressurePhase),
+    TouchpadPressure(TypedPoint2D<f32, DevicePixel>, f32, TouchpadPressurePhase),
     /// Sent when you want to override the viewport.
-    Viewport(TypedPoint2D<DevicePixel, u32>, TypedSize2D<DevicePixel, u32>),
+    Viewport(TypedPoint2D<u32, DevicePixel>, TypedSize2D<u32, DevicePixel>),
     /// Sent when a new URL is to be loaded.
     LoadUrl(String),
     /// Sent when a mouse hit test is to be performed.
     MouseWindowEventClass(MouseWindowEvent),
     /// Sent when a mouse move.
-    MouseWindowMoveEventClass(TypedPoint2D<DevicePixel, f32>),
+    MouseWindowMoveEventClass(TypedPoint2D<f32, DevicePixel>),
     /// Touch event: type, identifier, point
-    Touch(TouchEventType, TouchId, TypedPoint2D<DevicePixel, f32>),
+    Touch(TouchEventType, TouchId, TypedPoint2D<f32, DevicePixel>),
     /// Sent when the user scrolls. The first point is the delta and the second point is the
     /// origin.
-    Scroll(TypedPoint2D<DevicePixel, f32>, TypedPoint2D<DevicePixel, i32>, TouchEventType),
+    Scroll(TypedPoint2D<f32, DevicePixel>, TypedPoint2D<i32, DevicePixel>, TouchEventType),
     /// Sent when the user zooms.
     Zoom(f32),
     /// Simulated "pinch zoom" gesture for non-touch platforms (e.g. ctrl-scrollwheel).
     PinchZoom(f32),
     /// Sent when the user resets zoom to default.
     ResetZoom,
     /// Sent when the user uses chrome navigation (i.e. backspace or shift-backspace).
     Navigation(WindowNavigateMsg),
@@ -103,19 +103,19 @@ impl Debug for WindowEvent {
             WindowEvent::Quit => write!(f, "Quit"),
             WindowEvent::Reload => write!(f, "Reload"),
         }
     }
 }
 
 pub trait WindowMethods {
     /// Returns the size of the window in hardware pixels.
-    fn framebuffer_size(&self) -> TypedSize2D<DevicePixel, u32>;
+    fn framebuffer_size(&self) -> TypedSize2D<u32, DevicePixel>;
     /// Returns the size of the window in density-independent "px" units.
-    fn size(&self) -> TypedSize2D<ScreenPx, f32>;
+    fn size(&self) -> TypedSize2D<f32, ScreenPx>;
     /// Presents the window to the screen (perhaps by page flipping).
     fn present(&self);
 
     /// Return the size of the window with head and borders and position of the window values
     fn client_window(&self) -> (Size2D<u32>, Point2D<i32>);
     /// Set the size inside of borders and head
     fn set_inner_size(&self, size: Size2D<u32>);
     /// Set the window position
@@ -132,17 +132,17 @@ pub trait WindowMethods {
     /// Called when the browser is done loading a frame.
     fn load_end(&self, back: bool, forward: bool, root: bool);
     /// Called when the browser encounters an error while loading a URL
     fn load_error(&self, code: NetError, url: String);
     /// Called when the <head> tag has finished parsing
     fn head_parsed(&self);
 
     /// Returns the scale factor of the system (device pixels / screen pixels).
-    fn scale_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32>;
+    fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel>;
 
     /// Gets the OS native graphics display for this window.
     fn native_display(&self) -> NativeDisplay;
 
     /// Creates a channel to the compositor. The dummy parameter is needed because we don't have
     /// UFCS in Rust yet.
     ///
     /// This is part of the windowing system because its implementation often involves OS-specific
--- a/servo/components/constellation/Cargo.toml
+++ b/servo/components/constellation/Cargo.toml
@@ -10,26 +10,26 @@ name = "constellation"
 path = "lib.rs"
 
 [dependencies]
 backtrace = "0.2.1"
 canvas = {path = "../canvas"}
 canvas_traits = {path = "../canvas_traits"}
 compositing = {path = "../compositing"}
 devtools_traits = {path = "../devtools_traits"}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx = {path = "../gfx"}
 gfx_traits = {path = "../gfx_traits"}
 ipc-channel = "0.4.0"
 layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
 layout_traits = {path = "../layout_traits"}
 log = "0.3.5"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
-offscreen_gl_context = "0.1.2"
+offscreen_gl_context = "0.2.0"
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 rand = "0.3"
 script_traits = {path = "../script_traits"}
 serde = "0.7.15"
 serde_macros = "0.7.15"
 style_traits = {path = "../style_traits"}
 url = {version = "1.0.0", features = ["heap_size"]}
--- a/servo/components/constellation/constellation.rs
+++ b/servo/components/constellation/constellation.rs
@@ -530,17 +530,17 @@ impl<Message, LTF, STF> Constellation<Me
         *i += 1;
         namespace_id
     }
 
     /// Helper function for creating a pipeline
     fn new_pipeline(&mut self,
                     pipeline_id: PipelineId,
                     parent_info: Option<(PipelineId, SubpageId, FrameType)>,
-                    initial_window_size: Option<TypedSize2D<PagePx, f32>>,
+                    initial_window_size: Option<TypedSize2D<f32, PagePx>>,
                     script_channel: Option<IpcSender<ConstellationControlMsg>>,
                     load_data: LoadData,
                     is_private: bool) {
         if self.shutting_down { return; }
 
         let resource_threads = if is_private {
             self.private_resource_threads.clone()
         } else {
@@ -729,17 +729,17 @@ impl<Message, LTF, STF> Constellation<Me
             FromCompositorMsg::Exit => {
                 debug!("constellation exiting");
                 self.handle_exit();
             }
             // The compositor discovered the size of a subframe. This needs to be reflected by all
             // frame trees in the navigation context containing the subframe.
             FromCompositorMsg::FrameSize(pipeline_id, size) => {
                 debug!("constellation got frame size message");
-                self.handle_frame_size_msg(pipeline_id, &Size2D::from_untyped(&size));
+                self.handle_frame_size_msg(pipeline_id, &TypedSize2D::from_untyped(&size));
             }
             FromCompositorMsg::GetFrame(pipeline_id, resp_chan) => {
                 debug!("constellation got get root pipeline message");
                 self.handle_get_frame(pipeline_id, resp_chan);
             }
             FromCompositorMsg::GetPipeline(frame_id, resp_chan) => {
                 debug!("constellation got get root pipeline message");
                 self.handle_get_pipeline(frame_id, resp_chan);
@@ -1155,17 +1155,17 @@ impl<Message, LTF, STF> Constellation<Me
                           LoadData::new(url.clone(), None, None), false);
         self.handle_load_start_msg(root_pipeline_id);
         self.push_pending_frame(root_pipeline_id, None);
         self.compositor_proxy.send(ToCompositorMsg::ChangePageUrl(root_pipeline_id, url));
     }
 
     fn handle_frame_size_msg(&mut self,
                              pipeline_id: PipelineId,
-                             size: &TypedSize2D<PagePx, f32>) {
+                             size: &TypedSize2D<f32, PagePx>) {
         let msg = ConstellationControlMsg::Resize(pipeline_id, WindowSizeData {
             visible_viewport: *size,
             initial_viewport: *size * ScaleFactor::new(1.0),
             device_pixel_ratio: self.window_size.device_pixel_ratio,
         }, WindowSizeType::Initial);
 
         // Store the new rect inside the pipeline
         let result = {
@@ -2134,17 +2134,17 @@ impl<Message, LTF, STF> Constellation<Me
             // Check the visible rectangle for this pipeline. If the constellation has received a
             // size for the pipeline, then its painting should be up to date. If the constellation
             // *hasn't* received a size, it could be that the layer was hidden by script before the
             // compositor discovered it, so we just don't check the layer.
             if let Some(size) = pipeline.size {
                 // If the rectangle for this pipeline is zero sized, it will
                 // never be painted. In this case, don't query the layout
                 // thread as it won't contribute to the final output image.
-                if size == Size2D::zero() {
+                if size == TypedSize2D::zero() {
                     continue;
                 }
 
                 // Get the epoch that the compositor has drawn for this pipeline.
                 let compositor_epoch = pipeline_states.get(&frame.current.0);
                 match compositor_epoch {
                     Some(compositor_epoch) => {
                         // Synchronously query the layout thread to see if the current
--- a/servo/components/constellation/pipeline.rs
+++ b/servo/components/constellation/pipeline.rs
@@ -57,17 +57,17 @@ pub struct Pipeline {
     pub layout_chan: IpcSender<LayoutControlMsg>,
     /// A channel to the compositor.
     pub compositor_proxy: Box<CompositorProxy + 'static + Send>,
     pub chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
     /// URL corresponding to the most recently-loaded page.
     pub url: Url,
     /// The title of the most recently-loaded page.
     pub title: Option<String>,
-    pub size: Option<TypedSize2D<PagePx, f32>>,
+    pub size: Option<TypedSize2D<f32, PagePx>>,
     /// Whether this pipeline is currently running animations. Pipelines that are running
     /// animations cause composites to be continually scheduled.
     pub running_animations: bool,
     pub children: Vec<FrameId>,
     /// Whether this pipeline is considered distinct from public pipelines.
     pub is_private: bool,
     /// Whether this pipeline should be treated as visible for the purposes of scheduling and
     /// resource management.
@@ -107,19 +107,19 @@ pub struct InitialPipelineState {
     pub font_cache_thread: FontCacheThread,
     /// Channels to the resource-related threads.
     pub resource_threads: ResourceThreads,
     /// A channel to the time profiler thread.
     pub time_profiler_chan: time::ProfilerChan,
     /// A channel to the memory profiler thread.
     pub mem_profiler_chan: profile_mem::ProfilerChan,
     /// Information about the initial window size.
-    pub window_size: Option<TypedSize2D<PagePx, f32>>,
+    pub window_size: Option<TypedSize2D<f32, PagePx>>,
     /// Information about the device pixel ratio.
-    pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
+    pub device_pixel_ratio: ScaleFactor<f32, ViewportPx, DevicePixel>,
     /// A channel to the script thread, if applicable. If this is `Some`,
     /// then `parent_info` must also be `Some`.
     pub script_chan: Option<IpcSender<ConstellationControlMsg>>,
     /// Information about the page to load.
     pub load_data: LoadData,
     /// The ID of the pipeline namespace for this script thread.
     pub pipeline_namespace_id: PipelineNamespaceId,
     /// Pipeline visibility is inherited from parent
@@ -275,17 +275,17 @@ impl Pipeline {
     fn new(id: PipelineId,
            parent_info: Option<(PipelineId, SubpageId, FrameType)>,
            script_chan: IpcSender<ConstellationControlMsg>,
            layout_chan: IpcSender<LayoutControlMsg>,
            compositor_proxy: Box<CompositorProxy + 'static + Send>,
            chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
            is_private: bool,
            url: Url,
-           size: Option<TypedSize2D<PagePx, f32>>,
+           size: Option<TypedSize2D<f32, PagePx>>,
            visible: bool)
            -> Pipeline {
         Pipeline {
             id: id,
             parent_info: parent_info,
             script_chan: script_chan,
             layout_chan: layout_chan,
             compositor_proxy: compositor_proxy,
--- a/servo/components/gfx/Cargo.toml
+++ b/servo/components/gfx/Cargo.toml
@@ -9,17 +9,17 @@ publish = false
 [lib]
 name = "gfx"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.2.5"
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
 bitflags = "0.7"
-euclid = "0.7.1"
+euclid = "0.8.2"
 fnv = "1.0"
 gfx_traits = {path = "../gfx_traits"}
 harfbuzz-sys = "0.1"
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 ipc-channel = "0.4.0"
 layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
 lazy_static = "0.2"
@@ -54,12 +54,12 @@ features = ["serde_macros"]
 [target.'cfg(target_os = "macos")'.dependencies]
 byteorder = "0.5"
 core-foundation = "0.2"
 core-graphics = "0.3"
 core-text = "1.1"
 
 [target.'cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
 freetype = {git = "https://github.com/servo/rust-freetype"}
-servo-fontconfig = "0.2"
+servo-fontconfig = "0.2.1"
 
 [target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
 simd = {git = "https://github.com/huonw/simd"}
--- a/servo/components/gfx/display_list/mod.rs
+++ b/servo/components/gfx/display_list/mod.rs
@@ -40,17 +40,17 @@ use std::hash::{BuildHasherDefault, Hash
 use std::marker::PhantomData;
 use std::mem;
 use std::ops::{Deref, DerefMut};
 use std::sync::Arc;
 use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
 use style_traits::cursor::Cursor;
 use text::TextRun;
 use text::glyph::ByteIndex;
-use util::geometry::{self, MAX_RECT, ScreenPx};
+use util::geometry::{self, max_rect, ScreenPx};
 use webrender_traits::{self, WebGLContextId};
 
 pub use style::dom::OpaqueNode;
 
 // It seems cleaner to have layout code not mention Azure directly, so let's just reexport this for
 // layout to use.
 pub use azure::azure_hl::GradientStop;
 
@@ -525,17 +525,17 @@ impl DisplayList {
                                             translated_point,
                                             client_point,
                                             scroll_offsets,
                                             &mut result);
         result
     }
 }
 
-fn transformed_tile_rect(tile_rect: TypedRect<ScreenPx, usize>, transform: &Matrix4D<f32>) -> Rect<Au> {
+fn transformed_tile_rect(tile_rect: TypedRect<usize, ScreenPx>, transform: &Matrix4D<f32>) -> Rect<Au> {
     // Invert the current transform, then use this to back transform
     // the tile rect (placed at the origin) into the space of this
     // stacking context.
     let inverse_transform = transform.invert();
     let inverse_transform_2d = Matrix2D::new(inverse_transform.m11, inverse_transform.m12,
                                              inverse_transform.m21, inverse_transform.m22,
                                              inverse_transform.m41, inverse_transform.m42);
     let tile_size = Size2D::new(tile_rect.as_f32().size.width, tile_rect.as_f32().size.height);
@@ -879,17 +879,17 @@ impl ClippingRegion {
             complex: Vec::new(),
         }
     }
 
     /// Returns an all-encompassing clipping region that clips no pixels out.
     #[inline]
     pub fn max() -> ClippingRegion {
         ClippingRegion {
-            main: MAX_RECT,
+            main: max_rect(),
             complex: Vec::new(),
         }
     }
 
     /// Returns a clipping region that represents the given rectangle.
     #[inline]
     pub fn from_rect(rect: &Rect<Au>) -> ClippingRegion {
         ClippingRegion {
@@ -1171,37 +1171,37 @@ impl BorderRadii<Au> {
         BorderRadii { top_left: BorderRadii::scale_corner_by(self.top_left, s),
                       top_right: BorderRadii::scale_corner_by(self.top_right, s),
                       bottom_left: BorderRadii::scale_corner_by(self.bottom_left, s),
                       bottom_right: BorderRadii::scale_corner_by(self.bottom_right, s) }
     }
 
     // Scale the border corner radius by the specified factor
     pub fn scale_corner_by(corner: Size2D<Au>, s: f32) -> Size2D<Au> {
-        Size2D { width: corner.width.scale_by(s), height: corner.height.scale_by(s) }
+        Size2D::new(corner.width.scale_by(s), corner.height.scale_by(s))
     }
 }
 
 impl<T> BorderRadii<T> where T: PartialEq + Zero {
     /// Returns true if all the radii are zero.
     pub fn is_square(&self) -> bool {
         let zero = Zero::zero();
         self.top_left == zero && self.top_right == zero && self.bottom_right == zero &&
             self.bottom_left == zero
     }
 }
 
 impl<T> BorderRadii<T> where T: PartialEq + Zero + Clone {
     /// Returns a set of border radii that all have the given value.
     pub fn all_same(value: T) -> BorderRadii<T> {
         BorderRadii {
-            top_left: Size2D { width: value.clone(), height: value.clone() },
-            top_right: Size2D { width: value.clone(), height: value.clone() },
-            bottom_right: Size2D { width: value.clone(), height: value.clone() },
-            bottom_left: Size2D { width: value.clone(), height: value.clone() },
+            top_left: Size2D::new(value.clone(), value.clone()),
+            top_right: Size2D::new(value.clone(), value.clone()),
+            bottom_right: Size2D::new(value.clone(), value.clone()),
+            bottom_left: Size2D::new(value.clone(), value.clone()),
         }
     }
 }
 
 /// Paints a line segment.
 #[derive(Clone, HeapSizeOf, Deserialize, Serialize)]
 pub struct LineDisplayItem {
     pub base: BaseDisplayItem,
--- a/servo/components/gfx/paint_context.rs
+++ b/servo/components/gfx/paint_context.rs
@@ -30,26 +30,26 @@ use gfx_traits::{color, LayerKind};
 use net_traits::image::base::PixelFormat;
 use range::Range;
 use std::default::Default;
 use std::{f32, mem, ptr};
 use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
 use style_traits::PagePx;
 use text::TextRun;
 use text::glyph::ByteIndex;
-use util::geometry::{self, MAX_RECT, ScreenPx};
+use util::geometry::{self, max_rect, ScreenPx};
 use util::opts;
 
 pub struct PaintContext<'a> {
     pub draw_target: DrawTarget,
     pub font_context: &'a mut Box<FontContext>,
     /// The rectangle that this context encompasses in page coordinates.
-    pub page_rect: TypedRect<PagePx, f32>,
+    pub page_rect: TypedRect<f32, PagePx>,
     /// The rectangle that this context encompasses in screen coordinates (pixels).
-    pub screen_rect: TypedRect<ScreenPx, usize>,
+    pub screen_rect: TypedRect<usize, ScreenPx>,
     /// The clipping rect for the stacking context as a whole.
     pub clip_rect: Option<Rect<Au>>,
     /// The current transient clipping region, if any. A "transient clipping region" is the
     /// clipping region used by the last display item. We cache the last value so that we avoid
     /// pushing and popping clipping regions unnecessarily.
     pub transient_clip: Option<ClippingRegion>,
     /// A temporary hack to disable clipping optimizations on 3d layers.
     pub layer_kind: LayerKind,
@@ -121,18 +121,18 @@ struct CornerOrigin {
         bottom_left: Point2D<f32>,
 }
 
 impl<'a> PaintContext<'a> {
     pub fn to_nearest_azure_rect(&self, rect: &Rect<Au>) -> Rect<AzFloat> {
         rect.translate(&self.subpixel_offset).to_nearest_azure_rect(self.screen_pixels_per_px())
     }
 
-    pub fn screen_pixels_per_px(&self) -> ScaleFactor<PagePx, ScreenPx, f32> {
-        self.screen_rect.as_f32().size.width / self.page_rect.size.width
+    pub fn screen_pixels_per_px(&self) -> ScaleFactor<f32, PagePx, ScreenPx> {
+        ScaleFactor::new(self.screen_rect.as_f32().size.width / self.page_rect.size.width)
     }
 
     pub fn draw_target(&self) -> &DrawTarget {
         &self.draw_target
     }
 
     pub fn draw_solid_color(&self, bounds: &Rect<Au>, color: Color) {
         self.draw_target.make_current();
@@ -1534,27 +1534,27 @@ impl<'a> PaintContext<'a> {
         let inflated_shadow_bounds = shadow_bounds.inflate(side_inflation, side_inflation);
         let temporary_draw_target =
             self.create_draw_target_for_blur_if_necessary(&inflated_shadow_bounds, blur_radius);
 
         let path;
         match clip_mode {
             BoxShadowClipMode::Inset => {
                 path = temporary_draw_target.draw_target
-                                            .create_rectangular_border_path(&MAX_RECT,
+                                            .create_rectangular_border_path(&max_rect(),
                                                                             &shadow_bounds,
                                                                             pixels_per_px);
                 self.draw_target.push_clip(
                     &self.draw_target.create_rectangular_path(box_bounds, pixels_per_px))
             }
             BoxShadowClipMode::Outset => {
                 path = temporary_draw_target.draw_target.create_rectangular_path(&shadow_bounds,
                                                                                 pixels_per_px);
                 self.draw_target.push_clip(
-                    &self.draw_target.create_rectangular_border_path(&MAX_RECT, box_bounds,
+                    &self.draw_target.create_rectangular_border_path(&max_rect(), box_bounds,
                                                                      pixels_per_px))
             }
             BoxShadowClipMode::None => {
                 path = temporary_draw_target.draw_target.create_rectangular_path(&shadow_bounds,
                                                                                 pixels_per_px)
             }
         }
 
@@ -1639,40 +1639,40 @@ impl<'a> PaintContext<'a> {
             self.push_rounded_rect_clip(&self.to_nearest_azure_rect(&complex_region.rect),
                                         &complex_region.radii.to_radii_pixels(scale))
         }
         self.transient_clip = Some(clip_region)
     }
 }
 
 pub trait ToAzurePoint {
-    fn to_nearest_azure_point(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Point2D<AzFloat>;
+    fn to_nearest_azure_point(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Point2D<AzFloat>;
     fn to_azure_point(&self) -> Point2D<AzFloat>;
 }
 
 impl ToAzurePoint for Point2D<Au> {
-    fn to_nearest_azure_point(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Point2D<AzFloat> {
+    fn to_nearest_azure_point(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Point2D<AzFloat> {
         Point2D::new(self.x.to_nearest_pixel(pixels_per_px.get()) as AzFloat,
                      self.y.to_nearest_pixel(pixels_per_px.get()) as AzFloat)
     }
     fn to_azure_point(&self) -> Point2D<AzFloat> {
         Point2D::new(self.x.to_f32_px(), self.y.to_f32_px())
     }
 }
 
 pub trait ToAzureRect {
-    fn to_nearest_azure_rect(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Rect<AzFloat>;
-    fn to_nearest_non_empty_azure_rect(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Rect<AzFloat>;
+    fn to_nearest_azure_rect(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Rect<AzFloat>;
+    fn to_nearest_non_empty_azure_rect(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Rect<AzFloat>;
     fn to_azure_rect(&self) -> Rect<AzFloat>;
 }
 
 impl ToAzureRect for Rect<Au> {
     /// Round rects to pixel coordinates, maintaining the invariant of non-overlap,
     /// assuming that before rounding rects don't overlap.
-    fn to_nearest_azure_rect(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Rect<AzFloat> {
+    fn to_nearest_azure_rect(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Rect<AzFloat> {
         // Rounding the top left corner to the nearest pixel with the size rounded
         // to the nearest pixel multiple would violate the non-overlap condition,
         // e.g.
         // 10px×9.60px at (0px,6.6px) & 10px×9.60px at (0px,16.2px)
         // would round to
         // 10px×10.0px at (0px,7.0px) & 10px×10.0px at (0px,16.0px), which overlap.
         //
         // Instead round each corner to the nearest pixel.
@@ -1682,32 +1682,32 @@ impl ToAzureRect for Rect<Au> {
                                         (bottom_right.y - top_left.y) as AzFloat))
     }
 
     /// For rects of width or height between 0.5px and 1px, rounding each rect corner to the
     /// nearest pixel can yield an empty rect e.g.
     /// 10px×0.6px at 0px,28.56px -> 10px×0px at 0px,29px
     /// Instead round the top left to the nearest pixel and the size to the nearest pixel
     /// multiple. It's possible for non-overlapping rects after this rounding to overlap.
-    fn to_nearest_non_empty_azure_rect(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Rect<AzFloat> {
+    fn to_nearest_non_empty_azure_rect(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Rect<AzFloat> {
         Rect::new(self.origin.to_nearest_azure_point(pixels_per_px),
                   self.size.to_nearest_azure_size(pixels_per_px))
     }
 
     fn to_azure_rect(&self) -> Rect<AzFloat> {
         Rect::new(self.origin.to_azure_point(), self.size.to_azure_size())
     }
 }
 
 pub trait ToNearestAzureSize {
-    fn to_nearest_azure_size(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Size2D<AzFloat>;
+    fn to_nearest_azure_size(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Size2D<AzFloat>;
 }
 
 impl ToNearestAzureSize for Size2D<Au> {
-    fn to_nearest_azure_size(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Size2D<AzFloat> {
+    fn to_nearest_azure_size(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Size2D<AzFloat> {
         Size2D::new(self.width.to_nearest_pixel(pixels_per_px.get()) as AzFloat,
                     self.height.to_nearest_pixel(pixels_per_px.get()) as AzFloat)
     }
 }
 
 pub trait ToAzureSize {
     fn to_azure_size(&self) -> Size2D<AzFloat>;
 }
@@ -1730,47 +1730,47 @@ trait ToAzureIntSize {
 
 impl ToAzureIntSize for Size2D<AzFloat> {
     fn to_azure_int_size(&self) -> Size2D<i32> {
         Size2D::new(self.width as i32, self.height as i32)
     }
 }
 
 trait ToSideOffsetsPixels {
-    fn to_float_pixels(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> SideOffsets2D<AzFloat>;
+    fn to_float_pixels(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> SideOffsets2D<AzFloat>;
 }
 
 impl ToSideOffsetsPixels for SideOffsets2D<Au> {
-    fn to_float_pixels(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> SideOffsets2D<AzFloat> {
+    fn to_float_pixels(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> SideOffsets2D<AzFloat> {
         SideOffsets2D::new(self.top.to_nearest_pixel(pixels_per_px.get()) as AzFloat,
                            self.right.to_nearest_pixel(pixels_per_px.get()) as AzFloat,
                            self.bottom.to_nearest_pixel(pixels_per_px.get()) as AzFloat,
                            self.left.to_nearest_pixel(pixels_per_px.get()) as AzFloat)
     }
 }
 
 trait ToRadiiPixels {
-    fn to_radii_pixels(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> BorderRadii<AzFloat>;
+    fn to_radii_pixels(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> BorderRadii<AzFloat>;
 }
 
 impl ToRadiiPixels for BorderRadii<Au> {
-    fn to_radii_pixels(&self, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> BorderRadii<AzFloat> {
+    fn to_radii_pixels(&self, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> BorderRadii<AzFloat> {
         let to_nearest_px = |x: Au| -> AzFloat {
             x.to_nearest_pixel(pixels_per_px.get()) as AzFloat
         };
 
         BorderRadii {
-            top_left: Size2D { width: to_nearest_px(self.top_left.width),
-                               height: to_nearest_px(self.top_left.height) },
-            top_right: Size2D { width: to_nearest_px(self.top_right.width),
-                                height: to_nearest_px(self.top_right.height) },
-            bottom_left: Size2D { width: to_nearest_px(self.bottom_left.width),
-                                  height: to_nearest_px(self.bottom_left.height) },
-            bottom_right: Size2D { width: to_nearest_px(self.bottom_right.width),
-                                   height: to_nearest_px(self.bottom_right.height) },
+            top_left: Size2D::new(to_nearest_px(self.top_left.width),
+                                  to_nearest_px(self.top_left.height)),
+            top_right: Size2D::new(to_nearest_px(self.top_right.width),
+                                   to_nearest_px(self.top_right.height)),
+            bottom_left: Size2D::new(to_nearest_px(self.bottom_left.width),
+                                     to_nearest_px(self.bottom_left.height)),
+            bottom_right: Size2D::new(to_nearest_px(self.bottom_right.width),
+                                      to_nearest_px(self.bottom_right.height)),
        }
     }
 }
 
 trait ScaledFontExtensionMethods {
     fn draw_text(&self,
                  draw_target: &DrawTarget,
                  run: &TextRun,
@@ -1858,27 +1858,27 @@ trait DrawTargetExtensions {
     ///     |#######|                     |##|
     ///     |#######+---------------------+##|
     ///     |################################|
     ///     +--------------------------------+
     /// ```
     fn create_rectangular_border_path(&self,
                                       outer_rect: &Rect<Au>,
                                       inner_rect: &Rect<Au>,
-                                      pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Path;
+                                      pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Path;
 
     /// Creates and returns a path that represents a rectangle.
-    fn create_rectangular_path(&self, rect: &Rect<Au>, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Path;
+    fn create_rectangular_path(&self, rect: &Rect<Au>, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Path;
 }
 
 impl DrawTargetExtensions for DrawTarget {
     fn create_rectangular_border_path(&self,
                                       outer_rect: &Rect<Au>,
                                       inner_rect: &Rect<Au>,
-                                      pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Path {
+                                      pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Path {
         // +-----------+
         // |2          |1
         // |           |
         // |   +---+---+
         // |   |9  |6  |5, 10
         // |   |   |   |
         // |   +---+   |
         // |    8   7  |
@@ -1897,17 +1897,17 @@ impl DrawTargetExtensions for DrawTarget
         path_builder.line_to(Point2D::new(inner_rect.max_x(), inner_rect.origin.y));     // 6
         path_builder.line_to(Point2D::new(inner_rect.max_x(), inner_rect.max_y()));      // 7
         path_builder.line_to(Point2D::new(inner_rect.origin.x, inner_rect.max_y()));     // 8
         path_builder.line_to(inner_rect.origin);                                         // 9
         path_builder.line_to(Point2D::new(outer_rect.max_x(), inner_rect.origin.y));     // 10
         path_builder.finish()
     }
 
-    fn create_rectangular_path(&self, rect: &Rect<Au>, pixels_per_px: ScaleFactor<PagePx, ScreenPx, f32>) -> Path {
+    fn create_rectangular_path(&self, rect: &Rect<Au>, pixels_per_px: ScaleFactor<f32, PagePx, ScreenPx>) -> Path {
         // Explicitly round to the nearest non-empty rect because when drawing
         // box-shadow the rect height can be between 0.5px & 1px and could
         // otherwise round to an empty rect.
         let rect = rect.to_nearest_non_empty_azure_rect(pixels_per_px);
 
         let path_builder = self.create_path_builder();
         path_builder.move_to(rect.origin);
         path_builder.line_to(Point2D::new(rect.max_x(), rect.origin.y));
--- a/servo/components/gfx/paint_thread.rs
+++ b/servo/components/gfx/paint_thread.rs
@@ -6,17 +6,17 @@
 
 use app_units::Au;
 use azure::AzFloat;
 use azure::azure_hl::{BackendType, Color, DrawTarget, SurfaceFormat};
 use display_list::{DisplayItem, DisplayList, DisplayListTraversal};
 use display_list::{LayerInfo, StackingContext, StackingContextType};
 use euclid::Matrix4D;
 use euclid::point::Point2D;
-use euclid::rect::Rect;
+use euclid::rect::{Rect, TypedRect};
 use euclid::size::Size2D;
 use font_cache_thread::FontCacheThread;
 use font_context::FontContext;
 use gfx_traits::{ChromeToPaintMsg, Epoch, LayerId, LayerKind, LayerProperties};
 use gfx_traits::{PaintListener, PaintRequest, StackingContextId};
 use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
 use layers::platform::surface::{NativeDisplay, NativeSurface};
 use msg::constellation_msg::PipelineId;
@@ -679,18 +679,18 @@ impl WorkerThread {
         let mut buffer = self.create_layer_buffer(&mut tile, scale);
         let draw_target = DrawTarget::new(BackendType::Skia, size, SurfaceFormat::B8G8R8A8);
 
         {
             // Build the paint context.
             let mut paint_context = PaintContext {
                 draw_target: draw_target.clone(),
                 font_context: &mut self.font_context,
-                page_rect: Rect::from_untyped(&tile.page_rect.translate(&paint_layer.display_list_origin)),
-                screen_rect: Rect::from_untyped(&tile.screen_rect),
+                page_rect: TypedRect::from_untyped(&tile.page_rect.translate(&paint_layer.display_list_origin)),
+                screen_rect: TypedRect::from_untyped(&tile.screen_rect),
                 clip_rect: None,
                 transient_clip: None,
                 layer_kind: layer_kind,
                 subpixel_offset: Point2D::zero(),
             };
 
             // Apply the translation to paint the tile we want.
             let matrix = Matrix4D::identity();
--- a/servo/components/gfx_traits/Cargo.toml
+++ b/servo/components/gfx_traits/Cargo.toml
@@ -6,17 +6,17 @@ license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "gfx_traits"
 path = "lib.rs"
 
 [dependencies]
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
 msg = {path = "../msg"}
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 range = {path = "../range"}
 rustc-serialize = "0.3"
--- a/servo/components/layout/Cargo.toml
+++ b/servo/components/layout/Cargo.toml
@@ -10,17 +10,17 @@ name = "layout"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.2.5"
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
 bitflags = "0.7"
 canvas_traits = {path = "../canvas_traits"}
 cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 fnv = "1.0"
 gfx = {path = "../gfx"}
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 ipc-channel = "0.4.0"
 libc = "0.2"
 log = "0.3.5"
--- a/servo/components/layout/block.rs
+++ b/servo/components/layout/block.rs
@@ -56,17 +56,17 @@ use std::fmt;
 use std::sync::Arc;
 use style::computed_values::{border_collapse, box_sizing, display, float, overflow_x, overflow_y};
 use style::computed_values::{position, text_align, transform, transform_style};
 use style::context::{SharedStyleContext, StyleContext};
 use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
 use style::properties::ServoComputedValues;
 use style::values::computed::{LengthOrNone, LengthOrPercentageOrNone};
 use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
-use util::geometry::MAX_RECT;
+use util::geometry::max_rect;
 
 /// The number of screens of data we're allowed to generate display lists for in each direction.
 const DISPLAY_PORT_SIZE_FACTOR: i32 = 8;
 
 /// Information specific to floated blocks.
 #[derive(Clone, RustcEncodable)]
 pub struct FloatedBlockInfo {
     /// The amount of inline size that is available for the float.
@@ -1837,30 +1837,30 @@ impl Flow for BlockFlow {
         }
 
         // FIXME (mbrubeck): Get the real container size, taking the container writing mode into
         // account.  Must handle vertical writing modes.
         let container_size = Size2D::new(self.base.block_container_inline_size, Au(0));
 
         if self.is_root() {
             self.base.clip = ClippingRegion::max();
-            self.base.stacking_relative_position_of_display_port = MAX_RECT;
+            self.base.stacking_relative_position_of_display_port = max_rect();
         }
 
         let transform_style = self.fragment.style().get_used_transform_style();
 
         if self.base.flags.contains(IS_ABSOLUTELY_POSITIONED) {
             // `overflow: auto` and `overflow: scroll` force creation of layers, since we can only
             // scroll layers.
             match (self.fragment.style().get_box().overflow_x,
                    self.fragment.style().get_box().overflow_y.0) {
                 (overflow_x::T::auto, _) | (overflow_x::T::scroll, _) |
                 (_, overflow_x::T::auto) | (_, overflow_x::T::scroll) => {
                     self.base.clip = ClippingRegion::max();
-                    self.base.stacking_relative_position_of_display_port = MAX_RECT;
+                    self.base.stacking_relative_position_of_display_port = max_rect();
                 }
                 _ => {}
             }
 
             let position_start = self.base.position.start.to_physical(self.base.writing_mode,
                                                                       container_size);
 
             // Compute our position relative to the nearest ancestor stacking context. This will be
--- a/servo/components/layout/model.rs
+++ b/servo/components/layout/model.rs
@@ -488,22 +488,21 @@ pub fn specified_margin_from_style(style
 }
 
 pub trait ToGfxMatrix {
     fn to_gfx_matrix(&self) -> Matrix4D<f32>;
 }
 
 impl ToGfxMatrix for ComputedMatrix {
     fn to_gfx_matrix(&self) -> Matrix4D<f32> {
-        Matrix4D {
-            m11: self.m11 as f32, m12: self.m12 as f32, m13: self.m13 as f32, m14: self.m14 as f32,
-            m21: self.m21 as f32, m22: self.m22 as f32, m23: self.m23 as f32, m24: self.m24 as f32,
-            m31: self.m31 as f32, m32: self.m32 as f32, m33: self.m33 as f32, m34: self.m34 as f32,
-            m41: self.m41 as f32, m42: self.m42 as f32, m43: self.m43 as f32, m44: self.m44 as f32
-        }
+        Matrix4D::new(
+            self.m11 as f32, self.m12 as f32, self.m13 as f32, self.m14 as f32,
+            self.m21 as f32, self.m22 as f32, self.m23 as f32, self.m24 as f32,
+            self.m31 as f32, self.m32 as f32, self.m33 as f32, self.m34 as f32,
+            self.m41 as f32, self.m42 as f32, self.m43 as f32, self.m44 as f32)
     }
 }
 
 // Used to specify the logical direction.
 #[derive(Debug, Clone, Copy)]
 pub enum Direction {
     Inline,
     Block
--- a/servo/components/layout/multicol.rs
+++ b/servo/components/layout/multicol.rs
@@ -6,16 +6,17 @@
 
 #![deny(unsafe_code)]
 
 use app_units::Au;
 use block::BlockFlow;
 use context::LayoutContext;
 use display_list_builder::DisplayListBuildState;
 use euclid::Point2D;
+use euclid::Size2D;
 use floats::FloatKind;
 use flow::{Flow, FlowClass, OpaqueFlow, mut_base, FragmentationContext};
 use flow_ref::{self, FlowRef};
 use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
 use gfx::display_list::StackingContext;
 use gfx_traits::StackingContextId;
 use gfx_traits::print_tree::PrintTree;
 use std::cmp::{min, max};
@@ -163,17 +164,17 @@ impl Flow for MulticolFlow {
     }
 
     fn compute_absolute_position(&mut self, layout_context: &LayoutContext) {
         self.block_flow.compute_absolute_position(layout_context);
         let pitch = LogicalSize::new(self.block_flow.base.writing_mode, self.column_pitch, Au(0));
         let pitch = pitch.to_physical(self.block_flow.base.writing_mode);
         for (i, child) in self.block_flow.base.children.iter_mut().enumerate() {
             let point = &mut mut_base(child).stacking_relative_position;
-            *point = *point + pitch * i as i32;
+            *point = *point + Size2D::new(pitch.width * i as i32, pitch.height * i as i32);
         }
     }
 
     fn update_late_computed_inline_position_if_necessary(&mut self, inline_position: Au) {
         self.block_flow.update_late_computed_inline_position_if_necessary(inline_position)
     }
 
     fn update_late_computed_block_position_if_necessary(&mut self, block_position: Au) {
--- a/servo/components/layout_thread/Cargo.toml
+++ b/servo/components/layout_thread/Cargo.toml
@@ -7,17 +7,17 @@ publish = false
 
 [lib]
 name = "layout_thread"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.2.5"
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 fnv = "1.0"
 gfx = {path = "../gfx"}
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 ipc-channel = "0.4.0"
 layout = {path = "../layout"}
 layout_traits = {path = "../layout_traits"}
--- a/servo/components/layout_thread/lib.rs
+++ b/servo/components/layout_thread/lib.rs
@@ -108,17 +108,17 @@ use style::media_queries::{Device, Media
 use style::parallel::WorkQueueData;
 use style::refcell::RefCell;
 use style::selector_matching::Stylist;
 use style::servo_selector_impl::USER_OR_USER_AGENT_STYLESHEETS;
 use style::stylesheets::{Stylesheet, CSSRuleIteratorExt};
 use style::timer::Timer;
 use style::workqueue::WorkQueue;
 use url::Url;
-use util::geometry::MAX_RECT;
+use util::geometry::max_rect;
 use util::ipc::OptionalIpcSender;
 use util::opts;
 use util::prefs::PREFS;
 use util::thread;
 use util::thread_state;
 
 /// The number of screens we have to traverse before we decide to generate new display lists.
 const DISPLAY_PORT_THRESHOLD_SIZE_FACTOR: i32 = 4;
@@ -612,17 +612,17 @@ impl LayoutThread {
 
         if let Some(mut root_flow) = self.root_flow.clone() {
             let flow = flow::mut_base(flow_ref::deref_mut(&mut root_flow));
             flow.restyle_damage.insert(REPAINT);
         }
 
         let reflow_info = Reflow {
             goal: ReflowGoal::ForDisplay,
-            page_clip_rect: MAX_RECT,
+            page_clip_rect: max_rect(),
         };
         let mut layout_context = self.build_shared_layout_context(&*rw_data,
                                                                   false,
                                                                   reflow_info.goal);
 
         self.perform_post_style_recalc_layout_passes(&reflow_info,
                                                      &mut *rw_data,
                                                      &mut layout_context);
@@ -1071,31 +1071,31 @@ impl LayoutThread {
 
         debug!("layout: received layout request for: {}", self.url);
         if log_enabled!(log::LogLevel::Debug) {
             node.dump();
         }
 
         let initial_viewport = data.window_size.initial_viewport;
         let old_viewport_size = self.viewport_size;
-        let current_screen_size = Size2D::new(Au::from_f32_px(initial_viewport.width.get()),
-                                              Au::from_f32_px(initial_viewport.height.get()));
+        let current_screen_size = Size2D::new(Au::from_f32_px(initial_viewport.width),
+                                              Au::from_f32_px(initial_viewport.height));
 
         // Calculate the actual viewport as per DEVICE-ADAPT § 6
         let device = Device::new(MediaType::Screen, initial_viewport);
         Arc::get_mut(&mut rw_data.stylist).unwrap().set_device(device, &data.document_stylesheets);
 
         let constraints = rw_data.stylist.viewport_constraints().clone();
         self.viewport_size = match constraints {
             Some(ref constraints) => {
                 debug!("Viewport constraints: {:?}", constraints);
 
                 // other rules are evaluated against the actual viewport
-                Size2D::new(Au::from_f32_px(constraints.size.width.get()),
-                            Au::from_f32_px(constraints.size.height.get()))
+                Size2D::new(Au::from_f32_px(constraints.size.width),
+                            Au::from_f32_px(constraints.size.height))
             }
             None => current_screen_size,
         };
 
         // Handle conditions where the entire flow tree is invalid.
         let mut needs_dirtying = false;
 
         let viewport_size_changed = self.viewport_size != old_viewport_size;
@@ -1298,17 +1298,17 @@ impl LayoutThread {
         for &(ref layer_id, ref new_visible_rect) in &new_visible_rects {
             old_visible_rects.insert(*layer_id, *new_visible_rect);
         }
         self.visible_rects = Arc::new(old_visible_rects);
 
         // Regenerate the display lists.
         let reflow_info = Reflow {
             goal: ReflowGoal::ForDisplay,
-            page_clip_rect: MAX_RECT,
+            page_clip_rect: max_rect(),
         };
 
         let mut layout_context = self.build_shared_layout_context(&*rw_data,
                                                                   false,
                                                                   reflow_info.goal);
 
         self.perform_post_main_layout_passes(&reflow_info, &mut *rw_data, &mut layout_context);
         true
@@ -1342,17 +1342,17 @@ impl LayoutThread {
     fn tick_all_animations<'a, 'b>(&mut self, possibly_locked_rw_data: &mut RwData<'a, 'b>) {
         let mut rw_data = possibly_locked_rw_data.lock();
         self.tick_animations(&mut rw_data);
     }
 
     fn tick_animations(&mut self, rw_data: &mut LayoutThreadData) {
         let reflow_info = Reflow {
             goal: ReflowGoal::ForDisplay,
-            page_clip_rect: MAX_RECT,
+            page_clip_rect: max_rect(),
         };
 
         let mut layout_context = self.build_shared_layout_context(&*rw_data,
                                                                   false,
                                                                   reflow_info.goal);
 
         if let Some(mut root_flow) = self.root_flow.clone() {
             // Perform an abbreviated style recalc that operates without access to the DOM.
@@ -1373,17 +1373,17 @@ impl LayoutThread {
     }
 
     fn reflow_with_newly_loaded_web_font<'a, 'b>(&mut self, possibly_locked_rw_data: &mut RwData<'a, 'b>) {
         let mut rw_data = possibly_locked_rw_data.lock();
         font_context::invalidate_font_caches();
 
         let reflow_info = Reflow {
             goal: ReflowGoal::ForDisplay,
-            page_clip_rect: MAX_RECT,
+            page_clip_rect: max_rect(),
         };
 
         let mut layout_context = self.build_shared_layout_context(&*rw_data,
                                                                   false,
                                                                   reflow_info.goal);
 
         // No need to do a style recalc here.
         if self.root_flow.is_none() {
--- a/servo/components/script/Cargo.toml
+++ b/servo/components/script/Cargo.toml
@@ -25,34 +25,34 @@ angle = {git = "https://github.com/servo
 app_units = "0.2.5"
 bitflags = "0.7"
 canvas_traits = {path = "../canvas_traits"}
 caseless = "0.1.0"
 cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] }
 cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
 devtools_traits = {path = "../devtools_traits"}
 encoding = "0.2"
-euclid = "0.7.1"
+euclid = "0.8.2"
 fnv = "1.0"
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.6"
 heapsize_plugin = "0.1.2"
 html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]}
 hyper = {version = "0.9.9", features = ["serde-serialization"]}
 image = "0.10"
 ipc-channel = "0.4.0"
 js = {git = "https://github.com/servo/rust-mozjs"}
 libc = "0.2"
 log = "0.3.5"
 mime = "0.2.1"
 mime_guess = "1.8.0"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
 num-traits = "0.1.32"
-offscreen_gl_context = "0.1.2"
+offscreen_gl_context = "0.2.0"
 open = "1.1.1"
 phf = "0.7.16"
 phf_macros = "0.7.16"
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 rand = "0.3"
 range = {path = "../range"}
 ref_filter_map = "1.0"
--- a/servo/components/script/dom/document.rs
+++ b/servo/components/script/dom/document.rs
@@ -2802,25 +2802,25 @@ impl DocumentMethods for Document {
     // https://html.spec.whatwg.org/multipage/#handler-onreadystatechange
     event_handler!(readystatechange, GetOnreadystatechange, SetOnreadystatechange);
 
     #[allow(unsafe_code)]
     // https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint
     fn ElementFromPoint(&self, x: Finite<f64>, y: Finite<f64>) -> Option<Root<Element>> {
         let x = *x as f32;
         let y = *y as f32;
-        let point = &Point2D { x: x, y: y };
+        let point = &Point2D::new(x, y);
         let window = window_from_node(self);
         let viewport = window.window_size().unwrap().visible_viewport;
 
         if self.browsing_context().is_none() {
             return None;
         }
 
-        if x < 0.0 || y < 0.0 || x > viewport.width.get() || y > viewport.height.get() {
+        if x < 0.0 || y < 0.0 || x > viewport.width || y > viewport.height {
             return None;
         }
 
         match self.window.hit_test_query(*point, false) {
             Some(untrusted_node_address) => {
                 let js_runtime = unsafe { JS_GetRuntime(window.get_cx()) };
 
                 let node = node::from_untrusted_node_address(js_runtime, untrusted_node_address);
@@ -2835,26 +2835,26 @@ impl DocumentMethods for Document {
         }
     }
 
     #[allow(unsafe_code)]
     // https://drafts.csswg.org/cssom-view/#dom-document-elementsfrompoint
     fn ElementsFromPoint(&self, x: Finite<f64>, y: Finite<f64>) -> Vec<Root<Element>> {
         let x = *x as f32;
         let y = *y as f32;
-        let point = &Point2D { x: x, y: y };
+        let point = &Point2D::new(x, y);
         let window = window_from_node(self);
         let viewport = window.window_size().unwrap().visible_viewport;
 
         if self.browsing_context().is_none() {
             return vec!();
         }
 
         // Step 2
-        if x < 0.0 || y < 0.0 || x > viewport.width.get() || y > viewport.height.get() {
+        if x < 0.0 || y < 0.0 || x > viewport.width || y > viewport.height {
             return vec!();
         }
 
         let js_runtime = unsafe { JS_GetRuntime(window.get_cx()) };
 
         // Step 1 and Step 3
         let mut elements: Vec<Root<Element>> = self.nodes_from_point(point).iter()
             .flat_map(|&untrusted_node_address| {
--- a/servo/components/script/dom/window.rs
+++ b/servo/components/script/dom/window.rs
@@ -98,17 +98,17 @@ use task_source::file_reading::FileReadi
 use task_source::history_traversal::HistoryTraversalTaskSource;
 use task_source::networking::NetworkingTaskSource;
 use task_source::user_interaction::UserInteractionTaskSource;
 use time;
 use timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle, OneshotTimers, TimerCallback};
 #[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
 use tinyfiledialogs::{self, MessageBoxIcon};
 use url::Url;
-use util::geometry::{self, MAX_RECT};
+use util::geometry::{self, max_rect};
 use util::opts;
 use util::prefs::PREFS;
 use webdriver_handlers::jsval_to_webdriver;
 
 /// Current state of the window object
 #[derive(JSTraceable, Copy, Clone, Debug, PartialEq, HeapSizeOf)]
 enum WindowState {
     Alive,
@@ -746,25 +746,25 @@ impl WindowMethods for Window {
         // Step 5.
         CSSStyleDeclaration::new(self, element, pseudo, CSSModificationAccess::Readonly)
     }
 
     // https://drafts.csswg.org/cssom-view/#dom-window-innerheight
     //TODO Include Scrollbar
     fn InnerHeight(&self) -> i32 {
         self.window_size.get()
-                        .and_then(|e| e.visible_viewport.height.get().to_i32())
+                        .and_then(|e| e.visible_viewport.height.to_i32())
                         .unwrap_or(0)
     }
 
     // https://drafts.csswg.org/cssom-view/#dom-window-innerwidth
     //TODO Include Scrollbar
     fn InnerWidth(&self) -> i32 {
         self.window_size.get()
-                        .and_then(|e| e.visible_viewport.width.get().to_i32())
+                        .and_then(|e| e.visible_viewport.width.to_i32())
                         .unwrap_or(0)
     }
 
     // https://drafts.csswg.org/cssom-view/#dom-window-scrollx
     fn ScrollX(&self) -> i32 {
         self.current_viewport.get().origin.x.to_px()
     }
 
@@ -1524,25 +1524,25 @@ impl Window {
         let proposed_clip_rect = geometry::f32_rect_to_au_rect(
             viewport.inflate(viewport.size.width * VIEWPORT_EXPANSION,
             viewport.size.height * VIEWPORT_EXPANSION));
         let clip_rect = self.page_clip_rect.get();
         if proposed_clip_rect == clip_rect {
             return false;
         }
 
-        let had_clip_rect = clip_rect != MAX_RECT;
+        let had_clip_rect = clip_rect != max_rect();
         if had_clip_rect && !should_move_clip_rect(clip_rect, viewport) {
             return false;
         }
 
         self.page_clip_rect.set(proposed_clip_rect);
 
         // If we didn't have a clip rect, the previous display doesn't need rebuilding
-        // because it was built for infinite clip (MAX_RECT).
+        // because it was built for infinite clip (max_rect()).
         had_clip_rect
     }
 
     pub fn set_devtools_wants_updates(&self, value: bool) {
         self.devtools_wants_updates.set(value);
     }
 
     // https://html.spec.whatwg.org/multipage/#accessing-other-browsing-contexts
@@ -1716,17 +1716,17 @@ impl Window {
             next_worker_id: Cell::new(WorkerId(0)),
             id: id,
             parent_info: parent_info,
             dom_static: GlobalStaticData::new(),
             js_runtime: DOMRefCell::new(Some(runtime.clone())),
             resource_threads: resource_threads,
             bluetooth_thread: bluetooth_thread,
             constellation_chan: constellation_chan,
-            page_clip_rect: Cell::new(MAX_RECT),
+            page_clip_rect: Cell::new(max_rect()),
             fragment_name: DOMRefCell::new(None),
             resize_event: Cell::new(None),
             next_subpage_id: Cell::new(SubpageId(0)),
             layout_chan: layout_chan,
             layout_rpc: layout_rpc,
             window_size: Cell::new(window_size),
             current_viewport: Cell::new(Rect::zero()),
             suppress_reflow: Cell::new(true),
--- a/servo/components/script_layout_interface/Cargo.toml
+++ b/servo/components/script_layout_interface/Cargo.toml
@@ -9,17 +9,17 @@ publish = false
 name = "script_layout_interface"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.2.5"
 bitflags = "0.7"
 canvas_traits = {path = "../canvas_traits"}
 cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 ipc-channel = "0.4.0"
 libc = "0.2"
 log = "0.3.5"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
--- a/servo/components/script_traits/Cargo.toml
+++ b/servo/components/script_traits/Cargo.toml
@@ -9,26 +9,26 @@ publish = false
 name = "script_traits"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.2.5"
 canvas_traits = {path = "../canvas_traits"}
 cookie = { version = "0.2.5", features = ["serialize-rustc", "serialize-serde"]}
 devtools_traits = {path = "../devtools_traits"}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 heapsize_plugin = "0.1.2"
 ipc-channel = "0.4.0"
 layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
 libc = "0.2"
 msg = {path = "../msg"}
 net_traits = {path = "../net_traits"}
-offscreen_gl_context = "0.1.2"
+offscreen_gl_context = "0.2.0"
 plugins = {path = "../plugins"}
 profile_traits = {path = "../profile_traits"}
 rustc-serialize = "0.3.4"
 serde = "0.7.15"
 serde_macros = "0.7.15"
 style_traits = {path = "../style_traits", features = ["servo"]}
 time = "0.1.12"
 url = {version = "1.0.0", features = ["heap_size"]}
--- a/servo/components/script_traits/lib.rs
+++ b/servo/components/script_traits/lib.rs
@@ -360,19 +360,19 @@ pub struct TimerEventId(pub u32);
 /// Unit of measurement.
 #[derive(Clone, Copy, HeapSizeOf)]
 pub enum Milliseconds {}
 /// Unit of measurement.
 #[derive(Clone, Copy, HeapSizeOf)]
 pub enum Nanoseconds {}
 
 /// Amount of milliseconds.
-pub type MsDuration = Length<Milliseconds, u64>;
+pub type MsDuration = Length<u64, Milliseconds>;
 /// Amount of nanoseconds.
-pub type NsDuration = Length<Nanoseconds, u64>;
+pub type NsDuration = Length<u64, Nanoseconds>;
 
 /// Returns the duration since an unspecified epoch measured in ms.
 pub fn precise_time_ms() -> MsDuration {
     Length::new(time::precise_time_ns() / (1000 * 1000))
 }
 /// Returns the duration since an unspecified epoch measured in ns.
 pub fn precise_time_ns() -> NsDuration {
     Length::new(time::precise_time_ns())
@@ -563,23 +563,23 @@ pub struct StackingContextScrollState {
     pub scroll_offset: Point2D<f32>,
 }
 
 /// Data about the window size.
 #[derive(Copy, Clone, Deserialize, Serialize, HeapSizeOf)]
 pub struct WindowSizeData {
     /// The size of the initial layout viewport, before parsing an
     /// http://www.w3.org/TR/css-device-adapt/#initial-viewport
-    pub initial_viewport: TypedSize2D<ViewportPx, f32>,
+    pub initial_viewport: TypedSize2D<f32, ViewportPx>,
 
     /// The "viewing area" in page px. See `PagePx` documentation for details.
-    pub visible_viewport: TypedSize2D<PagePx, f32>,
+    pub visible_viewport: TypedSize2D<f32, PagePx>,
 
     /// The resolution of the window in dppx, not including any "pinch zoom" factor.
-    pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
+    pub device_pixel_ratio: ScaleFactor<f32, ViewportPx, DevicePixel>,
 }
 
 /// Messages to the constellation originating from the WebDriver server.
 #[derive(Deserialize, Serialize)]
 pub enum WebDriverCommandMsg {
     /// Get the window size.
     GetWindowSize(PipelineId, IpcSender<WindowSizeData>),
     /// Load a URL in the pipeline with the given ID.
--- a/servo/components/servo/Cargo.lock
+++ b/servo/components/servo/Cargo.lock
@@ -8,17 +8,17 @@ dependencies = [
  "canvas 0.0.1",
  "canvas_traits 0.0.1",
  "compiletest_helper 0.0.1",
  "compositing 0.0.1",
  "constellation 0.0.1",
  "devtools 0.0.1",
  "devtools_traits 0.0.1",
  "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/servo/gaol)",
  "gfx 0.0.1",
  "gfx_tests 0.0.1",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glutin_app 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layout 0.0.1",
  "layout_tests 0.0.1",
@@ -41,17 +41,17 @@ dependencies = [
  "sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_tests 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "util_tests 0.0.1",
  "webdriver_server 0.0.1",
  "webrender 0.1.0 (git+https://github.com/servo/webrender)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "aho-corasick"
 version = "0.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -97,32 +97,33 @@ dependencies = [
 
 [[package]]
 name = "aster"
 version = "0.22.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "azure"
-version = "0.4.6"
-source = "git+https://github.com/servo/rust-azure#4d72934a73820653986d9b11da759f5955a13e44"
+version = "0.6.2"
+source = "git+https://github.com/servo/rust-azure#6e028b5fafc1dad4cd48e233a9760cb67937d487"
 dependencies = [
+ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "backtrace"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -199,45 +200,45 @@ source = "git+https://github.com/browser
 name = "byteorder"
 version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "canvas"
 version = "0.0.1"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "canvas_traits 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "canvas_traits"
 version = "0.0.1"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "caseless"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -297,69 +298,69 @@ dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "compositing"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "script_traits 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "webrender 0.1.0 (git+https://github.com/servo/webrender)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "constellation"
 version = "0.0.1"
 dependencies = [
  "backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas 0.0.1",
  "canvas_traits 0.0.1",
  "compositing 0.0.1",
  "devtools_traits 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/servo/gaol)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "layout_traits 0.0.1",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "content-blocker"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -646,17 +647,17 @@ version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "euclid"
-version = "0.7.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -740,77 +741,77 @@ name = "getopts"
 version = "0.2.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "gfx"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "gfx_traits 0.0.1",
  "harfbuzz-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "range 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "simd 0.1.0 (git+https://github.com/huonw/simd)",
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
  "xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gfx_tests"
 version = "0.0.1"
 dependencies = [
  "gfx 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
 ]
 
 [[package]]
 name = "gfx_traits"
 version = "0.0.1"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "msg 0.0.1",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "range 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -848,20 +849,20 @@ version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "glutin_app"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "compositing 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "script_traits 0.0.1",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1013,22 +1014,22 @@ dependencies = [
 
 [[package]]
 name = "inflate"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "io-surface"
-version = "0.2.1"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "ipc-channel"
 version = "0.4.0"
@@ -1080,46 +1081,45 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "language-tags"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "layers"
-version = "0.2.6"
-source = "git+https://github.com/servo/rust-layers#79fca9ca5f2b7bded94dd34637a251967a9b0247"
+version = "0.3.1"
+source = "git+https://github.com/servo/rust-layers#c1965cf7a265f758c34e57413506f508969248a0"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "layout"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1137,33 +1137,33 @@ dependencies = [
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "layout_tests"
 version = "0.0.1"
 dependencies = [
  "layout 0.0.1",
 ]
 
 [[package]]
 name = "layout_thread"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layout 0.0.1",
  "layout_traits 0.0.1",
@@ -1175,32 +1175,32 @@ dependencies = [
  "script 0.0.1",
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
  "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "layout_traits"
 version = "0.0.1"
 dependencies = [
  "gfx 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "profile_traits 0.0.1",
  "script_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "lazy_static"
 version = "0.1.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -1353,17 +1353,17 @@ dependencies = [
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "net"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "brotli 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1390,17 +1390,17 @@ dependencies = [
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "threadpool 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
  "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "net2"
 version = "0.2.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -1541,22 +1541,22 @@ dependencies = [
 
 [[package]]
 name = "odds"
 version = "0.2.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "offscreen_gl_context"
-version = "0.1.9"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -1868,34 +1868,34 @@ dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
  "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "js 0.1.3 (git+https://github.com/servo/rust-mozjs)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime_guess 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "open 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_macros 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "range 0.0.1",
  "ref_filter_map 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1910,30 +1910,30 @@ dependencies = [
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "video-metadata 0.1.3 (git+https://github.com/GuillaumeGomez/video-metadata-rs)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "script_layout_interface"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
@@ -1961,26 +1961,26 @@ dependencies = [
 [[package]]
 name = "script_traits"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2051,38 +2051,39 @@ name = "servo-egl"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-fontconfig"
-version = "0.2.0"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig-sys 2.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-fontconfig-sys"
-version = "2.11.3"
+version = "4.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-freetype-sys"
-version = "2.4.11"
+version = "4.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-glutin"
 version = "0.4.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -2107,29 +2108,30 @@ dependencies = [
  "wayland-kbd 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "wayland-window 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11-dl 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-skia"
-version = "0.20130412.10"
+version = "0.20130412.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "shared_library"
 version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2189,17 +2191,17 @@ dependencies = [
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2221,32 +2223,32 @@ dependencies = [
 ]
 
 [[package]]
 name = "style_tests"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
 ]
 
 [[package]]
 name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -2418,17 +2420,17 @@ version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "util"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2542,17 +2544,17 @@ dependencies = [
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webdriver_server"
 version = "0.0.1"
 dependencies = [
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "plugins 0.0.1",
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2561,50 +2563,50 @@ dependencies = [
  "util 0.0.1",
  "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender"
 version = "0.1.0"
-source = "git+https://github.com/servo/webrender#e2e8d91f24de961bfd6b53338e2403bc0c675aab"
+source = "git+https://github.com/servo/webrender#2c25e910b2a1f0399c57a077085d5cc3451f4499"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "webrender_traits"
-version = "0.2.0"
-source = "git+https://github.com/servo/webrender_traits#a26ebe4da490cc1fb60d830c73cbefb135b768b1"
+version = "0.2.1"
+source = "git+https://github.com/servo/webrender_traits#75d40708694949a2e092ff4c344f952e3afbaa55"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "websocket"
 version = "0.17.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
--- a/servo/components/servo/Cargo.toml
+++ b/servo/components/servo/Cargo.toml
@@ -47,17 +47,17 @@ util_tests = {path = "../../tests/unit/u
 browserhtml = {git = "https://github.com/browserhtml/browserhtml", branch = "crate"}
 canvas = {path = "../canvas"}
 canvas_traits = {path = "../canvas_traits"}
 compositing = {path = "../compositing"}
 constellation = {path = "../constellation"}
 devtools = {path = "../devtools"}
 devtools_traits = {path = "../devtools_traits"}
 env_logger = "0.3"
-euclid = "0.7.1"
+euclid = "0.8.2"
 gfx = {path = "../gfx"}
 gleam = "0.2"
 glutin_app = {path = "../../ports/glutin"}
 ipc-channel = "0.4.0"
 layout = {path = "../layout"}
 layout_thread = {path = "../layout_thread"}
 libc = "0.2"
 log = "0.3"
--- a/servo/components/style/Cargo.toml
+++ b/servo/components/style/Cargo.toml
@@ -20,17 +20,17 @@ servo = ["serde", "serde/nightly", "serd
          "url/heap_size", "plugins"]
 
 [dependencies]
 app_units = "0.2.5"
 bitflags = "0.7"
 cssparser = "0.5.5"
 deque = "0.3.1"
 encoding = "0.2"
-euclid = "0.7.1"
+euclid = "0.8.2"
 fnv = "1.0"
 gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true}
 gecko_string_cache = {path = "../../ports/geckolib/string_cache", optional = true}
 heapsize = {version = "0.3.0", optional = true}
 heapsize_plugin = {version = "0.1.2", optional = true}
 lazy_static = "0.2"
 log = "0.3.5"
 matches = "0.1"
--- a/servo/components/style/logical_geometry.rs
+++ b/servo/components/style/logical_geometry.rs
@@ -296,19 +296,19 @@ impl<T: Copy> LogicalSize<T> {
             self.block = height
         }
     }
 
     #[inline]
     pub fn to_physical(&self, mode: WritingMode) -> Size2D<T> {
         self.debug_writing_mode.check(mode);
         if mode.is_vertical() {
-            Size2D { width: self.block, height: self.inline }
+            Size2D::new(self.block, self.inline)
         } else {
-            Size2D { width: self.inline, height: self.block }
+            Size2D::new(self.inline, self.block)
         }
     }
 
     #[inline]
     pub fn convert(&self, mode_from: WritingMode, mode_to: WritingMode) -> LogicalSize<T> {
         if mode_from == mode_to {
             self.debug_writing_mode.check(mode_from);
             *self
@@ -445,25 +445,23 @@ impl<T: Copy + Sub<T, Output=T>> Logical
             self.b = y
         }
     }
 
     #[inline]
     pub fn to_physical(&self, mode: WritingMode, container_size: Size2D<T>) -> Point2D<T> {
         self.debug_writing_mode.check(mode);
         if mode.is_vertical() {
-            Point2D {
-                x: if mode.is_vertical_lr() { self.b } else { container_size.width - self.b },
-                y: if mode.is_inline_tb() { self.i } else { container_size.height - self.i }
-            }
+            Point2D::new(
+                if mode.is_vertical_lr() { self.b } else { container_size.width - self.b },
+                if mode.is_inline_tb() { self.i } else { container_size.height - self.i })
         } else {
-            Point2D {
-                x: if mode.is_bidi_ltr() { self.i } else { container_size.width - self.i },
-                y: self.b
-            }
+            Point2D::new(
+                if mode.is_bidi_ltr() { self.i } else { container_size.width - self.i },
+                self.b)
         }
     }
 
     #[inline]
     pub fn convert(&self, mode_from: WritingMode, mode_to: WritingMode, container_size: Size2D<T>)
                    -> LogicalPoint<T> {
         if mode_from == mode_to {
             self.debug_writing_mode.check(mode_from);
@@ -948,18 +946,18 @@ impl<T: Copy + Add<T, Output=T> + Sub<T,
             y = self.start.b;
             if mode.is_bidi_ltr() {
                 x = self.start.i;
             } else {
                 x = container_size.width - self.inline_end();
             }
         }
         Rect {
-            origin: Point2D { x: x, y: y },
-            size: Size2D { width: width, height: height },
+            origin: Point2D::new(x, y),
+            size: Size2D::new(width, height),
         }
     }
 
     #[inline]
     pub fn convert(&self, mode_from: WritingMode, mode_to: WritingMode, container_size: Size2D<T>)
                    -> LogicalRect<T> {
         if mode_from == mode_to {
             self.debug_writing_mode.check(mode_from);
--- a/servo/components/style/media_queries.rs
+++ b/servo/components/style/media_queries.rs
@@ -113,31 +113,31 @@ pub enum MediaType {
     Print,
     Unknown,
 }
 
 #[derive(Debug)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub struct Device {
     pub media_type: MediaType,
-    pub viewport_size: TypedSize2D<ViewportPx, f32>,
+    pub viewport_size: TypedSize2D<f32, ViewportPx>,
 }
 
 impl Device {
-    pub fn new(media_type: MediaType, viewport_size: TypedSize2D<ViewportPx, f32>) -> Device {
+    pub fn new(media_type: MediaType, viewport_size: TypedSize2D<f32, ViewportPx>) -> Device {
         Device {
             media_type: media_type,
             viewport_size: viewport_size,
         }
     }
 
     #[inline]
     pub fn au_viewport_size(&self) -> Size2D<Au> {
-        Size2D::new(Au::from_f32_px(self.viewport_size.width.get()),
-                    Au::from_f32_px(self.viewport_size.height.get()))
+        Size2D::new(Au::from_f32_px(self.viewport_size.width),
+                    Au::from_f32_px(self.viewport_size.height))
     }
 
 }
 
 impl Expression {
     fn parse(input: &mut Parser) -> Result<Expression, ()> {
         try!(input.expect_parenthesis_block());
         input.parse_nested_block(|input| {
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -364,57 +364,53 @@
 
 // TODO(pcwalton): Lots more timing functions.
 // TODO(pcwalton): Multiple transitions.
 <%helpers:longhand name="transition-timing-function"
                    need_index="True"
                    animatable="False">
     use self::computed_value::{StartEnd, TransitionTimingFunction};
 
-    use euclid::point::Point2D;
+    use euclid::point::{Point2D, TypedPoint2D};
+    use std::marker::PhantomData;
 
     pub use self::computed_value::SingleComputedValue as SingleSpecifiedValue;
     pub use self::computed_value::T as SpecifiedValue;
 
-    static EASE: TransitionTimingFunction = TransitionTimingFunction::CubicBezier(Point2D {
-        x: 0.25,
-        y: 0.1,
-    }, Point2D {
-        x: 0.25,
-        y: 1.0,
-    });
-    static LINEAR: TransitionTimingFunction = TransitionTimingFunction::CubicBezier(Point2D {
-        x: 0.0,
-        y: 0.0,
-    }, Point2D {
-        x: 1.0,
-        y: 1.0,
-    });
-    static EASE_IN: TransitionTimingFunction = TransitionTimingFunction::CubicBezier(Point2D {
-        x: 0.42,
-        y: 0.0,
-    }, Point2D {
-        x: 1.0,
-        y: 1.0,
-    });
-    static EASE_OUT: TransitionTimingFunction = TransitionTimingFunction::CubicBezier(Point2D {
-        x: 0.0,
-        y: 0.0,
-    }, Point2D {
-        x: 0.58,
-        y: 1.0,
-    });
-    static EASE_IN_OUT: TransitionTimingFunction =
-        TransitionTimingFunction::CubicBezier(Point2D {
-            x: 0.42,
-            y: 0.0,
-        }, Point2D {
-            x: 0.58,
-            y: 1.0,
-        });
+    // FIXME: This could use static variables and const functions when they are available.
+    #[inline(always)]
+    fn ease() -> TransitionTimingFunction {
+        TransitionTimingFunction::CubicBezier(TypedPoint2D::new(0.25, 0.1),
+                                              TypedPoint2D::new(0.25, 1.0))
+    }
+
+    #[inline(always)]
+    fn linear() -> TransitionTimingFunction {
+        TransitionTimingFunction::CubicBezier(TypedPoint2D::new(0.0, 0.0),
+                                              TypedPoint2D::new(1.0, 1.0))
+    }
+
+    #[inline(always)]
+    fn ease_in() -> TransitionTimingFunction {
+        TransitionTimingFunction::CubicBezier(TypedPoint2D::new(0.42, 0.0),
+                                              TypedPoint2D::new(1.0, 1.0))
+    }
+
+    #[inline(always)]
+    fn ease_out() -> TransitionTimingFunction {
+        TransitionTimingFunction::CubicBezier(TypedPoint2D::new(0.0, 0.0),
+                                              TypedPoint2D::new(0.58, 1.0))
+    }
+
+    #[inline(always)]
+    fn ease_in_out() -> TransitionTimingFunction {
+        TransitionTimingFunction::CubicBezier(TypedPoint2D::new(0.42, 0.0),
+                                              TypedPoint2D::new(0.58, 1.0))
+    }
+
     static STEP_START: TransitionTimingFunction =
         TransitionTimingFunction::Steps(1, StartEnd::Start);
     static STEP_END: TransitionTimingFunction =
         TransitionTimingFunction::Steps(1, StartEnd::End);
 
     pub mod computed_value {
         use cssparser::ToCss;
         use euclid::point::Point2D;
@@ -504,17 +500,17 @@
 
     #[inline]
     pub fn get_initial_value() -> computed_value::T {
         computed_value::T(vec![get_initial_single_value()])
     }
 
     #[inline]
     pub fn get_initial_single_value() -> TransitionTimingFunction {
-        EASE
+        ease()
     }
 
     pub fn parse_one(input: &mut Parser) -> Result<SingleSpecifiedValue,()> {
         if let Ok(function_name) = input.try(|input| input.expect_function()) {
             return match_ignore_ascii_case! { function_name,
                 "cubic-bezier" => {
                     let (mut p1x, mut p1y, mut p2x, mut p2y) = (0.0, 0.0, 0.0, 0.0);
                     try!(input.parse_nested_block(|input| {
@@ -546,21 +542,21 @@
                     }));
                     Ok(TransitionTimingFunction::Steps(step_count as u32, start_end))
                 },
                 _ => Err(())
             }
         }
         match_ignore_ascii_case! {
             try!(input.expect_ident()),
-            "ease" => Ok(EASE),
-            "linear" => Ok(LINEAR),
-            "ease-in" => Ok(EASE_IN),
-            "ease-out" => Ok(EASE_OUT),
-            "ease-in-out" => Ok(EASE_IN_OUT),
+            "ease" => Ok(ease()),
+            "linear" => Ok(linear()),
+            "ease-in" => Ok(ease_in()),
+            "ease-out" => Ok(ease_out()),
+            "ease-in-out" => Ok(ease_in_out()),
             "step-start" => Ok(STEP_START),
             "step-end" => Ok(STEP_END),
             _ => Err(())
         }
     }
 
     pub fn parse(_: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
         Ok(SpecifiedValue(try!(input.parse_comma_separated(parse_one))))
--- a/servo/components/style/viewport.rs
+++ b/servo/components/style/viewport.rs
@@ -550,23 +550,23 @@ impl<'a, I> ViewportDescriptorDeclaratio
 {
     #[inline]
     fn cascade(self) -> Vec<ViewportDescriptorDeclaration> {
         cascade(self)
     }
 }
 
 pub trait MaybeNew {
-    fn maybe_new(initial_viewport: TypedSize2D<ViewportPx, f32>,
+    fn maybe_new(initial_viewport: TypedSize2D<f32, ViewportPx>,
                      rule: &ViewportRule)
                      -> Option<ViewportConstraints>;
 }
 
 impl MaybeNew for ViewportConstraints {
-    fn maybe_new(initial_viewport: TypedSize2D<ViewportPx, f32>,
+    fn maybe_new(initial_viewport: TypedSize2D<f32, ViewportPx>,
                  rule: &ViewportRule)
                  -> Option<ViewportConstraints>
     {
         use std::cmp;
 
         if rule.declarations.is_empty() {
             return None
         }
@@ -634,18 +634,18 @@ impl MaybeNew for ViewportConstraints {
         if initial_zoom.is_some() {
             initial_zoom = max!(min_zoom, min!(max_zoom, initial_zoom));
         }
 
         // DEVICE-ADAPT § 6.2.3 Resolve non-auto lengths to pixel lengths
         //
         // Note: DEVICE-ADAPT § 5. states that relative length values are
         // resolved against initial values
-        let initial_viewport = Size2D::new(Au::from_f32_px(initial_viewport.width.get()),
-                                           Au::from_f32_px(initial_viewport.height.get()));
+        let initial_viewport = Size2D::new(Au::from_f32_px(initial_viewport.width),
+                                           Au::from_f32_px(initial_viewport.height));
 
 
         let context = Context {
             is_root_element: false,
             viewport_size: initial_viewport,
             inherited_style: ComputedValues::initial_values(),
             style: ComputedValues::initial_values().clone(),
         };
@@ -744,17 +744,17 @@ impl MaybeNew for ViewportConstraints {
             Au(0) => initial_viewport.height,
             initial_width => {
                 let ratio = initial_viewport.height.to_f32_px() / initial_width.to_f32_px();
                 Au::from_f32_px(width.to_f32_px() * ratio)
             }
         });
 
         Some(ViewportConstraints {
-            size: Size2D::typed(width.to_f32_px(), height.to_f32_px()),
+            size: TypedSize2D::new(width.to_f32_px(), height.to_f32_px()),
 
             // TODO: compute a zoom factor for 'auto' as suggested by DEVICE-ADAPT § 10.
             initial_zoom: ScaleFactor::new(initial_zoom.unwrap_or(1.)),
             min_zoom: min_zoom.map(ScaleFactor::new),
             max_zoom: max_zoom.map(ScaleFactor::new),
 
             user_zoom: user_zoom,
             orientation: orientation
--- a/servo/components/style_traits/Cargo.toml
+++ b/servo/components/style_traits/Cargo.toml
@@ -5,19 +5,19 @@ authors = ["The Servo Project Developers
 license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "style_traits"
 path = "lib.rs"
 
 [features]
-servo = ["heapsize", "heapsize_plugin", "serde", "serde_macros", "euclid/plugins",
+servo = ["heapsize", "heapsize_plugin", "serde", "serde_macros",
          "cssparser/heap_size", "cssparser/serde-serialization"]
 
 [dependencies]
 cssparser = "0.5.4"
-euclid = "0.7.1"
+euclid = "0.8.2"
 heapsize = {version = "0.3.0", optional = true}
 heapsize_plugin = {version = "0.1.2", optional = true}
 rustc-serialize = "0.3"
 serde = {version = "0.7.11", optional = true}
 serde_macros = {version = "0.7.11", optional = true}
--- a/servo/components/style_traits/viewport.rs
+++ b/servo/components/style_traits/viewport.rs
@@ -18,33 +18,33 @@ define_css_keyword_enum!(Orientation:
                          "auto" => Auto,
                          "portrait" => Portrait,
                          "landscape" => Landscape);
 
 
 #[derive(Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize, HeapSizeOf))]
 pub struct ViewportConstraints {
-    pub size: TypedSize2D<ViewportPx, f32>,
+    pub size: TypedSize2D<f32, ViewportPx>,
 
-    pub initial_zoom: ScaleFactor<PagePx, ViewportPx, f32>,
-    pub min_zoom: Option<ScaleFactor<PagePx, ViewportPx, f32>>,
-    pub max_zoom: Option<ScaleFactor<PagePx, ViewportPx, f32>>,
+    pub initial_zoom: ScaleFactor<f32, PagePx, ViewportPx>,
+    pub min_zoom: Option<ScaleFactor<f32, PagePx, ViewportPx>>,
+    pub max_zoom: Option<ScaleFactor<f32, PagePx, ViewportPx>>,
 
     pub user_zoom: UserZoom,
     pub orientation: Orientation
 }
 
 impl ToCss for ViewportConstraints {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write
     {
         try!(write!(dest, "@viewport {{"));
-        try!(write!(dest, " width: {}px;", self.size.width.get()));
-        try!(write!(dest, " height: {}px;", self.size.height.get()));
+        try!(write!(dest, " width: {}px;", self.size.width));
+        try!(write!(dest, " height: {}px;", self.size.height));
         try!(write!(dest, " zoom: {};", self.initial_zoom.get()));
         if let Some(min_zoom) = self.min_zoom {
             try!(write!(dest, " min-zoom: {};", min_zoom.get()));
         }
         if let Some(max_zoom) = self.max_zoom {
             try!(write!(dest, " max-zoom: {};", max_zoom.get()));
         }
         try!(write!(dest, " user-zoom: ")); try!(self.user_zoom.to_css(dest));
--- a/servo/components/util/Cargo.toml
+++ b/servo/components/util/Cargo.toml
@@ -7,22 +7,22 @@ publish = false
 
 [lib]
 name = "util"
 path = "lib.rs"
 
 [features]
 # servo as opposed to geckolib
 servo = ["serde", "serde_macros", "ipc-channel", "app_units/plugins",
-         "euclid/plugins", "euclid/unstable", "url/heap_size", "url/serde", "plugins"]
+         "euclid/unstable", "url/heap_size", "url/serde", "plugins"]
 
 [dependencies]
 app_units = "0.2.5"
 bitflags = "0.7"
-euclid = "0.7.1"
+euclid = "0.8.2"
 getopts = "0.2.11"
 heapsize = "0.3.0"
 ipc-channel = {version = "0.4.0", optional = true}
 lazy_static = "0.2"
 log = "0.3.5"
 num_cpus = "0.2.2"
 rustc-serialize = "0.3"
 serde = {version = "0.7.11", optional = true}
--- a/servo/components/util/geometry.rs
+++ b/servo/components/util/geometry.rs
@@ -27,26 +27,20 @@ use std::i32;
 pub enum ScreenPx {}
 
 known_heap_size!(0, ScreenPx);
 
 // An Au is an "App Unit" and represents 1/60th of a CSS pixel.  It was
 // originally proposed in 2002 as a standard unit of measure in Gecko.
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=177805 for more info.
 
-pub static MAX_RECT: Rect<Au> = Rect {
-    origin: Point2D {
-        x: Au(i32::MIN / 2),
-        y: Au(i32::MIN / 2),
-    },
-    size: Size2D {
-        width: MAX_AU,
-        height: MAX_AU,
-    }
-};
+#[inline(always)]
+pub fn max_rect() -> Rect<Au> {
+    Rect::new(Point2D::new(Au(i32::MIN / 2), Au(i32::MIN / 2)), Size2D::new(MAX_AU, MAX_AU))
+}
 
 /// A helper function to convert a rect of `f32` pixels to a rect of app units.
 pub fn f32_rect_to_au_rect(rect: Rect<f32>) -> Rect<Au> {
     Rect::new(Point2D::new(Au::from_f32_px(rect.origin.x), Au::from_f32_px(rect.origin.y)),
               Size2D::new(Au::from_f32_px(rect.size.width), Au::from_f32_px(rect.size.height)))
 }
 
 /// A helper function to convert a rect of `Au` pixels to a rect of f32 units.
--- a/servo/components/util/lib.rs
+++ b/servo/components/util/lib.rs
@@ -9,17 +9,17 @@
 #![cfg_attr(feature = "servo", plugin(serde_macros))]
 #![cfg_attr(feature = "servo", plugin(plugins))]
 
 #![deny(unsafe_code)]
 
 extern crate app_units;
 #[allow(unused_extern_crates)] #[macro_use] extern crate bitflags;
 extern crate core;
-extern crate euclid;
+#[macro_use] extern crate euclid;
 extern crate getopts;
 #[macro_use] extern crate heapsize;
 #[cfg(feature = "servo")] extern crate ipc_channel;
 #[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static;
 #[macro_use] extern crate log;
 extern crate num_cpus;
 extern crate rustc_serialize;
 #[cfg(feature = "servo")] extern crate serde;
--- a/servo/components/util/opts.rs
+++ b/servo/components/util/opts.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/. */
 
 //! Configuration options for a single run of the servo application. Created
 //! from command line arguments.
 
-use euclid::size::{Size2D, TypedSize2D};
+use euclid::size::TypedSize2D;
 use geometry::ScreenPx;
 use getopts::Options;
 use num_cpus;
 use prefs::{self, PrefValue, PREFS};
 use resource_files::set_resources_path;
 use std::cmp;
 use std::default::Default;
 use std::env;
@@ -131,17 +131,17 @@ pub struct Opts {
     /// remote Firefox devtools connections.
     pub devtools_port: Option<u16>,
 
     /// `None` to disable WebDriver or `Some` with a port number to start a server to listen to
     /// remote WebDriver commands.
     pub webdriver_port: Option<u16>,
 
     /// The initial requested size of the window.
-    pub initial_window_size: TypedSize2D<ScreenPx, u32>,
+    pub initial_window_size: TypedSize2D<u32, ScreenPx>,
 
     /// An optional string allowing the user agent to be set for testing.
     pub user_agent: String,
 
     /// Whether we're running in multiprocess mode.
     pub multiprocess: bool,
 
     /// Whether we're running inside the sandbox.
@@ -489,17 +489,17 @@ pub fn default_opts() -> Opts {
         show_debug_parallel_paint: false,
         show_debug_parallel_layout: false,
         paint_flashing: false,
         enable_text_antialiasing: false,
         enable_canvas_antialiasing: false,
         trace_layout: false,
         devtools_port: None,
         webdriver_port: None,
-        initial_window_size: Size2D::typed(1024, 740),
+        initial_window_size: TypedSize2D::new(1024, 740),
         user_agent: default_user_agent_string(DEFAULT_USER_AGENT),
         multiprocess: false,
         random_pipeline_closure_probability: None,
         random_pipeline_closure_seed: None,
         sandbox: false,
         dump_flow_tree: false,
         dump_display_list: false,
         dump_display_list_json: false,
@@ -717,20 +717,20 @@ pub fn from_cmdline_args(args: &[String]
         port.parse().unwrap_or_else(|err| args_fail(&format!("Error parsing option: --webdriver ({})", err)))
     });
 
     let initial_window_size = match opt_match.opt_str("resolution") {
         Some(res_string) => {
             let res: Vec<u32> = res_string.split('x').map(|r| {
                 r.parse().unwrap_or_else(|err| args_fail(&format!("Error parsing option: --resolution ({})", err)))
             }).collect();
-            Size2D::typed(res[0], res[1])
+            TypedSize2D::new(res[0], res[1])
         }
         None => {
-            Size2D::typed(1024, 740)
+            TypedSize2D::new(1024, 740)
         }
     };
 
     if opt_match.opt_present("M") {
         MULTIPROCESS.store(true, Ordering::SeqCst)
     }
 
     let user_agent = match opt_match.opt_str("u") {
--- a/servo/components/webdriver_server/Cargo.toml
+++ b/servo/components/webdriver_server/Cargo.toml
@@ -5,17 +5,17 @@ authors = ["The Servo Project Developers
 license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "webdriver_server"
 path = "lib.rs"
 
 [dependencies]
-euclid = "0.7.1"
+euclid = "0.8.2"
 hyper = "0.9.9"
 image = "0.10"
 ipc-channel = "0.4.0"
 log = "0.3.5"
 msg = {path = "../msg"}
 plugins = {path = "../plugins"}
 regex = "0.1.55"
 rustc-serialize = "0.3.4"
--- a/servo/components/webdriver_server/lib.rs
+++ b/servo/components/webdriver_server/lib.rs
@@ -384,17 +384,17 @@ impl Handler {
         let (sender, receiver) = ipc::channel().unwrap();
         let pipeline_id = try!(self.root_pipeline());
         let cmd_msg = WebDriverCommandMsg::GetWindowSize(pipeline_id, sender);
 
         self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
 
         let window_size = receiver.recv().unwrap();
         let vp = window_size.visible_viewport;
-        let window_size_response = WindowSizeResponse::new(vp.width.get() as u64, vp.height.get() as u64);
+        let window_size_response = WindowSizeResponse::new(vp.width as u64, vp.height as u64);
         Ok(WebDriverResponse::WindowSize(window_size_response))
     }
 
     fn handle_set_window_size(&self, params: &WindowSizeParameters) -> WebDriverResult<WebDriverResponse> {
         let (sender, receiver) = ipc::channel().unwrap();
         let size = Size2D::new(params.width as u32, params.height as u32);
         let pipeline_id = try!(self.root_pipeline());
         let cmd_msg = WebDriverCommandMsg::SetWindowSize(pipeline_id, size, sender.clone());
@@ -408,17 +408,17 @@ impl Handler {
             // which will give the current window size.
             thread::sleep(Duration::from_millis(timeout as u64));
             let cmd_msg = WebDriverCommandMsg::GetWindowSize(pipeline_id, sender);
             constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
         });
 
         let window_size = receiver.recv().unwrap();
         let vp = window_size.visible_viewport;
-        let window_size_response = WindowSizeResponse::new(vp.width.get() as u64, vp.height.get() as u64);
+        let window_size_response = WindowSizeResponse::new(vp.width as u64, vp.height as u64);
         Ok(WebDriverResponse::WindowSize(window_size_response))
     }
 
     fn handle_is_enabled(&self, element: &WebElement) -> WebDriverResult<WebDriverResponse> {
         let (sender, receiver) = ipc::channel().unwrap();
 
         try!(self.root_script_command(WebDriverScriptCommand::IsEnabled(element.id.clone(), sender)));
 
--- a/servo/ports/cef/Cargo.lock
+++ b/servo/ports/cef/Cargo.lock
@@ -1,19 +1,19 @@
 [root]
 name = "embedding"
 version = "0.0.1"
 dependencies = [
  "cocoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "compositing 0.0.1",
  "devtools 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glutin_app 0.0.1",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "objc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "script_traits 0.0.1",
  "servo 0.0.1",
@@ -71,32 +71,33 @@ dependencies = [
 
 [[package]]
 name = "aster"
 version = "0.22.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "azure"
-version = "0.4.6"
-source = "git+https://github.com/servo/rust-azure#4d72934a73820653986d9b11da759f5955a13e44"
+version = "0.6.2"
+source = "git+https://github.com/servo/rust-azure#6e028b5fafc1dad4cd48e233a9760cb67937d487"
 dependencies = [
+ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "backtrace"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -173,45 +174,45 @@ source = "git+https://github.com/browser
 name = "byteorder"
 version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "canvas"
 version = "0.0.1"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "canvas_traits 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "canvas_traits"
 version = "0.0.1"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "caseless"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -256,69 +257,69 @@ name = "color_quant"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "compositing"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "script_traits 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "webrender 0.1.0 (git+https://github.com/servo/webrender)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "constellation"
 version = "0.0.1"
 dependencies = [
  "backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas 0.0.1",
  "canvas_traits 0.0.1",
  "compositing 0.0.1",
  "devtools_traits 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/servo/gaol)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "layout_traits 0.0.1",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "script_traits 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "content-blocker"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -564,17 +565,17 @@ version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "euclid"
-version = "0.7.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -658,68 +659,68 @@ name = "getopts"
 version = "0.2.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "gfx"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "gfx_traits 0.0.1",
  "harfbuzz-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "ordered-float 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "range 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "simd 0.1.0 (git+https://github.com/huonw/simd)",
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
  "xi-unicode 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "gfx_traits"
 version = "0.0.1"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "msg 0.0.1",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "range 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -757,20 +758,20 @@ version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "glutin_app"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "compositing 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "script_traits 0.0.1",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -922,22 +923,22 @@ dependencies = [
 
 [[package]]
 name = "inflate"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "io-surface"
-version = "0.2.1"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "ipc-channel"
 version = "0.4.0"
@@ -989,46 +990,45 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "language-tags"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "layers"
-version = "0.2.6"
-source = "git+https://github.com/servo/rust-layers#79fca9ca5f2b7bded94dd34637a251967a9b0247"
+version = "0.3.1"
+source = "git+https://github.com/servo/rust-layers#c1965cf7a265f758c34e57413506f508969248a0"
 dependencies = [
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "layout"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1046,26 +1046,26 @@ dependencies = [
  "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "style_traits 0.0.1",
  "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "layout_thread"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.4.6 (git+https://github.com/servo/rust-azure)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.6.2 (git+https://github.com/servo/rust-azure)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layout 0.0.1",
  "layout_traits 0.0.1",
@@ -1077,32 +1077,32 @@ dependencies = [
  "script 0.0.1",
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
  "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "layout_traits"
 version = "0.0.1"
 dependencies = [
  "gfx 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "profile_traits 0.0.1",
  "script_traits 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "lazy_static"
 version = "0.1.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -1255,17 +1255,17 @@ dependencies = [
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "net"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "brotli 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1292,17 +1292,17 @@ dependencies = [
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "threadpool 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
  "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "net2"
 version = "0.2.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -1415,22 +1415,22 @@ dependencies = [
 
 [[package]]
 name = "odds"
 version = "0.2.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "offscreen_gl_context"
-version = "0.1.9"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -1722,34 +1722,34 @@ dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
  "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "js 0.1.3 (git+https://github.com/servo/rust-mozjs)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "mime_guess 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "open 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_macros 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "range 0.0.1",
  "ref_filter_map 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1764,30 +1764,30 @@ dependencies = [
  "string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "video-metadata 0.1.3 (git+https://github.com/GuillaumeGomez/video-metadata-rs)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
  "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "script_layout_interface"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
@@ -1805,26 +1805,26 @@ dependencies = [
 [[package]]
 name = "script_traits"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.6 (git+https://github.com/servo/rust-layers)",
+ "layers 0.3.1 (git+https://github.com/servo/rust-layers)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "net_traits 0.0.1",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "profile_traits 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_traits 0.0.1",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1899,17 +1899,17 @@ dependencies = [
  "browserhtml 0.1.15 (git+https://github.com/browserhtml/browserhtml?branch=crate)",
  "canvas 0.0.1",
  "canvas_traits 0.0.1",
  "compositing 0.0.1",
  "constellation 0.0.1",
  "devtools 0.0.1",
  "devtools_traits 0.0.1",
  "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gaol 0.0.1 (git+https://github.com/servo/gaol)",
  "gfx 0.0.1",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glutin_app 0.0.1",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layout 0.0.1",
  "layout_thread 0.0.1",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1923,51 +1923,52 @@ dependencies = [
  "script_layout_interface 0.0.1",
  "script_traits 0.0.1",
  "sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "util 0.0.1",
  "webdriver_server 0.0.1",
  "webrender 0.1.0 (git+https://github.com/servo/webrender)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "servo-egl"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-fontconfig"
-version = "0.2.0"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig-sys 2.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-fontconfig-sys"
-version = "2.11.3"
+version = "4.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-freetype-sys"
-version = "2.4.11"
+version = "4.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-glutin"
 version = "0.4.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -1992,29 +1993,30 @@ dependencies = [
  "wayland-kbd 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "wayland-window 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11-dl 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo-skia"
-version = "0.20130412.10"
+version = "0.20130412.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "io-surface 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-freetype-sys 4.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo-glutin 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "x11 2.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "shared_library"
 version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2074,17 +2076,17 @@ dependencies = [
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2105,17 +2107,17 @@ dependencies = [
  "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -2287,17 +2289,17 @@ version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "util"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2404,17 +2406,17 @@ dependencies = [
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webdriver_server"
 version = "0.0.1"
 dependencies = [
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "image 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "msg 0.0.1",
  "plugins 0.0.1",
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2423,50 +2425,50 @@ dependencies = [
  "util 0.0.1",
  "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender"
 version = "0.1.0"
-source = "git+https://github.com/servo/webrender#e2e8d91f24de961bfd6b53338e2403bc0c675aab"
+source = "git+https://github.com/servo/webrender#2c25e910b2a1f0399c57a077085d5cc3451f4499"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.2.0 (git+https://github.com/servo/webrender_traits)",
+ "webrender_traits 0.2.1 (git+https://github.com/servo/webrender_traits)",
 ]
 
 [[package]]
 name = "webrender_traits"
-version = "0.2.0"
-source = "git+https://github.com/servo/webrender_traits#a26ebe4da490cc1fb60d830c73cbefb135b768b1"
+version = "0.2.1"
+source = "git+https://github.com/servo/webrender_traits#75d40708694949a2e092ff4c344f952e3afbaa55"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "offscreen_gl_context 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_macros 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "websocket"
 version = "0.17.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
--- a/servo/ports/cef/Cargo.toml
+++ b/servo/ports/cef/Cargo.toml
@@ -12,17 +12,17 @@ crate-type = ["dylib"]
 opt-level = 3
 # Uncomment to profile on Linux:
 # debug = true
 # lto = false
 
 [dependencies]
 compositing = {path = "../../components/compositing"}
 devtools = {path = "../../components/devtools"}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gleam = "0.2.8"
 glutin_app = {path = "../glutin"}
 layers = {git = "https://github.com/servo/rust-layers"}
 libc = "0.2"
 log = {version = "0.3.5", features = ["release_max_level_info"]}
 msg = {path = "../../components/msg"}
 net_traits = {path = "../../components/net_traits"}
 plugins = {path = "../../components/plugins"}
--- a/servo/ports/cef/browser_host.rs
+++ b/servo/ports/cef/browser_host.rs
@@ -6,18 +6,18 @@ use browser::{self, ServoCefBrowserExten
 use eutil::Downcast;
 use interfaces::{CefBrowser, CefBrowserHost, CefClient, cef_browser_t, cef_browser_host_t, cef_client_t};
 use types::cef_event_flags_t::{EVENTFLAG_ALT_DOWN, EVENTFLAG_CONTROL_DOWN, EVENTFLAG_SHIFT_DOWN};
 use types::cef_key_event_type_t::{KEYEVENT_CHAR, KEYEVENT_KEYDOWN, KEYEVENT_KEYUP, KEYEVENT_RAWKEYDOWN};
 use types::{cef_mouse_button_type_t, cef_mouse_event, cef_rect_t, cef_key_event, cef_window_handle_t};
 use wrappers::CefWrap;
 
 use compositing::windowing::{WindowEvent, MouseWindowEvent};
-use euclid::point::Point2D;
-use euclid::size::Size2D;
+use euclid::point::TypedPoint2D;
+use euclid::size::TypedSize2D;
 use libc::{c_double, c_int};
 use msg::constellation_msg::{self, KeyModifiers, KeyState};
 use script_traits::{MouseButton, TouchEventType};
 use std::cell::{Cell, RefCell};
 use std::char;
 
 pub struct ServoCefBrowserHost {
     /// A reference to the browser.
@@ -379,17 +379,17 @@ full_cef_class_impl! {
                         .get_backing_rect(this.downcast().browser.borrow().clone().unwrap(), &mut rect);
                 }
             } else if check_ptr_exist!(this.get_client(), get_render_handler) &&
                check_ptr_exist!(this.get_client().get_render_handler(), get_view_rect) {
                 this.get_client()
                     .get_render_handler()
                     .get_view_rect(this.downcast().browser.borrow().clone().unwrap(), &mut rect);
                }
-            let size = Size2D::typed(rect.width as u32, rect.height as u32);
+            let size = TypedSize2D::new(rect.width as u32, rect.height as u32);
             this.downcast().send_window_event(WindowEvent::Resize(size));
         }}
 
         fn close_browser(&this, _force: c_int [c_int],) -> () {{
             browser::close(this.downcast().browser.borrow_mut().take().unwrap());
         }}
 
         fn send_focus_event(&this, focus: c_int [c_int],) -> () {{
@@ -438,44 +438,44 @@ full_cef_class_impl! {
             let event: &cef_mouse_event = event;
             let mouse_button_type: cef_mouse_button_type_t = mouse_button_type;
             let mouse_up: c_int = mouse_up;
             let button_type = match mouse_button_type {
                 cef_mouse_button_type_t::MBT_LEFT => MouseButton::Left,
                 cef_mouse_button_type_t::MBT_MIDDLE => MouseButton::Middle,
                 cef_mouse_button_type_t::MBT_RIGHT => MouseButton::Right,
             };
-            let point = Point2D::typed((*event).x as f32, (*event).y as f32);
+            let point = TypedPoint2D::new((*event).x as f32, (*event).y as f32);
             if mouse_up != 0 {
                 this.downcast().send_window_event(WindowEvent::MouseWindowEventClass(
                     MouseWindowEvent::Click(button_type, point)))
             } else {
                 this.downcast().send_window_event(WindowEvent::MouseWindowEventClass(
                     MouseWindowEvent::MouseUp(button_type, point)))
             }
         }}
 
         fn send_mouse_move_event(&this, event: *const cef_mouse_event [&cef_mouse_event],
                                  _mouse_exited: c_int [c_int],)
                                  -> () {{
             let event: &cef_mouse_event = event;
-            let point = Point2D::typed((*event).x as f32, (*event).y as f32);
+            let point = TypedPoint2D::new((*event).x as f32, (*event).y as f32);
             this.downcast().send_window_event(WindowEvent::MouseWindowMoveEventClass(point))
         }}
 
         fn send_mouse_wheel_event(&this,
                                   event: *const cef_mouse_event [&cef_mouse_event],
                                   delta_x: c_int [c_int],
                                   delta_y: c_int [c_int],)
                                   -> () {{
             let event: &cef_mouse_event = event;
             let delta_x: c_int = delta_x;
             let delta_y: c_int = delta_y;
-            let delta = Point2D::typed(delta_x as f32, delta_y as f32);
-            let origin = Point2D::typed((*event).x as i32, (*event).y as i32);
+            let delta = TypedPoint2D::new(delta_x as f32, delta_y as f32);
+            let origin = TypedPoint2D::new((*event).x as i32, (*event).y as i32);
             this.downcast().send_window_event(WindowEvent::Scroll(delta,
                                                                   origin,
                                                                   TouchEventType::Move))
         }}
 
         fn get_zoom_level(&this,) -> c_double {{
             this.downcast().pinch_zoom_level() as c_double
         }}
--- a/servo/ports/cef/window.rs
+++ b/servo/ports/cef/window.rs
@@ -44,17 +44,17 @@ use self::x11::xlib::{XInitThreads,XOpen
 
 #[cfg(target_os="linux")]
 pub static mut DISPLAY: *mut c_void = 0 as *mut c_void;
 
 /// The type of an off-screen window.
 #[derive(Clone)]
 pub struct Window {
     cef_browser: RefCell<Option<CefBrowser>>,
-    size: TypedSize2D<DevicePixel,u32>
+    size: TypedSize2D<u32, DevicePixel>
 }
 
 #[cfg(target_os="macos")]
 fn load_gl() {
     const RTLD_DEFAULT: *mut c_void = (-2isize) as usize as *mut c_void;
 
     extern {
         fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void;
@@ -84,17 +84,17 @@ fn load_gl() {
 
 impl Window {
     /// Creates a new window.
     pub fn new(width: u32, height: u32) -> Rc<Window> {
         load_gl();
 
         Rc::new(Window {
             cef_browser: RefCell::new(None),
-            size: Size2D::typed(width, height)
+            size: TypedSize2D::new(width, height)
         })
     }
 
     /// Sets the current browser.
     pub fn set_browser(&self, browser: CefBrowser) {
         *self.cef_browser.borrow_mut() = Some(browser)
     }
 
@@ -166,27 +166,27 @@ impl Window {
 
     #[cfg(not(target_os="macos"))]
     fn cursor_handle_for_cursor(&self, _: Cursor) -> cef_cursor_handle_t {
         0
     }
 }
 
 impl WindowMethods for Window {
-    fn framebuffer_size(&self) -> TypedSize2D<DevicePixel,u32> {
+    fn framebuffer_size(&self) -> TypedSize2D<u32, DevicePixel> {
         let browser = self.cef_browser.borrow();
         match *browser {
             None => self.size,
             Some(ref browser) => {
                 if browser.downcast().callback_executed.get() != true {
                     self.size
                 } else {
                     let mut rect = cef_rect_t::zero();
-                    rect.width = self.size.width.get() as i32;
-                    rect.height = self.size.height.get() as i32;
+                    rect.width = self.size.width as i32;
+                    rect.height = self.size.height as i32;
                     if cfg!(target_os="macos") {
                         // osx relies on virtual pixel scaling to provide sizes different from actual
                         // pixel size on screen. other platforms are just 1.0 unless the desktop/toolkit says otherwise
                         if check_ptr_exist!(browser.get_host().get_client(), get_render_handler) &&
                            check_ptr_exist!(browser.get_host().get_client().get_render_handler(), get_backing_rect) {
                             browser.get_host()
                                    .get_client()
                                    .get_render_handler()
@@ -197,33 +197,33 @@ impl WindowMethods for Window {
                            check_ptr_exist!(browser.get_host().get_client().get_render_handler(), get_view_rect) {
                             browser.get_host()
                                    .get_client()
                                    .get_render_handler()
                                    .get_view_rect((*browser).clone(), &mut rect);
                         }
                     }
 
-                    Size2D::typed(rect.width as u32, rect.height as u32)
+                    TypedSize2D::new(rect.width as u32, rect.height as u32)
                 }
             }
         }
     }
 
-    fn size(&self) -> TypedSize2D<ScreenPx,f32> {
+    fn size(&self) -> TypedSize2D<f32, ScreenPx> {
         let browser = self.cef_browser.borrow();
         match *browser {
-            None => Size2D::typed(400.0, 300.0),
+            None => TypedSize2D::new(400.0, 300.0),
             Some(ref browser) => {
                 let mut rect = cef_rect_t::zero();
                 browser.get_host()
                        .get_client()
                        .get_render_handler()
                        .get_view_rect((*browser).clone(), &mut rect);
-                Size2D::typed(rect.width as f32, rect.height as f32)
+                TypedSize2D::new(rect.width as f32, rect.height as f32)
             }
         }
     }
 
     fn client_window(&self) -> (Size2D<u32>, Point2D<i32>) {
         let size = self.size().to_untyped();
         let width = size.width as u32;
         let height = size.height as u32;
@@ -247,17 +247,17 @@ impl WindowMethods for Window {
                 if check_ptr_exist!(browser.get_host().get_client(), get_render_handler) &&
                    check_ptr_exist!(browser.get_host().get_client().get_render_handler(), on_present) {
                     browser.get_host().get_client().get_render_handler().on_present(browser.clone());
                    }
             }
         }
     }
 
-    fn scale_factor(&self) -> ScaleFactor<ScreenPx,DevicePixel,f32> {
+    fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
         if cfg!(target_os="macos") {
             let browser = self.cef_browser.borrow();
             match *browser {
                 None => ScaleFactor::new(1.0),
                 Some(ref browser) => {
                     let mut view_rect = cef_rect_t::zero();
                     if check_ptr_exist!(browser.get_host().get_client(), get_render_handler) &&
                        check_ptr_exist!(browser.get_host().get_client().get_render_handler(), get_view_rect) {
--- a/servo/ports/geckolib/Cargo.lock
+++ b/servo/ports/geckolib/Cargo.lock
@@ -1,15 +1,15 @@
 [root]
 name = "geckoservo"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "gecko_bindings 0.0.1",
  "gecko_string_cache 0.2.20",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "style 0.0.1",
@@ -135,17 +135,17 @@ version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "euclid"
-version = "0.7.1"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -349,17 +349,17 @@ dependencies = [
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "gecko_bindings 0.0.1",
  "gecko_string_cache 0.2.20",
  "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -376,17 +376,17 @@ dependencies = [
  "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "thread-id"
 version = "2.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -448,17 +448,17 @@ version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "util"
 version = "0.0.1"
 dependencies = [
  "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
  "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
--- a/servo/ports/geckolib/Cargo.toml
+++ b/servo/ports/geckolib/Cargo.toml
@@ -7,17 +7,17 @@ license = "MPL-2.0"
 [lib]
 name = "geckoservo"
 path = "lib.rs"
 crate-type = ["staticlib"]
 
 [dependencies]
 app_units = "0.2.5"
 env_logger = "0.3"
-euclid = "0.7.1"
+euclid = "0.8.2"
 gecko_bindings = {version = "0.0.1", path = "gecko_bindings"}
 gecko_string_cache = {path = "string_cache"}
 lazy_static = "0.2"
 libc = "0.2"
 log = {version = "0.3.5", features = ["release_max_level_info"]}
 num_cpus = "0.2.2"
 selectors = "0.8"
 style = {path = "../../components/style", features = ["gecko"]}
--- a/servo/ports/geckolib/data.rs
+++ b/servo/ports/geckolib/data.rs
@@ -1,13 +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/. */
 
-use euclid::Size2D;
 use euclid::size::TypedSize2D;
 use gecko_bindings::bindings::RawServoStyleSet;
 use num_cpus;
 use std::cmp;
 use std::collections::HashMap;
 use std::env;
 use std::sync::mpsc::{channel, Receiver, Sender};
 use std::sync::{Arc, RwLock};
@@ -51,17 +50,17 @@ lazy_static! {
             _ => cmp::max(num_cpus::get() * 3 / 4, 1),
         }
     };
 }
 
 impl PerDocumentStyleData {
     pub fn new() -> PerDocumentStyleData {
         // FIXME(bholley): Real window size.
-        let window_size: TypedSize2D<ViewportPx, f32> = Size2D::typed(800.0, 600.0);
+        let window_size: TypedSize2D<f32, ViewportPx> = TypedSize2D::new(800.0, 600.0);
         let device = Device::new(MediaType::Screen, window_size);
 
         let (new_anims_sender, new_anims_receiver) = channel();
 
         PerDocumentStyleData {
             stylist: Arc::new(Stylist::new(device)),
             stylesheets: vec![],
             stylesheets_changed: true,
--- a/servo/ports/glutin/Cargo.toml
+++ b/servo/ports/glutin/Cargo.toml
@@ -6,17 +6,17 @@ license = "MPL-2.0"
 
 [lib]
 name = "glutin_app"
 path = "lib.rs"
 
 [dependencies]
 bitflags = "0.7"
 compositing = {path = "../../components/compositing"}
-euclid = "0.7.1"
+euclid = "0.8.2"
 gleam = "0.2.8"
 layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
 log = "0.3.5"
 msg = {path = "../../components/msg"}
 net_traits = {path = "../../components/net_traits"}
 script_traits = {path = "../../components/script_traits"}
 servo-glutin = "0.4"
 style_traits = {path = "../../components/style_traits"}
--- a/servo/ports/glutin/window.rs
+++ b/servo/ports/glutin/window.rs
@@ -5,17 +5,17 @@
 //! A windowing implementation using glutin.
 
 use NestedEventLoopListener;
 use compositing::compositor_thread::{self, CompositorProxy, CompositorReceiver};
 use compositing::windowing::{MouseWindowEvent, WindowNavigateMsg};
 use compositing::windowing::{WindowEvent, WindowMethods};
 use euclid::scale_factor::ScaleFactor;
 use euclid::size::TypedSize2D;
-use euclid::{Size2D, Point2D};
+use euclid::{Size2D, Point2D, TypedPoint2D};
 #[cfg(target_os = "windows")] use gdi32;
 use gleam::gl;
 use glutin;
 #[cfg(target_os = "macos")]
 use glutin::os::macos::{ActivationPolicy, WindowBuilderExt};
 use glutin::{Api, ElementState, Event, GlRequest, MouseButton, VirtualKeyCode, MouseScrollDelta};
 use glutin::{ScanCode, TouchPhase};
 use layers::geometry::DevicePixel;
@@ -103,33 +103,33 @@ pub struct Window {
     /// The contents of the last ReceivedCharacter event for use in a subsequent KeyEvent.
     pending_key_event_char: Cell<Option<char>>,
     /// The list of keys that have been pressed but not yet released, to allow providing
     /// the equivalent ReceivedCharacter data as was received for the press event.
     pressed_key_map: RefCell<Vec<(ScanCode, char)>>,
 }
 
 #[cfg(not(target_os = "windows"))]
-fn window_creation_scale_factor() -> ScaleFactor<ScreenPx, DevicePixel, f32> {
+fn window_creation_scale_factor() -> ScaleFactor<f32, ScreenPx, DevicePixel> {
     ScaleFactor::new(1.0)
 }
 
 #[cfg(target_os = "windows")]
-fn window_creation_scale_factor() -> ScaleFactor<ScreenPx, DevicePixel, f32> {
+fn window_creation_scale_factor() -> ScaleFactor<f32, ScreenPx, DevicePixel> {
         let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) };
         let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) };
         ScaleFactor::new(ppi as f32 / 96.0)
 }
 
 
 impl Window {
     pub fn new(is_foreground: bool,
-               window_size: TypedSize2D<ScreenPx, u32>,
+               window_size: TypedSize2D<u32, ScreenPx>,
                parent: Option<glutin::WindowID>) -> Rc<Window> {
-        let win_size: TypedSize2D<DevicePixel, u32> =
+        let win_size: TypedSize2D<u32, DevicePixel> =
             (window_size.as_f32() * window_creation_scale_factor())
             .as_uint().cast().expect("Window size should fit in u32");
         let width = win_size.to_untyped().width;
         let height = win_size.to_untyped().height;
 
         // If there's no chrome, start off with the window invisible. It will be set to visible in
         // `load_end()`. This avoids an ugly flash of unstyled content (especially important since
         // unstyled content is white and chrome often has a transparent background). See issue
@@ -198,17 +198,17 @@ impl Window {
     }
 
     fn nested_window_resize(width: u32, height: u32) {
         unsafe {
             match g_nested_event_loop_listener {
                 None => {}
                 Some(listener) => {
                     (*listener).handle_event_from_nested_event_loop(
-                        WindowEvent::Resize(Size2D::typed(width, height)));
+                        WindowEvent::Resize(TypedSize2D::new(width, height)));
                 }
             }
         }
     }
 
     #[cfg(not(target_os = "android"))]
     fn gl_version() -> GlRequest {
         if opts::get().use_webrender {
@@ -292,59 +292,59 @@ impl Window {
                     let modifiers = Window::glutin_mods_to_script_mods(self.key_modifiers.get());
                     self.event_queue.borrow_mut().push(WindowEvent::KeyEvent(ch, key, state, modifiers));
                 }
             }
             Event::KeyboardInput(_, _, None) => {
                 debug!("Keyboard input without virtual key.");
             }
             Event::Resized(width, height) => {
-                self.event_queue.borrow_mut().push(WindowEvent::Resize(Size2D::typed(width, height)));
+                self.event_queue.borrow_mut().push(WindowEvent::Resize(TypedSize2D::new(width, height)));
             }
             Event::MouseInput(element_state, mouse_button, pos) => {
                 if mouse_button == MouseButton::Left ||
                    mouse_button == MouseButton::Right {
                     match pos {
                         Some((x, y)) => {
                             self.mouse_pos.set(Point2D::new(x, y));
                             self.event_queue.borrow_mut().push(
-                                WindowEvent::MouseWindowMoveEventClass(Point2D::typed(x as f32, y as f32)));
+                                WindowEvent::MouseWindowMoveEventClass(TypedPoint2D::new(x as f32, y as f32)));
                             self.handle_mouse(mouse_button, element_state, x, y);
                         }
                         None => {
                             let mouse_pos = self.mouse_pos.get();
                             self.handle_mouse(mouse_button, element_state, mouse_pos.x, mouse_pos.y);
                         }
                     }
                 }
             }
             Event::MouseMoved(x, y) => {
                 self.mouse_pos.set(Point2D::new(x, y));
                 self.event_queue.borrow_mut().push(
-                    WindowEvent::MouseWindowMoveEventClass(Point2D::typed(x as f32, y as f32)));
+                    WindowEvent::MouseWindowMoveEventClass(TypedPoint2D::new(x as f32, y as f32)));
             }
             Event::MouseWheel(delta, phase) => {
                 let (dx, dy) = match delta {
                     MouseScrollDelta::LineDelta(dx, dy) => (dx, dy * LINE_HEIGHT),
                     MouseScrollDelta::PixelDelta(dx, dy) => (dx, dy),
                 };
                 let phase = glutin_phase_to_touch_event_type(phase);
                 self.scroll_window(dx, dy, phase);
             },
             Event::Touch(touch) => {
                 use script_traits::TouchId;
 
                 let phase = glutin_phase_to_touch_event_type(touch.phase);
                 let id = TouchId(touch.id as i32);
-                let point = Point2D::typed(touch.location.0 as f32, touch.location.1 as f32);
+                let point = TypedPoint2D::new(touch.location.0 as f32, touch.location.1 as f32);
                 self.event_queue.borrow_mut().push(WindowEvent::Touch(phase, id, point));
             }
             Event::TouchpadPressure(pressure, stage) => {
                 let m = self.mouse_pos.get();
-                let point = Point2D::typed(m.x as f32, m.y as f32);
+                let point = TypedPoint2D::new(m.x as f32, m.y as f32);
                 let phase = glutin_pressure_stage_to_touchpad_pressure_phase(stage);
                 self.event_queue.borrow_mut().push(WindowEvent::TouchpadPressure(point, pressure, phase));
             }
             Event::Refresh => {
                 self.event_queue.borrow_mut().push(WindowEvent::Refresh);
             }
             Event::Closed => {
                 return true
@@ -366,45 +366,46 @@ impl Window {
         // Scroll events snap to the major axis of movement, with vertical
         // preferred over horizontal.
         if dy.abs() >= dx.abs() {
             dx = 0.0;
         } else {
             dy = 0.0;
         }
         let mouse_pos = self.mouse_pos.get();
-        let event = WindowEvent::Scroll(Point2D::typed(dx as f32, dy as f32),
-                                        Point2D::typed(mouse_pos.x as i32, mouse_pos.y as i32),
+        let event = WindowEvent::Scroll(TypedPoint2D::new(dx as f32, dy as f32),
+                                        TypedPoint2D::new(mouse_pos.x as i32, mouse_pos.y as i32),
                                         phase);
         self.event_queue.borrow_mut().push(event);
     }
 
     /// Helper function to handle a click
     fn handle_mouse(&self, button: glutin::MouseButton, action: glutin::ElementState, x: i32, y: i32) {
         use script_traits::MouseButton;
 
         // FIXME(tkuehn): max pixel dist should be based on pixel density
         let max_pixel_dist = 10f64;
         let event = match action {
             ElementState::Pressed => {
                 self.mouse_down_point.set(Point2D::new(x, y));
                 self.mouse_down_button.set(Some(button));
-                MouseWindowEvent::MouseDown(MouseButton::Left, Point2D::typed(x as f32, y as f32))
+                MouseWindowEvent::MouseDown(MouseButton::Left, TypedPoint2D::new(x as f32, y as f32))
             }
             ElementState::Released => {
-                let mouse_up_event = MouseWindowEvent::MouseUp(MouseButton::Left, Point2D::typed(x as f32, y as f32));
+                let mouse_up_event = MouseWindowEvent::MouseUp(MouseButton::Left,
+                                                               TypedPoint2D::new(x as f32, y as f32));
                 match self.mouse_down_button.get() {
                     None => mouse_up_event,
                     Some(but) if button == but => {
                         let pixel_dist = self.mouse_down_point.get() - Point2D::new(x, y);
                         let pixel_dist = ((pixel_dist.x * pixel_dist.x +
                                            pixel_dist.y * pixel_dist.y) as f64).sqrt();
                         if pixel_dist < max_pixel_dist {
                             self.event_queue.borrow_mut().push(WindowEvent::MouseWindowEventClass(mouse_up_event));
-                            MouseWindowEvent::Click(MouseButton::Left, Point2D::typed(x as f32, y as f32))
+                            MouseWindowEvent::Click(MouseButton::Left, TypedPoint2D::new(x as f32, y as f32))
                         } else {
                             mouse_up_event
                         }
                     },
                     Some(_) => mouse_up_event,
                 }
             }
         };
@@ -666,27 +667,27 @@ fn create_window_proxy(_: &Window) -> Op
 }
 
 #[cfg(not(target_os = "android"))]
 fn create_window_proxy(window: &Window) -> Option<glutin::WindowProxy> {
     Some(window.window.create_window_proxy())
 }
 
 impl WindowMethods for Window {
-    fn framebuffer_size(&self) -> TypedSize2D<DevicePixel, u32> {
+    fn framebuffer_size(&self) -> TypedSize2D<u32, DevicePixel> {
         let scale_factor = self.window.hidpi_factor() as u32;
         // TODO(ajeffrey): can this fail?
         let (width, height) = self.window.get_inner_size().expect("Failed to get window inner size.");
-        Size2D::typed(width * scale_factor, height * scale_factor)
+        TypedSize2D::new(width * scale_factor, height * scale_factor)
     }
 
-    fn size(&self) -> TypedSize2D<ScreenPx, f32> {
+    fn size(&self) -> TypedSize2D<f32, ScreenPx> {
         // TODO(ajeffrey): can this fail?
         let (width, height) = self.window.get_inner_size().expect("Failed to get window inner size.");
-        Size2D::typed(width as f32, height as f32)
+        TypedSize2D::new(width as f32, height as f32)
     }
 
     fn client_window(&self) -> (Size2D<u32>, Point2D<i32>) {
         // TODO(ajeffrey): can this fail?
         let (width, height) = self.window.get_outer_size().expect("Failed to get window outer size.");
         let size = Size2D::new(width, height);
         // TODO(ajeffrey): can this fail?
         let (x, y) = self.window.get_position().expect("Failed to get window position.");
@@ -717,22 +718,22 @@ impl WindowMethods for Window {
         (box GlutinCompositorProxy {
              sender: sender,
              window_proxy: window_proxy,
          } as Box<CompositorProxy + Send>,
          box receiver as Box<CompositorReceiver>)
     }
 
     #[cfg(not(target_os = "windows"))]
-    fn scale_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32> {
+    fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
         ScaleFactor::new(self.window.hidpi_factor())
     }
 
     #[cfg(target_os = "windows")]
-    fn scale_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32> {
+    fn scale_factor(&self) -> ScaleFactor<f32, ScreenPx, DevicePixel> {
         let hdc = unsafe { user32::GetDC(::std::ptr::null_mut()) };
         let ppi = unsafe { gdi32::GetDeviceCaps(hdc, winapi::wingdi::LOGPIXELSY) };
         ScaleFactor::new(ppi as f32 / 96.0)
     }
 
     fn set_page_title(&self, title: Option<String>) {
         let fallback_title: String = if let Some(ref current_url) = *self.current_url.borrow() {
             current_url.to_string()
--- a/servo/tests/unit/style/Cargo.toml
+++ b/servo/tests/unit/style/Cargo.toml
@@ -7,16 +7,16 @@ license = "MPL-2.0"
 [lib]
 name = "style_tests"
 path = "lib.rs"
 doctest = false
 
 [dependencies]
 app_units = "0.2.5"
 cssparser = {version = "0.5.4", features = ["heap_size"]}
-euclid = "0.7.1"
+euclid = "0.8.2"
 rustc-serialize = "0.3"
 selectors = {version = "0.8", features = ["heap_size"]}
 string_cache = {version = "0.2", features = ["heap_size"]}
 style = {path = "../../../components/style"}
 style_traits = {path = "../../../components/style_traits"}
 url = {version = "1.0.0", features = ["heap_size"]}
 util = {path = "../../../components/util"}
--- a/servo/tests/unit/style/media_queries.rs
+++ b/servo/tests/unit/style/media_queries.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use app_units::Au;
 use cssparser::{Parser, SourcePosition};
-use euclid::size::Size2D;
+use euclid::size::TypedSize2D;
 use std::borrow::ToOwned;
 use style::error_reporting::ParseErrorReporter;
 use style::media_queries::*;
 use style::parser::ParserContextExtraData;
 use style::stylesheets::{Stylesheet, Origin, CSSRuleIteratorExt};
 use style::values::specified;
 use url::Url;
 
@@ -357,17 +357,17 @@ fn test_mq_malformed_expressions() {
         assert!(q1.expressions.len() == 0, css.to_owned());
     });
 }
 
 #[test]
 fn test_matching_simple() {
     let device = Device {
         media_type: MediaType::Screen,
-        viewport_size: Size2D::typed(200.0, 100.0),
+        viewport_size: TypedSize2D::new(200.0, 100.0),
     };
 
     media_query_test(&device, "@media not all { a { color: red; } }", 0);
     media_query_test(&device, "@media not screen { a { color: red; } }", 0);
     media_query_test(&device, "@media not print { a { color: red; } }", 1);
 
     media_query_test(&device, "@media unknown { a { color: red; } }", 0);
     media_query_test(&device, "@media not unknown { a { color: red; } }", 1);
@@ -376,17 +376,17 @@ fn test_matching_simple() {
     media_query_test(&device, "@media screen { a { color: red; } }", 1);
     media_query_test(&device, "@media print { a { color: red; } }", 0);
 }
 
 #[test]
 fn test_matching_width() {
     let device = Device {
         media_type: MediaType::Screen,
-        viewport_size: Size2D::typed(200.0, 100.0),
+        viewport_size: TypedSize2D::new(200.0, 100.0),
     };
 
     media_query_test(&device, "@media { a { color: red; } }", 1);
 
     media_query_test(&device, "@media (min-width: 50px) { a { color: red; } }", 1);
     media_query_test(&device, "@media (min-width: 150px) { a { color: red; } }", 1);
     media_query_test(&device, "@media (min-width: 300px) { a { color: red; } }", 0);
 
@@ -420,15 +420,15 @@ fn test_matching_width() {
     media_query_test(
         &device, "@media not screen and (min-width: 3em) and (max-width: 250px) { a { color: red; } }", 0);
 }
 
 #[test]
 fn test_matching_invalid() {
     let device = Device {
         media_type: MediaType::Screen,
-        viewport_size: Size2D::typed(200.0, 100.0),
+        viewport_size: TypedSize2D::new(200.0, 100.0),
     };
 
     media_query_test(&device, "@media fridge { a { color: red; } }", 0);
     media_query_test(&device, "@media screen and (height: 100px) { a { color: red; } }", 0);
     media_query_test(&device, "@media not print and (width: 100) { a { color: red; } }", 0);
 }
--- a/servo/tests/unit/style/viewport.rs
+++ b/servo/tests/unit/style/viewport.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use cssparser::Parser;
 use euclid::scale_factor::ScaleFactor;
-use euclid::size::Size2D;
+use euclid::size::TypedSize2D;
 use media_queries::CSSErrorReporterTest;
 use style::error_reporting::ParseErrorReporter;
 use style::media_queries::{Device, MediaType};
 use style::parser::{ParserContext, ParserContextExtraData};
 use style::stylesheets::{Stylesheet, Origin, CSSRuleIteratorExt};
 use style::values::specified::Length::{self, ViewportPercentage};
 use style::values::specified::LengthOrPercentageOrAuto::{self, Auto};
 use style::values::specified::ViewportPercentageLength::Vw;
@@ -79,17 +79,17 @@ macro_rules! viewport_length {
     };
     ($value:expr, vw) => {
         ViewportLength::Specified(LengthOrPercentageOrAuto::Length(ViewportPercentage(Vw($value))))
     }
 }
 
 #[test]
 fn empty_viewport_rule() {
-    let device = Device::new(MediaType::Screen, Size2D::typed(800., 600.));
+    let device = Device::new(MediaType::Screen, TypedSize2D::new(800., 600.));
 
     test_viewport_rule("@viewport {}", &device, |declarations, css| {
         println!("{}", css);
         assert_decl_len!(declarations == 0);
     });
 }
 
 macro_rules! assert_decl_eq {
@@ -102,17 +102,17 @@ macro_rules! assert_decl_eq {
         assert_eq!($d.origin, Origin::$origin);
         assert_eq!($d.descriptor, ViewportDescriptor::$expected($value));
         assert!($d.important == true, "descriptor should be !important");
     }};
 }
 
 #[test]
 fn simple_viewport_rules() {
-    let device = Device::new(MediaType::Screen, Size2D::typed(800., 600.));
+    let device = Device::new(MediaType::Screen, TypedSize2D::new(800., 600.));
 
     test_viewport_rule("@viewport { width: auto; height: auto;\
                                     zoom: auto; min-zoom: 0; max-zoom: 200%;\
                                     user-zoom: zoom; orientation: auto; }",
                        &device, |declarations, css| {
         println!("{}", css);
         assert_decl_len!(declarations == 9);
         assert_decl_eq!(&declarations[0], Author, MinWidth: ViewportLength::Specified(Auto));
@@ -174,17 +174,17 @@ fn simple_meta_viewport_contents() {
         assert_decl_eq!(&declarations[1], Author, MaxWidth: viewport_length!(480., px));
         assert_decl_eq!(&declarations[2], Author, Zoom: Zoom::Number(2.));
         assert_decl_eq!(&declarations[3], Author, UserZoom: UserZoom::Zoom);
     });
 }
 
 #[test]
 fn cascading_within_viewport_rule() {
-    let device = Device::new(MediaType::Screen, Size2D::typed(800., 600.));
+    let device = Device::new(MediaType::Screen, TypedSize2D::new(800., 600.));
 
     // normal order of appearance
     test_viewport_rule("@viewport { min-width: 200px; min-width: auto; }",
                        &device, |declarations, css| {
         println!("{}", css);
         assert_decl_len!(declarations == 1);
         assert_decl_eq!(&declarations[0], Author, MinWidth: ViewportLength::Specified(Auto));
     });
@@ -241,17 +241,17 @@ fn cascading_within_viewport_rule() {
         assert_decl_eq!(&declarations[1], Author, MaxWidth: ViewportLength::Specified(Auto), !important);
     });
 }
 
 #[test]
 fn multiple_stylesheets_cascading() {
     ::util::prefs::PREFS.set("layout.viewport.enabled",
                              ::util::prefs::PrefValue::Boolean(true));
-    let device = Device::new(MediaType::Screen, Size2D::typed(800., 600.));
+    let device = Device::new(MediaType::Screen, TypedSize2D::new(800., 600.));
     let error_reporter = CSSErrorReporterTest;
     let stylesheets = vec![
         stylesheet!("@viewport { min-width: 100px; min-height: 100px; zoom: 1; }", UserAgent, error_reporter.clone()),
         stylesheet!("@viewport { min-width: 200px; min-height: 200px; }", User, error_reporter.clone()),
         stylesheet!("@viewport { min-width: 300px; }", Author, error_reporter.clone())];
 
     let declarations = stylesheets.iter()
         .flat_map(|s| s.effective_rules(&device).viewport())
@@ -284,60 +284,60 @@ fn constrain_viewport() {
     let context = ParserContext::new(Origin::Author, &url, Box::new(CSSErrorReporterTest));
 
     macro_rules! from_css {
         ($css:expr) => {
             &ViewportRule::parse(&mut Parser::new($css), &context).unwrap()
         }
     }
 
-    let initial_viewport = Size2D::typed(800., 600.);
+    let initial_viewport = TypedSize2D::new(800., 600.);
     assert_eq!(ViewportConstraints::maybe_new(initial_viewport, from_css!("")),
                None);
 
-    let initial_viewport = Size2D::typed(800., 600.);
+    let initial_viewport = TypedSize2D::new(800., 600.);
     assert_eq!(ViewportConstraints::maybe_new(initial_viewport, from_css!("width: 320px auto")),
                Some(ViewportConstraints {
                    size: initial_viewport,
 
                    initial_zoom: ScaleFactor::new(1.),
                    min_zoom: None,
                    max_zoom: None,
 
                    user_zoom: UserZoom::Zoom,
                    orientation: Orientation::Auto
                }));
 
-    let initial_viewport = Size2D::typed(200., 150.);
+    let initial_viewport = TypedSize2D::new(200., 150.);
     assert_eq!(ViewportConstraints::maybe_new(initial_viewport, from_css!("width: 320px auto")),
                Some(ViewportConstraints {
-                   size: Size2D::typed(320., 240.),
+                   size: TypedSize2D::new(320., 240.),
 
                    initial_zoom: ScaleFactor::new(1.),
                    min_zoom: None,
                    max_zoom: None,
 
                    user_zoom: UserZoom::Zoom,
                    orientation: Orientation::Auto
                }));
 
-    let initial_viewport = Size2D::typed(800., 600.);
+    let initial_viewport = TypedSize2D::new(800., 600.);
     assert_eq!(ViewportConstraints::maybe_new(initial_viewport, from_css!("width: 320px auto")),
                Some(ViewportConstraints {
                    size: initial_viewport,
 
                    initial_zoom: ScaleFactor::new(1.),
                    min_zoom: None,
                    max_zoom: None,
 
                    user_zoom: UserZoom::Zoom,
                    orientation: Orientation::Auto
                }));
 
-    let initial_viewport = Size2D::typed(800., 600.);
+    let initial_viewport = TypedSize2D::new(800., 600.);
     assert_eq!(ViewportConstraints::maybe_new(initial_viewport, from_css!("width: 800px; height: 600px;\
                                                                      zoom: 1;\
                                                                      user-zoom: zoom;\
                                                                      orientation: auto;")),
                Some(ViewportConstraints {
                    size: initial_viewport,
 
                    initial_zoom: ScaleFactor::new(1.),