aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/geometry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/geometry.rs')
-rw-r--r--components/util/geometry.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/util/geometry.rs b/components/util/geometry.rs
index 1191edba02a..5c3ee808b43 100644
--- a/components/util/geometry.rs
+++ b/components/util/geometry.rs
@@ -29,7 +29,7 @@ use std::fmt;
///
/// The ratio between ScreenPx and DevicePixel for a given display be found by calling
/// `servo::windowing::WindowMethods::hidpi_factor`.
-#[deriving(Show)]
+#[deriving(Show, Copy)]
pub enum ScreenPx {}
/// One CSS "px" in the coordinate system of the "initial viewport":
@@ -41,7 +41,7 @@ pub enum ScreenPx {}
///
/// At the default zoom level of 100%, one PagePx is equal to one ScreenPx. However, if the
/// document is zoomed in or out then this scale may be larger or smaller.
-#[deriving(Encodable, Show)]
+#[deriving(Encodable, Show, Copy)]
pub enum ViewportPx {}
/// One CSS "px" in the root coordinate system for the content document.
@@ -50,7 +50,7 @@ pub enum ViewportPx {}
/// This is the mobile-style "pinch zoom" that enlarges content without reflowing it. When the
/// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size
/// as the viewable area.
-#[deriving(Encodable, Show)]
+#[deriving(Encodable, Show, Copy)]
pub enum PagePx {}
// In summary, the hierarchy of pixel units and the factors to convert from one to the next:
@@ -65,7 +65,7 @@ pub enum PagePx {}
// See https://bugzilla.mozilla.org/show_bug.cgi?id=177805 for more info.
//
// FIXME: Implement Au using Length and ScaleFactor instead of a custom type.
-#[deriving(Clone, Hash, PartialEq, PartialOrd, Eq, Ord, Zero)]
+#[deriving(Clone, Copy, Hash, PartialEq, PartialOrd, Eq, Ord)]
pub struct Au(pub i32);
impl Default for Au {