From f9a8c322af800242eb56d3fb73edfc547a28cf40 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 24 May 2016 12:07:33 +0200 Subject: [PATCH] Use CompositorMsg from script_traits. --- components/compositing/compositor.rs | 7 +++---- components/compositing/compositor_thread.rs | 3 +-- components/compositing/lib.rs | 2 -- components/constellation/constellation.rs | 6 +++--- components/servo/Cargo.lock | 2 +- components/servo/lib.rs | 2 +- components/webdriver_server/Cargo.toml | 2 +- components/webdriver_server/lib.rs | 4 ++-- ports/cef/Cargo.lock | 2 +- 9 files changed, 13 insertions(+), 17 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 5d29140e356..5d7b72b0910 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -2,9 +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 AnimationTickType; use CompositionPipeline; -use CompositorMsg as ConstellationMsg; use SendableFrameTree; use app_units::Au; use compositor_layer::{CompositorData, CompositorLayer, RcCompositorLayer, WantsScrollEventsFlag}; @@ -37,8 +35,9 @@ use msg::constellation_msg::{WindowSizeData, WindowSizeType}; use profile_traits::mem::{self, ReportKind, Reporter, ReporterRequest}; use profile_traits::time::{self, ProfilerCategory, profile}; use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent}; -use script_traits::{AnimationState, ConstellationControlMsg, LayoutControlMsg}; -use script_traits::{MouseButton, MouseEventType, TouchpadPressurePhase, TouchEventType, TouchId}; +use script_traits::{AnimationState, AnimationTickType, ConstellationControlMsg}; +use script_traits::{ConstellationMsg, LayoutControlMsg, MouseButton}; +use script_traits::{MouseEventType, TouchpadPressurePhase, TouchEventType, TouchId}; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::collections::{HashMap, HashSet}; use std::fs::File; diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index 79beb580daf..69c60cd2e0b 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -4,7 +4,6 @@ //! Communication with the compositor thread. -use CompositorMsg as ConstellationMsg; use SendableFrameTree; use compositor::{self, CompositingReason}; use euclid::point::Point2D; @@ -16,7 +15,7 @@ use layers::platform::surface::{NativeDisplay, NativeSurface}; use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState, PipelineId}; use profile_traits::mem; use profile_traits::time; -use script_traits::{AnimationState, EventResult, ScriptToCompositorMsg}; +use script_traits::{AnimationState, ConstellationMsg, EventResult, ScriptToCompositorMsg}; use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; use std::sync::mpsc::{Receiver, Sender, channel}; diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs index 7bde3a8213e..472c7bbd71f 100644 --- a/components/compositing/lib.rs +++ b/components/compositing/lib.rs @@ -55,8 +55,6 @@ mod surface_map; mod touch; pub mod windowing; -pub use script_traits::{AnimationTickType, ConstellationMsg as CompositorMsg}; - pub struct SendableFrameTree { pub pipeline: CompositionPipeline, pub size: Option>, diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index d0cd2973001..f595b4f6573 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -13,10 +13,9 @@ use canvas::canvas_paint_thread::CanvasPaintThread; use canvas::webgl_paint_thread::WebGLPaintThread; use canvas_traits::CanvasMsg; use clipboard::ClipboardContext; -use compositing::CompositorMsg as FromCompositorMsg; +use compositing::SendableFrameTree; use compositing::compositor_thread::CompositorProxy; use compositing::compositor_thread::Msg as ToCompositorMsg; -use compositing::{AnimationTickType, SendableFrameTree}; use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg}; use euclid::scale_factor::ScaleFactor; use euclid::size::{Size2D, TypedSize2D}; @@ -49,7 +48,8 @@ use profile_traits::time; use rand::{random, Rng, SeedableRng, StdRng}; #[cfg(not(target_os = "windows"))] use sandboxing::content_process_sandbox_profile; -use script_traits::{AnimationState, CompositorEvent, ConstellationControlMsg}; +use script_traits::{AnimationState, AnimationTickType, CompositorEvent}; +use script_traits::{ConstellationControlMsg, ConstellationMsg as FromCompositorMsg}; use script_traits::{DocumentState, LayoutControlMsg}; use script_traits::{IFrameLoadInfo, IFrameSandboxState, TimerEventRequest}; use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory}; diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 9d450aacfba..a9bffc800eb 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -2482,7 +2482,6 @@ dependencies = [ name = "webdriver_server" version = "0.0.1" dependencies = [ - "compositing 0.0.1", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2492,6 +2491,7 @@ dependencies = [ "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)", + "script_traits 0.0.1", "url 1.1.0 (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)", diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 16403134a1b..e208a4e89f1 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -58,7 +58,6 @@ fn webdriver(port: u16, constellation: Sender) { fn webdriver(_port: u16, _constellation: Sender) { } use compositing::CompositorEventListener; -use compositing::CompositorMsg as ConstellationMsg; use compositing::compositor_thread::InitialCompositorState; use compositing::windowing::WindowEvent; use compositing::windowing::WindowMethods; @@ -79,6 +78,7 @@ use profile::mem as profile_mem; use profile::time as profile_time; use profile_traits::mem; use profile_traits::time; +use script_traits::ConstellationMsg; use std::rc::Rc; use std::sync::mpsc::Sender; use util::resource_files::resources_dir_path; diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index de365ebdae3..d2e22b98b1a 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -9,7 +9,6 @@ name = "webdriver_server" path = "lib.rs" [dependencies] -compositing = {path = "../compositing"} msg = {path = "../msg"} plugins = {path = "../plugins"} util = {path = "../util"} @@ -20,6 +19,7 @@ log = "0.3.5" hyper = "0.9" rustc-serialize = "0.3.4" regex = "0.1.55" +script_traits = {path = "../script_traits"} url = {version = "1.0.0", features = ["heap_size"]} uuid = { version = "0.2", features = ["v4"] } webdriver = "0.9" diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 92c339fb7d5..83771a1b070 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -10,7 +10,6 @@ #![deny(unsafe_code)] -extern crate compositing; extern crate euclid; extern crate hyper; extern crate image; @@ -18,6 +17,7 @@ extern crate ipc_channel; extern crate msg; extern crate regex; extern crate rustc_serialize; +extern crate script_traits; extern crate url; extern crate util; extern crate uuid; @@ -25,7 +25,6 @@ extern crate webdriver; mod keys; -use compositing::CompositorMsg as ConstellationMsg; use euclid::Size2D; use hyper::method::Method::{self, Post}; use image::{DynamicImage, ImageFormat, RgbImage}; @@ -37,6 +36,7 @@ use msg::webdriver_msg::{LoadStatus, WebDriverFrameId, WebDriverJSError, WebDriv use regex::Captures; use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64}; use rustc_serialize::json::{Json, ToJson}; +use script_traits::ConstellationMsg; use std::borrow::ToOwned; use std::collections::BTreeMap; use std::net::{SocketAddr, SocketAddrV4}; diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index c4715c98d9a..9c7822336d3 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -2343,7 +2343,6 @@ dependencies = [ name = "webdriver_server" version = "0.0.1" dependencies = [ - "compositing 0.0.1", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2353,6 +2352,7 @@ dependencies = [ "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)", + "script_traits 0.0.1", "url 1.1.0 (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)",