mirror of
https://github.com/servo/servo.git
synced 2025-07-19 13:23:46 +01:00
script: Get the window rectangle from the WebViewDelegate
instead of via the compositor (#37960)
Previously, `screenX`, `screenY`, `outerHeight`, `outerWidth`, `moveBy`, `resizeBy` ask compositor for window rectangle, which then return "inner" rectangle after consulting Embedder. This PR 1. removes `GetClientWindowRect` from compositor, and directly let script ask embedder. 2. add `window_size` to `ScreenGeometry` 3. add a lot of docs to `ScreenGeometry` Testing: `tests\wpt\mozilla\tests\mozilla\window_resizeTo.html` can now pass for Headed Window. Fixes: #37824 --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
d40e9f82a2
commit
c5aeac3cea
16 changed files with 59 additions and 104 deletions
|
@ -33,7 +33,7 @@ use euclid::default::Size2D as UntypedSize2D;
|
|||
use ipc_channel::ipc::{self, IpcSharedMemory};
|
||||
use profile_traits::mem::{OpaqueSender, ReportsChan};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_geometry::{DeviceIndependentIntRect, DeviceIndependentIntSize};
|
||||
use servo_geometry::DeviceIndependentIntSize;
|
||||
use webrender_api::units::{DevicePoint, LayoutVector2D, TexelRect};
|
||||
use webrender_api::{
|
||||
BuiltDisplayList, BuiltDisplayListDescriptor, ExternalImage, ExternalImageData,
|
||||
|
@ -152,9 +152,6 @@ pub enum CompositorMsg {
|
|||
AddFontInstance(FontInstanceKey, FontKey, f32, FontInstanceFlags),
|
||||
/// Remove the given font resources from our WebRender instance.
|
||||
RemoveFonts(Vec<FontKey>, Vec<FontInstanceKey>),
|
||||
|
||||
/// Get the client window size and position.
|
||||
GetClientWindowRect(WebViewId, IpcSender<DeviceIndependentIntRect>),
|
||||
/// Get the size of the screen that the client window inhabits.
|
||||
GetScreenSize(WebViewId, IpcSender<DeviceIndependentIntSize>),
|
||||
/// Get the available screen size, without system interface elements such as menus, docks, and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue