servoshell: Consider window decorations when handling resize requests from web content (#38174)

Also fix some docs. This is used by JS `resizeTo`, `resizeBy` and
webdriver [set window
rect](https://w3c.github.io/webdriver/#set-window-rect).

Testing: Can now pass more tests for headed window.
Fixes: Well.. Originally the attempt is to address
https://github.com/servo/servo/issues/38093#issuecomment-3092284104. But
it turns out as a more general problem to be fixed in another PR.

---------

Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
Euclid Ye 2025-07-24 13:42:04 +08:00 committed by GitHub
parent f62aa8edc2
commit 0b8986c8da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 47 additions and 30 deletions

View file

@ -44,7 +44,7 @@ pub(crate) struct ServoShellPreferences {
/// Overrides directives specified via `SERVO_TRACING` if set.
/// See: <https://docs.rs/tracing-subscriber/0.3.19/tracing_subscriber/filter/struct.EnvFilter.html#directives>
pub tracing_filter: Option<String>,
/// The initial requested size of the window.
/// The initial requested inner size of the window.
pub initial_window_size: Size2D<u32, DeviceIndependentPixel>,
/// An override for the screen resolution. This is useful for testing behavior on different screen sizes,
/// such as the screen of a mobile device.