mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Use CompositorMsg from script_traits.
This commit is contained in:
parent
47933479da
commit
f9a8c322af
9 changed files with 13 additions and 17 deletions
|
@ -2,9 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use AnimationTickType;
|
|
||||||
use CompositionPipeline;
|
use CompositionPipeline;
|
||||||
use CompositorMsg as ConstellationMsg;
|
|
||||||
use SendableFrameTree;
|
use SendableFrameTree;
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
use compositor_layer::{CompositorData, CompositorLayer, RcCompositorLayer, WantsScrollEventsFlag};
|
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::mem::{self, ReportKind, Reporter, ReporterRequest};
|
||||||
use profile_traits::time::{self, ProfilerCategory, profile};
|
use profile_traits::time::{self, ProfilerCategory, profile};
|
||||||
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent};
|
use script_traits::CompositorEvent::{MouseMoveEvent, MouseButtonEvent, TouchEvent};
|
||||||
use script_traits::{AnimationState, ConstellationControlMsg, LayoutControlMsg};
|
use script_traits::{AnimationState, AnimationTickType, ConstellationControlMsg};
|
||||||
use script_traits::{MouseButton, MouseEventType, TouchpadPressurePhase, TouchEventType, TouchId};
|
use script_traits::{ConstellationMsg, LayoutControlMsg, MouseButton};
|
||||||
|
use script_traits::{MouseEventType, TouchpadPressurePhase, TouchEventType, TouchId};
|
||||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
//! Communication with the compositor thread.
|
//! Communication with the compositor thread.
|
||||||
|
|
||||||
use CompositorMsg as ConstellationMsg;
|
|
||||||
use SendableFrameTree;
|
use SendableFrameTree;
|
||||||
use compositor::{self, CompositingReason};
|
use compositor::{self, CompositingReason};
|
||||||
use euclid::point::Point2D;
|
use euclid::point::Point2D;
|
||||||
|
@ -16,7 +15,7 @@ use layers::platform::surface::{NativeDisplay, NativeSurface};
|
||||||
use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState, PipelineId};
|
use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState, PipelineId};
|
||||||
use profile_traits::mem;
|
use profile_traits::mem;
|
||||||
use profile_traits::time;
|
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::fmt::{Debug, Error, Formatter};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||||
|
|
|
@ -55,8 +55,6 @@ mod surface_map;
|
||||||
mod touch;
|
mod touch;
|
||||||
pub mod windowing;
|
pub mod windowing;
|
||||||
|
|
||||||
pub use script_traits::{AnimationTickType, ConstellationMsg as CompositorMsg};
|
|
||||||
|
|
||||||
pub struct SendableFrameTree {
|
pub struct SendableFrameTree {
|
||||||
pub pipeline: CompositionPipeline,
|
pub pipeline: CompositionPipeline,
|
||||||
pub size: Option<TypedSize2D<PagePx, f32>>,
|
pub size: Option<TypedSize2D<PagePx, f32>>,
|
||||||
|
|
|
@ -13,10 +13,9 @@ use canvas::canvas_paint_thread::CanvasPaintThread;
|
||||||
use canvas::webgl_paint_thread::WebGLPaintThread;
|
use canvas::webgl_paint_thread::WebGLPaintThread;
|
||||||
use canvas_traits::CanvasMsg;
|
use canvas_traits::CanvasMsg;
|
||||||
use clipboard::ClipboardContext;
|
use clipboard::ClipboardContext;
|
||||||
use compositing::CompositorMsg as FromCompositorMsg;
|
use compositing::SendableFrameTree;
|
||||||
use compositing::compositor_thread::CompositorProxy;
|
use compositing::compositor_thread::CompositorProxy;
|
||||||
use compositing::compositor_thread::Msg as ToCompositorMsg;
|
use compositing::compositor_thread::Msg as ToCompositorMsg;
|
||||||
use compositing::{AnimationTickType, SendableFrameTree};
|
|
||||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||||
use euclid::scale_factor::ScaleFactor;
|
use euclid::scale_factor::ScaleFactor;
|
||||||
use euclid::size::{Size2D, TypedSize2D};
|
use euclid::size::{Size2D, TypedSize2D};
|
||||||
|
@ -49,7 +48,8 @@ use profile_traits::time;
|
||||||
use rand::{random, Rng, SeedableRng, StdRng};
|
use rand::{random, Rng, SeedableRng, StdRng};
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
use sandboxing::content_process_sandbox_profile;
|
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::{DocumentState, LayoutControlMsg};
|
||||||
use script_traits::{IFrameLoadInfo, IFrameSandboxState, TimerEventRequest};
|
use script_traits::{IFrameLoadInfo, IFrameSandboxState, TimerEventRequest};
|
||||||
use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory};
|
use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory};
|
||||||
|
|
2
components/servo/Cargo.lock
generated
2
components/servo/Cargo.lock
generated
|
@ -2482,7 +2482,6 @@ dependencies = [
|
||||||
name = "webdriver_server"
|
name = "webdriver_server"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"compositing 0.0.1",
|
|
||||||
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2492,6 +2491,7 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -58,7 +58,6 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
|
||||||
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
|
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
|
||||||
|
|
||||||
use compositing::CompositorEventListener;
|
use compositing::CompositorEventListener;
|
||||||
use compositing::CompositorMsg as ConstellationMsg;
|
|
||||||
use compositing::compositor_thread::InitialCompositorState;
|
use compositing::compositor_thread::InitialCompositorState;
|
||||||
use compositing::windowing::WindowEvent;
|
use compositing::windowing::WindowEvent;
|
||||||
use compositing::windowing::WindowMethods;
|
use compositing::windowing::WindowMethods;
|
||||||
|
@ -79,6 +78,7 @@ use profile::mem as profile_mem;
|
||||||
use profile::time as profile_time;
|
use profile::time as profile_time;
|
||||||
use profile_traits::mem;
|
use profile_traits::mem;
|
||||||
use profile_traits::time;
|
use profile_traits::time;
|
||||||
|
use script_traits::ConstellationMsg;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::mpsc::Sender;
|
use std::sync::mpsc::Sender;
|
||||||
use util::resource_files::resources_dir_path;
|
use util::resource_files::resources_dir_path;
|
||||||
|
|
|
@ -9,7 +9,6 @@ name = "webdriver_server"
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
compositing = {path = "../compositing"}
|
|
||||||
msg = {path = "../msg"}
|
msg = {path = "../msg"}
|
||||||
plugins = {path = "../plugins"}
|
plugins = {path = "../plugins"}
|
||||||
util = {path = "../util"}
|
util = {path = "../util"}
|
||||||
|
@ -20,6 +19,7 @@ log = "0.3.5"
|
||||||
hyper = "0.9"
|
hyper = "0.9"
|
||||||
rustc-serialize = "0.3.4"
|
rustc-serialize = "0.3.4"
|
||||||
regex = "0.1.55"
|
regex = "0.1.55"
|
||||||
|
script_traits = {path = "../script_traits"}
|
||||||
url = {version = "1.0.0", features = ["heap_size"]}
|
url = {version = "1.0.0", features = ["heap_size"]}
|
||||||
uuid = { version = "0.2", features = ["v4"] }
|
uuid = { version = "0.2", features = ["v4"] }
|
||||||
webdriver = "0.9"
|
webdriver = "0.9"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
||||||
extern crate compositing;
|
|
||||||
extern crate euclid;
|
extern crate euclid;
|
||||||
extern crate hyper;
|
extern crate hyper;
|
||||||
extern crate image;
|
extern crate image;
|
||||||
|
@ -18,6 +17,7 @@ extern crate ipc_channel;
|
||||||
extern crate msg;
|
extern crate msg;
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
|
extern crate script_traits;
|
||||||
extern crate url;
|
extern crate url;
|
||||||
extern crate util;
|
extern crate util;
|
||||||
extern crate uuid;
|
extern crate uuid;
|
||||||
|
@ -25,7 +25,6 @@ extern crate webdriver;
|
||||||
|
|
||||||
mod keys;
|
mod keys;
|
||||||
|
|
||||||
use compositing::CompositorMsg as ConstellationMsg;
|
|
||||||
use euclid::Size2D;
|
use euclid::Size2D;
|
||||||
use hyper::method::Method::{self, Post};
|
use hyper::method::Method::{self, Post};
|
||||||
use image::{DynamicImage, ImageFormat, RgbImage};
|
use image::{DynamicImage, ImageFormat, RgbImage};
|
||||||
|
@ -37,6 +36,7 @@ use msg::webdriver_msg::{LoadStatus, WebDriverFrameId, WebDriverJSError, WebDriv
|
||||||
use regex::Captures;
|
use regex::Captures;
|
||||||
use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
|
use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
|
||||||
use rustc_serialize::json::{Json, ToJson};
|
use rustc_serialize::json::{Json, ToJson};
|
||||||
|
use script_traits::ConstellationMsg;
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::net::{SocketAddr, SocketAddrV4};
|
use std::net::{SocketAddr, SocketAddrV4};
|
||||||
|
|
2
ports/cef/Cargo.lock
generated
2
ports/cef/Cargo.lock
generated
|
@ -2343,7 +2343,6 @@ dependencies = [
|
||||||
name = "webdriver_server"
|
name = "webdriver_server"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"compositing 0.0.1",
|
|
||||||
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"image 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2353,6 +2352,7 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"regex 0.1.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue