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:
Euclid Ye 2025-07-12 02:31:24 +08:00 committed by GitHub
parent d40e9f82a2
commit c5aeac3cea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 59 additions and 104 deletions

View file

@ -214,6 +214,7 @@ mod from_script {
Self::SetCursor(..) => target_variant!("SetCursor"),
Self::NewFavicon(..) => target_variant!("NewFavicon"),
Self::HistoryChanged(..) => target_variant!("HistoryChanged"),
Self::GetWindowRect(..) => target_variant!("GetWindowRect"),
Self::NotifyFullscreenStateChanged(..) => {
target_variant!("NotifyFullscreenStateChanged")
},