aboutsummaryrefslogtreecommitdiffstats
path: root/components/msg
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-02 12:45:28 +0100
committerJosh Matthews <josh@joshmatthews.net>2015-01-08 09:58:46 -0500
commit16c7060bc8ff91527ae97f8a3feee5706747b9c5 (patch)
tree0cc29f2cc50c729d3a8f9521a22991fad67b9afd /components/msg
parentcf616b90a236f88058dbad74b568b4d4379d2829 (diff)
downloadservo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.tar.gz
servo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.zip
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
Diffstat (limited to 'components/msg')
-rw-r--r--components/msg/compositor_msg.rs11
-rw-r--r--components/msg/constellation_msg.rs19
2 files changed, 17 insertions, 13 deletions
diff --git a/components/msg/compositor_msg.rs b/components/msg/compositor_msg.rs
index 9d280cef673..2b220652a03 100644
--- a/components/msg/compositor_msg.rs
+++ b/components/msg/compositor_msg.rs
@@ -14,13 +14,13 @@ use std::fmt;
use constellation_msg::PipelineId;
/// The status of the painter.
-#[deriving(PartialEq, Clone)]
+#[deriving(PartialEq, Eq, Clone, Copy)]
pub enum PaintState {
Idle,
Painting,
}
-#[deriving(Eq, Ord, PartialEq, PartialOrd, Clone, Show)]
+#[deriving(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Copy)]
pub enum ReadyState {
/// Informs the compositor that nothing has been done yet. Used for setting status
Blank,
@@ -33,7 +33,7 @@ pub enum ReadyState {
}
/// A newtype struct for denoting the age of messages; prevents race conditions.
-#[deriving(PartialEq, Show)]
+#[deriving(PartialEq, Eq, Show, Copy)]
pub struct Epoch(pub uint);
impl Epoch {
@@ -43,7 +43,7 @@ impl Epoch {
}
}
-#[deriving(Clone, PartialEq)]
+#[deriving(Clone, PartialEq, Eq, Copy)]
pub struct LayerId(pub uint, pub uint);
impl Show for LayerId {
@@ -61,7 +61,7 @@ impl LayerId {
}
/// The scrolling policy of a layer.
-#[deriving(Clone, PartialEq)]
+#[deriving(Clone, PartialEq, Eq, Copy)]
pub enum ScrollPolicy {
/// These layers scroll when the parent receives a scrolling message.
Scrollable,
@@ -71,6 +71,7 @@ pub enum ScrollPolicy {
/// All layer-specific information that the painting task sends to the compositor other than the
/// buffer contents of the layer itself.
+#[deriving(Copy)]
pub struct LayerMetadata {
/// An opaque ID. This is usually the address of the flow and index of the box within it.
pub id: LayerId,
diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs
index 023df2ccae0..cbd6062f724 100644
--- a/components/msg/constellation_msg.rs
+++ b/components/msg/constellation_msg.rs
@@ -26,19 +26,20 @@ impl ConstellationChan {
}
}
-#[deriving(PartialEq)]
+#[deriving(PartialEq, Eq, Copy)]
pub enum IFrameSandboxState {
IFrameSandboxed,
IFrameUnsandboxed
}
// We pass this info to various tasks, so it lives in a separate, cloneable struct.
-#[deriving(Clone)]
+#[deriving(Clone, Copy)]
pub struct Failure {
pub pipeline_id: PipelineId,
pub subpage_id: Option<SubpageId>,
}
+#[deriving(Copy)]
pub struct WindowSizeData {
/// The size of the initial layout viewport, before parsing an
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
@@ -51,7 +52,7 @@ pub struct WindowSizeData {
pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
}
-#[deriving(PartialEq)]
+#[deriving(PartialEq, Eq, Copy, Clone)]
pub enum KeyState {
Pressed,
Released,
@@ -59,7 +60,7 @@ pub enum KeyState {
}
//N.B. Straight up copied from glfw-rs
-#[deriving(Show)]
+#[deriving(Show, PartialEq, Eq, Copy, Clone)]
pub enum Key {
Space,
Apostrophe,
@@ -185,6 +186,7 @@ pub enum Key {
}
bitflags! {
+ #[deriving(Copy)]
flags KeyModifiers: u8 {
const SHIFT = 0x01,
const CONTROL = 0x02,
@@ -236,26 +238,27 @@ impl LoadData {
}
/// Represents the two different ways to which a page can be navigated
-#[deriving(Clone, PartialEq, Hash, Show)]
+#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub enum NavigationType {
Load, // entered or clicked on a url
Navigate, // browser forward/back buttons
}
-#[deriving(Clone, PartialEq, Hash, Show)]
+#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub enum NavigationDirection {
Forward,
Back,
}
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub struct PipelineId(pub uint);
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub struct SubpageId(pub uint);
// The type of pipeline exit. During complete shutdowns, pipelines do not have to
// release resources automatically released on process termination.
+#[deriving(Copy)]
pub enum PipelineExitType {
PipelineOnly,
Complete,