aboutsummaryrefslogtreecommitdiffstats
path: root/components/msg
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2015-01-15 13:26:44 -0500
committerGlenn Watson <gw@intuitionlibrary.com>2015-01-28 10:16:49 +1000
commit95fc29fa0db21959df99d81cdbb9561226321d2f (patch)
treea48e171165ec155062ef13c550b2c0f72d127425 /components/msg
parentff8cbff81016c157373c1675f3eee69dd70ae544 (diff)
downloadservo-95fc29fa0db21959df99d81cdbb9561226321d2f.tar.gz
servo-95fc29fa0db21959df99d81cdbb9561226321d2f.zip
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
Diffstat (limited to 'components/msg')
-rw-r--r--components/msg/Cargo.toml4
-rw-r--r--components/msg/compositor_msg.rs14
-rw-r--r--components/msg/constellation_msg.rs27
-rw-r--r--components/msg/lib.rs2
4 files changed, 24 insertions, 23 deletions
diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml
index 460a277a7a7..2bd553491d9 100644
--- a/components/msg/Cargo.toml
+++ b/components/msg/Cargo.toml
@@ -33,5 +33,5 @@ git = "https://github.com/servo/rust-core-foundation"
[dependencies.io_surface]
git = "https://github.com/servo/rust-io-surface"
-[dependencies.url]
-git = "https://github.com/servo/rust-url"
+[dependencies]
+url = "*" \ No newline at end of file
diff --git a/components/msg/compositor_msg.rs b/components/msg/compositor_msg.rs
index a2e3c4d1909..111636c349c 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, Eq, Clone, Copy)]
+#[derive(PartialEq, Eq, Clone, Copy)]
pub enum PaintState {
Idle,
Painting,
}
-#[deriving(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Copy)]
+#[derive(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, Eq, Show, Copy)]
+#[derive(PartialEq, Eq, Show, Copy)]
pub struct Epoch(pub uint);
impl Epoch {
@@ -43,7 +43,7 @@ impl Epoch {
}
}
-#[deriving(Clone, PartialEq, Eq, Copy)]
+#[derive(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, Eq, Copy)]
+#[derive(Clone, PartialEq, Eq, Copy)]
pub enum ScrollPolicy {
/// These layers scroll when the parent receives a scrolling message.
Scrollable,
@@ -71,7 +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)]
+#[derive(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,
@@ -85,7 +85,7 @@ pub struct LayerMetadata {
/// The interface used by the painter to acquire draw targets for each paint frame and
/// submit them to be drawn to the display.
-pub trait PaintListener for Sized? {
+pub trait PaintListener {
fn get_graphics_metadata(&mut self) -> Option<NativeGraphicsMetadata>;
/// Informs the compositor of the layers for the given pipeline. The compositor responds by
diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs
index 5cd2a0cce39..658fb6a4e71 100644
--- a/components/msg/constellation_msg.rs
+++ b/components/msg/constellation_msg.rs
@@ -13,10 +13,10 @@ use hyper::method::Method;
use layers::geometry::DevicePixel;
use servo_util::cursor::Cursor;
use servo_util::geometry::{PagePx, ViewportPx};
-use std::comm::{channel, Sender, Receiver};
+use std::sync::mpsc::{channel, Sender, Receiver};
use url::Url;
-#[deriving(Clone)]
+#[derive(Clone)]
pub struct ConstellationChan(pub Sender<Msg>);
impl ConstellationChan {
@@ -26,20 +26,20 @@ impl ConstellationChan {
}
}
-#[deriving(PartialEq, Eq, Copy)]
+#[derive(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, Copy)]
+#[derive(Clone, Copy)]
pub struct Failure {
pub pipeline_id: PipelineId,
pub subpage_id: Option<SubpageId>,
}
-#[deriving(Copy)]
+#[derive(Copy)]
pub struct WindowSizeData {
/// The size of the initial layout viewport, before parsing an
/// http://www.w3.org/TR/css-device-adapt/#initial-viewport
@@ -52,7 +52,7 @@ pub struct WindowSizeData {
pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
}
-#[deriving(PartialEq, Eq, Copy, Clone)]
+#[derive(PartialEq, Eq, Copy, Clone)]
pub enum KeyState {
Pressed,
Released,
@@ -60,7 +60,7 @@ pub enum KeyState {
}
//N.B. Straight up copied from glfw-rs
-#[deriving(Show, PartialEq, Eq, Copy, Clone)]
+#[derive(Show, PartialEq, Eq, Copy, Clone)]
pub enum Key {
Space,
Apostrophe,
@@ -186,7 +186,6 @@ pub enum Key {
}
bitflags! {
- #[deriving(Copy)]
flags KeyModifiers: u8 {
const SHIFT = 0x01,
const CONTROL = 0x02,
@@ -218,7 +217,7 @@ pub enum Msg {
/// Similar to net::resource_task::LoadData
/// can be passed to LoadUrl to load a page with GET/POST
/// parameters or headers
-#[deriving(Clone)]
+#[derive(Clone)]
pub struct LoadData {
pub url: Url,
pub method: Method,
@@ -238,27 +237,27 @@ impl LoadData {
}
/// Represents the two different ways to which a page can be navigated
-#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub enum NavigationType {
Load, // entered or clicked on a url
Navigate, // browser forward/back buttons
}
-#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub enum NavigationDirection {
Forward,
Back,
}
-#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Copy, Hash, Show)]
pub struct PipelineId(pub uint);
-#[deriving(Clone, PartialEq, Eq, Copy, Hash, Show)]
+#[derive(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)]
+#[derive(Copy)]
pub enum PipelineExitType {
PipelineOnly,
Complete,
diff --git a/components/msg/lib.rs b/components/msg/lib.rs
index 234fba05361..ba02ce8babd 100644
--- a/components/msg/lib.rs
+++ b/components/msg/lib.rs
@@ -2,6 +2,8 @@
* 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/. */
+#![feature(int_uint)]
+
#![deny(unused_imports)]
#![deny(unused_variables)]
#![allow(missing_copy_implementations)]