aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/compositing/compositor.rs2
-rw-r--r--components/compositing/compositor_task.rs2
-rw-r--r--components/compositing/constellation.rs2
-rw-r--r--components/compositing/headless.rs2
-rw-r--r--components/compositing/lib.rs35
-rw-r--r--components/msg/constellation_msg.rs29
-rw-r--r--components/servo/Cargo.lock1
-rw-r--r--components/servo/lib.rs2
-rw-r--r--components/webdriver_server/Cargo.toml3
-rw-r--r--components/webdriver_server/lib.rs3
-rw-r--r--ports/cef/Cargo.lock1
11 files changed, 47 insertions, 35 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index 3e259a7b35a..417f9072974 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -2,6 +2,7 @@
* 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 CompositorMsg as ConstellationMsg;
use app_units::Au;
use compositor_layer::{CompositorData, CompositorLayer, RcCompositorLayer, WantsScrollEventsFlag};
use compositor_task::{CompositorEventListener, CompositorProxy};
@@ -28,7 +29,6 @@ use layers::scene::Scene;
use layout_traits::LayoutControlChan;
use msg::compositor_msg::{Epoch, EventResult, FrameTreeId, LayerId, LayerKind};
use msg::compositor_msg::{LayerProperties, ScrollPolicy};
-use msg::constellation_msg::CompositorMsg as ConstellationMsg;
use msg::constellation_msg::{AnimationState, Image, PixelFormat};
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, MouseButton};
use msg::constellation_msg::{NavigationDirection, PipelineId, WindowSizeData};
diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs
index 8a0921e4b8e..532590665f2 100644
--- a/components/compositing/compositor_task.rs
+++ b/components/compositing/compositor_task.rs
@@ -4,6 +4,7 @@
//! Communication with the compositor task.
+use CompositorMsg as ConstellationMsg;
use compositor;
use euclid::point::Point2D;
use euclid::size::Size2D;
@@ -13,7 +14,6 @@ use layers::layers::{BufferRequest, LayerBufferSet};
use layers::platform::surface::{NativeDisplay, NativeSurface};
use msg::compositor_msg::{Epoch, EventResult, FrameTreeId, LayerId, LayerProperties};
use msg::compositor_msg::{PaintListener, ScriptToCompositorMsg};
-use msg::constellation_msg::CompositorMsg as ConstellationMsg;
use msg::constellation_msg::{AnimationState, PipelineId};
use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState};
use profile_traits::mem;
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs
index 01cd79ca6ef..5cedb80cdcd 100644
--- a/components/compositing/constellation.rs
+++ b/components/compositing/constellation.rs
@@ -9,6 +9,7 @@
//! navigation context, each `Pipeline` encompassing a `ScriptTask`,
//! `LayoutTask`, and `PaintTask`.
+use CompositorMsg as FromCompositorMsg;
use canvas::canvas_paint_task::CanvasPaintTask;
use canvas::webgl_paint_task::WebGLPaintTask;
use canvas_traits::CanvasMsg;
@@ -26,7 +27,6 @@ use ipc_channel::router::ROUTER;
use layout_traits::{LayoutControlChan, LayoutTaskFactory};
use msg::compositor_msg::Epoch;
use msg::constellation_msg::AnimationState;
-use msg::constellation_msg::CompositorMsg as FromCompositorMsg;
use msg::constellation_msg::PaintMsg as FromPaintMsg;
use msg::constellation_msg::WebDriverCommandMsg;
use msg::constellation_msg::{FrameId, PipelineId};
diff --git a/components/compositing/headless.rs b/components/compositing/headless.rs
index a31d1b3c531..85af3b7f622 100644
--- a/components/compositing/headless.rs
+++ b/components/compositing/headless.rs
@@ -2,12 +2,12 @@
* 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 CompositorMsg as ConstellationMsg;
use compositor_task::{CompositorEventListener, CompositorReceiver};
use compositor_task::{InitialCompositorState, Msg};
use euclid::scale_factor::ScaleFactor;
use euclid::{Point2D, Size2D};
use msg::constellation_msg::AnimationState;
-use msg::constellation_msg::CompositorMsg as ConstellationMsg;
use msg::constellation_msg::WindowSizeData;
use profile_traits::mem;
use profile_traits::time;
diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs
index b4c0e780051..65444e6d443 100644
--- a/components/compositing/lib.rs
+++ b/components/compositing/lib.rs
@@ -54,6 +54,14 @@ extern crate util;
pub use compositor_task::{CompositorEventListener, CompositorProxy, CompositorTask};
pub use constellation::Constellation;
+use euclid::size::{Size2D};
+use ipc_channel::ipc::{IpcSender};
+use msg::compositor_msg::Epoch;
+use msg::constellation_msg::{FrameId, Key, KeyState, KeyModifiers, LoadData};
+use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId};
+use msg::constellation_msg::{WebDriverCommandMsg, WindowSizeData};
+use std::collections::HashMap;
+use url::Url;
mod compositor;
mod compositor_layer;
@@ -66,3 +74,30 @@ mod scrolling;
mod surface_map;
mod timer_scheduler;
pub mod windowing;
+
+/// Messages from the compositor to the constellation.
+#[derive(Deserialize, Serialize)]
+pub enum CompositorMsg {
+ Exit,
+ FrameSize(PipelineId, Size2D<f32>),
+ /// Request that the constellation send the FrameId corresponding to the document
+ /// with the provided pipeline id
+ GetFrame(PipelineId, IpcSender<Option<FrameId>>),
+ /// Request that the constellation send the current pipeline id for the provided frame
+ /// id, or for the root frame if this is None, over a provided channel
+ GetPipeline(Option<FrameId>, IpcSender<Option<PipelineId>>),
+ /// Requests that the constellation inform the compositor of the title of the pipeline
+ /// immediately.
+ GetPipelineTitle(PipelineId),
+ InitLoadUrl(Url),
+ /// Query the constellation to see if the current compositor output is stable
+ IsReadyToSaveImage(HashMap<PipelineId, Epoch>),
+ KeyEvent(Key, KeyState, KeyModifiers),
+ LoadUrl(PipelineId, LoadData),
+ Navigate(Option<(PipelineId, SubpageId)>, NavigationDirection),
+ ResizedWindow(WindowSizeData),
+ /// Requests that the constellation instruct layout to begin a new tick of the animation.
+ TickAnimation(PipelineId),
+ /// Dispatch a webdriver command
+ WebDriverCommand(WebDriverCommandMsg),
+}
diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs
index 0edf9c38075..7a77b78774a 100644
--- a/components/msg/constellation_msg.rs
+++ b/components/msg/constellation_msg.rs
@@ -5,7 +5,6 @@
//! The high-level interface from script to constellation. Using this abstract interface helps
//! reduce coupling between these two components.
-use compositor_msg::Epoch;
use euclid::scale_factor::ScaleFactor;
use euclid::size::{Size2D, TypedSize2D};
use hyper::header::Headers;
@@ -14,7 +13,6 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcSharedMemory};
use layers::geometry::DevicePixel;
use serde::{Deserialize, Serialize};
use std::cell::Cell;
-use std::collections::HashMap;
use std::fmt;
use std::sync::mpsc::channel;
use url::Url;
@@ -225,33 +223,6 @@ pub struct IframeLoadInfo {
pub sandbox: IFrameSandboxState,
}
-/// Messages from the compositor to the constellation.
-#[derive(Deserialize, Serialize)]
-pub enum CompositorMsg {
- Exit,
- FrameSize(PipelineId, Size2D<f32>),
- /// Request that the constellation send the FrameId corresponding to the document
- /// with the provided pipeline id
- GetFrame(PipelineId, IpcSender<Option<FrameId>>),
- /// Request that the constellation send the current pipeline id for the provided frame
- /// id, or for the root frame if this is None, over a provided channel
- GetPipeline(Option<FrameId>, IpcSender<Option<PipelineId>>),
- /// Requests that the constellation inform the compositor of the title of the pipeline
- /// immediately.
- GetPipelineTitle(PipelineId),
- InitLoadUrl(Url),
- /// Query the constellation to see if the current compositor output is stable
- IsReadyToSaveImage(HashMap<PipelineId, Epoch>),
- KeyEvent(Key, KeyState, KeyModifiers),
- LoadUrl(PipelineId, LoadData),
- Navigate(Option<(PipelineId, SubpageId)>, NavigationDirection),
- ResizedWindow(WindowSizeData),
- /// Requests that the constellation instruct layout to begin a new tick of the animation.
- TickAnimation(PipelineId),
- /// Dispatch a webdriver command
- WebDriverCommand(WebDriverCommandMsg),
-}
-
#[derive(Deserialize, HeapSizeOf, Serialize)]
pub enum MouseEventType {
Click,
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index ec0ea24c1b2..8f525198765 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -2039,6 +2039,7 @@ dependencies = [
name = "webdriver_server"
version = "0.0.1"
dependencies = [
+ "compositing 0.0.1",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 8c0f920554f..0f2654aef0f 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -57,6 +57,7 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
use compositing::CompositorEventListener;
+use compositing::CompositorMsg as ConstellationMsg;
use compositing::compositor_task::InitialCompositorState;
use compositing::constellation::InitialConstellationState;
use compositing::pipeline::UnprivilegedPipelineContent;
@@ -67,7 +68,6 @@ use compositing::{CompositorProxy, CompositorTask, Constellation};
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
use gfx::font_cache_task::FontCacheTask;
use ipc_channel::ipc::{self, IpcSender};
-use msg::constellation_msg::CompositorMsg as ConstellationMsg;
use net::image_cache_task::new_image_cache_task;
use net::resource_task::new_resource_task;
use net::storage_task::StorageTaskFactory;
diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml
index 8b091bb802a..3b034f1b3da 100644
--- a/components/webdriver_server/Cargo.toml
+++ b/components/webdriver_server/Cargo.toml
@@ -7,6 +7,9 @@ authors = ["The Servo Project Developers"]
name = "webdriver_server"
path = "lib.rs"
+[dependencies.compositing]
+path = "../compositing"
+
[dependencies.msg]
path = "../msg"
diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs
index 1acd63f352a..a96f7db3cb4 100644
--- a/components/webdriver_server/lib.rs
+++ b/components/webdriver_server/lib.rs
@@ -8,6 +8,7 @@
#![feature(ip_addr, plugin)]
#![plugin(plugins)]
+extern crate compositing;
extern crate hyper;
extern crate image;
extern crate ipc_channel;
@@ -23,11 +24,11 @@ extern crate webdriver;
mod keys;
+use compositing::CompositorMsg as ConstellationMsg;
use hyper::method::Method::{self, Post};
use image::{DynamicImage, ImageFormat, RgbImage};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use keys::keycodes_to_keys;
-use msg::constellation_msg::CompositorMsg as ConstellationMsg;
use msg::constellation_msg::{FrameId, LoadData, PipelineId};
use msg::constellation_msg::{NavigationDirection, PixelFormat, WebDriverCommandMsg};
use msg::webdriver_msg::{LoadStatus, WebDriverFrameId, WebDriverJSError, WebDriverJSResult, WebDriverScriptCommand};
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index 177aad20306..0f780c1d4bf 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -1964,6 +1964,7 @@ dependencies = [
name = "webdriver_server"
version = "0.0.1"
dependencies = [
+ "compositing 0.0.1",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",