mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Made SetWindowSize synchronous.
This commit is contained in:
parent
5acf0f9a05
commit
e2203f81d3
6 changed files with 34 additions and 45 deletions
|
@ -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>>),
|
||||
}
|
||||
|
||||
|
|
|
@ -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>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue