mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits
Moved ScriptToCompositorMsg enum and EventResult enum to script_traits (rebased)
This commit is contained in:
commit
82f39d5a1c
10 changed files with 24 additions and 11 deletions
|
@ -22,12 +22,12 @@ use euclid::size::{Size2D, TypedSize2D};
|
|||
use gaol;
|
||||
use gaol::sandbox::{self, Sandbox, SandboxMethods};
|
||||
use gfx::font_cache_task::FontCacheTask;
|
||||
use gfx_traits::PaintMsg as FromPaintMsg;
|
||||
use ipc_channel::ipc::{self, IpcOneShotServer, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layout_traits::{LayoutControlChan, LayoutTaskFactory};
|
||||
use msg::compositor_msg::Epoch;
|
||||
use msg::constellation_msg::AnimationState;
|
||||
use msg::constellation_msg::PaintMsg as FromPaintMsg;
|
||||
use msg::constellation_msg::WebDriverCommandMsg;
|
||||
use msg::constellation_msg::{DocumentState, FrameId, PipelineId};
|
||||
use msg::constellation_msg::{IframeLoadInfo, IFrameSandboxState, MozBrowserEvent, NavigationDirection};
|
||||
|
|
|
@ -10,11 +10,11 @@ use euclid::scale_factor::ScaleFactor;
|
|||
use euclid::size::TypedSize2D;
|
||||
use gfx::font_cache_task::FontCacheTask;
|
||||
use gfx::paint_task::{ChromeToPaintMsg, LayoutToPaintMsg, PaintTask};
|
||||
use gfx_traits::PaintMsg;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layers::geometry::DevicePixel;
|
||||
use layout_traits::{LayoutControlChan, LayoutTaskFactory};
|
||||
use msg::constellation_msg::PaintMsg;
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, FrameId, PipelineId, SubpageId};
|
||||
use msg::constellation_msg::{LoadData, MozBrowserEvent, WindowSizeData};
|
||||
use msg::constellation_msg::{PipelineNamespaceId};
|
||||
|
|
|
@ -15,12 +15,11 @@ use euclid::rect::Rect;
|
|||
use euclid::size::Size2D;
|
||||
use font_cache_task::FontCacheTask;
|
||||
use font_context::FontContext;
|
||||
use gfx_traits::{PaintListener, color};
|
||||
use gfx_traits::{color, PaintListener, PaintMsg as ConstellationMsg};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layers::layers::{BufferRequest, LayerBuffer, LayerBufferSet};
|
||||
use layers::platform::surface::{NativeDisplay, NativeSurface};
|
||||
use msg::compositor_msg::{Epoch, FrameTreeId, LayerId, LayerKind, LayerProperties, ScrollPolicy};
|
||||
use msg::constellation_msg::PaintMsg as ConstellationMsg;
|
||||
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId};
|
||||
use paint_context::PaintContext;
|
||||
use profile_traits::mem::{self, ReportsChan};
|
||||
|
|
|
@ -17,3 +17,7 @@ features = ["plugins"]
|
|||
|
||||
[dependencies.msg]
|
||||
path = "../msg"
|
||||
|
||||
[dependencies]
|
||||
serde = "0.6"
|
||||
serde_macros = "0.6"
|
||||
|
|
|
@ -2,14 +2,24 @@
|
|||
* 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(custom_derive, plugin)]
|
||||
#![plugin(serde_macros)]
|
||||
#![crate_name = "gfx_traits"]
|
||||
#![crate_type = "rlib"]
|
||||
|
||||
extern crate azure;
|
||||
extern crate layers;
|
||||
extern crate msg;
|
||||
extern crate serde;
|
||||
|
||||
pub mod color;
|
||||
mod paint_listener;
|
||||
|
||||
pub use paint_listener::PaintListener;
|
||||
use msg::constellation_msg::Failure;
|
||||
|
||||
/// Messages from the paint task to the constellation.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum PaintMsg {
|
||||
Failure(Failure),
|
||||
}
|
||||
|
|
|
@ -241,12 +241,6 @@ pub enum MouseButton {
|
|||
Right,
|
||||
}
|
||||
|
||||
/// Messages from the paint task to the constellation.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum PaintMsg {
|
||||
Failure(Failure),
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, Deserialize, Serialize, Debug)]
|
||||
pub enum AnimationState {
|
||||
AnimationsPresent,
|
||||
|
|
|
@ -1703,7 +1703,7 @@ impl Node {
|
|||
let mut content = String::new();
|
||||
for node in iterator {
|
||||
match node.downcast::<Text>() {
|
||||
Some(text) => content.push_str(&text.upcast::<CharacterData>().Data()),
|
||||
Some(ref text) => content.push_str(&text.upcast::<CharacterData>().data()),
|
||||
None => (),
|
||||
}
|
||||
}
|
||||
|
|
2
components/servo/Cargo.lock
generated
2
components/servo/Cargo.lock
generated
|
@ -658,6 +658,8 @@ dependencies = [
|
|||
"azure 0.2.1 (git+https://github.com/servo/rust-azure)",
|
||||
"layers 0.2.0 (git+https://github.com/servo/rust-layers)",
|
||||
"msg 0.0.1",
|
||||
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
2
ports/cef/Cargo.lock
generated
2
ports/cef/Cargo.lock
generated
|
@ -618,6 +618,8 @@ dependencies = [
|
|||
"azure 0.2.1 (git+https://github.com/servo/rust-azure)",
|
||||
"layers 0.2.0 (git+https://github.com/servo/rust-layers)",
|
||||
"msg 0.0.1",
|
||||
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
2
ports/gonk/Cargo.lock
generated
2
ports/gonk/Cargo.lock
generated
|
@ -608,6 +608,8 @@ dependencies = [
|
|||
"azure 0.2.1 (git+https://github.com/servo/rust-azure)",
|
||||
"layers 0.2.0 (git+https://github.com/servo/rust-layers)",
|
||||
"msg 0.0.1",
|
||||
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue