aboutsummaryrefslogtreecommitdiffstats
path: root/components/msg
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2016-05-17 13:27:45 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2016-05-20 09:20:45 -0500
commite2203f81d31bb865e9d73765de33c87178fa2d14 (patch)
tree5354083f72d8a22fbe7668186382b34eea8be3ad /components/msg
parent5acf0f9a0515c8358b3170f8d9a117c50b41bd7d (diff)
downloadservo-e2203f81d31bb865e9d73765de33c87178fa2d14.tar.gz
servo-e2203f81d31bb865e9d73765de33c87178fa2d14.zip
Made SetWindowSize synchronous.
Diffstat (limited to 'components/msg')
-rw-r--r--components/msg/constellation_msg.rs4
-rw-r--r--components/msg/webdriver_msg.rs6
2 files changed, 4 insertions, 6 deletions
diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs
index 3433b6915f0..543e4277f23 100644
--- a/components/msg/constellation_msg.rs
+++ b/components/msg/constellation_msg.rs
@@ -6,7 +6,7 @@
//! reduce coupling between these two components.
use euclid::scale_factor::ScaleFactor;
-use euclid::size::TypedSize2D;
+use euclid::size::{Size2D, TypedSize2D};
use hyper::header::Headers;
use hyper::method::Method;
use ipc_channel::ipc::{IpcSender, IpcSharedMemory};
@@ -188,10 +188,12 @@ bitflags! {
#[derive(Deserialize, Serialize)]
pub enum WebDriverCommandMsg {
+ GetWindowSize(PipelineId, IpcSender<WindowSizeData>),
LoadUrl(PipelineId, LoadData, IpcSender<LoadStatus>),
Refresh(PipelineId, IpcSender<LoadStatus>),
ScriptCommand(PipelineId, WebDriverScriptCommand),
SendKeys(PipelineId, Vec<(Key, KeyModifiers, KeyState)>),
+ SetWindowSize(PipelineId, Size2D<u32>, IpcSender<WindowSizeData>),
TakeScreenshot(PipelineId, IpcSender<Option<Image>>),
}
diff --git a/components/msg/webdriver_msg.rs b/components/msg/webdriver_msg.rs
index fca22ab61e5..a6c94c3a439 100644
--- a/components/msg/webdriver_msg.rs
+++ b/components/msg/webdriver_msg.rs
@@ -2,13 +2,11 @@
* 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 constellation_msg::{PipelineId, WindowSizeData};
+use constellation_msg::PipelineId;
use euclid::rect::Rect;
-use euclid::size::TypedSize2D;
use ipc_channel::ipc::IpcSender;
use rustc_serialize::json::{Json, ToJson};
use url::Url;
-use util::geometry::ViewportPx;
#[derive(Deserialize, Serialize)]
pub enum WebDriverScriptCommand {
@@ -25,8 +23,6 @@ pub enum WebDriverScriptCommand {
GetElementText(String, IpcSender<Result<String, ()>>),
GetFrameId(WebDriverFrameId, IpcSender<Result<Option<PipelineId>, ()>>),
GetUrl(IpcSender<Url>),
- GetWindowSize(IpcSender<Option<WindowSizeData>>),
- SetWindowSize(TypedSize2D<ViewportPx, f32>, IpcSender<()>),
IsEnabled(String, IpcSender<Result<bool, ()>>),
IsSelected(String, IpcSender<Result<bool, ()>>),
GetTitle(IpcSender<String>)