mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
servoshell: Use DeviceIndependentPixel for WebDriver Rect related requests (#37893)
[Spec](https://w3c.github.io/webdriver/#set-window-rect) expects CSS pixel for input and output. Previously, we use Device Pixel for them instead. Testing: Tested manually with different screen DPR and compared with other browsers. Fixes: Task 4 of https://github.com/servo/servo/issues/37804 --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
0db02702e7
commit
3526b7e86e
8 changed files with 66 additions and 269 deletions
|
@ -8,8 +8,8 @@
|
|||
use std::rc::Rc;
|
||||
|
||||
use euclid::{Length, Scale};
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePixel};
|
||||
use servo::servo_geometry::{DeviceIndependentIntRect, DeviceIndependentPixel};
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePixel};
|
||||
use servo::{Cursor, RenderingContext, ScreenGeometry, WebView};
|
||||
|
||||
use super::app_state::RunningAppState;
|
||||
|
@ -53,5 +53,5 @@ pub trait WindowPortsMethods {
|
|||
fn theme(&self) -> servo::Theme {
|
||||
servo::Theme::Light
|
||||
}
|
||||
fn window_rect(&self) -> DeviceIntRect;
|
||||
fn window_rect(&self) -> DeviceIndependentIntRect;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue