mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement setting position through webdriver for headed window (#38209)
Previously, we pretend we are able to set position in response. Now we can really do it. Testing: Able to set position accurately when tested locally. Fixes: Task 5 of #37804. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
cff48d4910
commit
4ff6b1d4a7
7 changed files with 64 additions and 36 deletions
|
@ -16,7 +16,7 @@ use keyboard_types::KeyboardEvent;
|
|||
use keyboard_types::webdriver::Event as WebDriverInputEvent;
|
||||
use pixels::RasterImage;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_geometry::{DeviceIndependentIntRect, DeviceIndependentIntSize, DeviceIndependentPixel};
|
||||
use servo_geometry::DeviceIndependentIntRect;
|
||||
use servo_url::ServoUrl;
|
||||
use style_traits::CSSPixel;
|
||||
use webdriver::common::{WebElement, WebFrame, WebWindow};
|
||||
|
@ -132,11 +132,11 @@ pub enum WebDriverCommandMsg {
|
|||
// expect one response from constellation for each tick actions.
|
||||
Option<WebDriverMessageId>,
|
||||
),
|
||||
/// Set the window size.
|
||||
SetWindowSize(
|
||||
/// Set the outer window rectangle.
|
||||
SetWindowRect(
|
||||
WebViewId,
|
||||
DeviceIndependentIntSize,
|
||||
IpcSender<Size2D<i32, DeviceIndependentPixel>>,
|
||||
DeviceIndependentIntRect,
|
||||
IpcSender<DeviceIndependentIntRect>,
|
||||
),
|
||||
/// Take a screenshot of the viewport.
|
||||
TakeScreenshot(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue