servo/components/shared
Martin Robinson c6dc7c83a8
libservo: Make zooming and HiDPI scaling work per-WebView (#36419)
libservo: Make zooming and HiDPI scaling work per-`WebView`

This change moves all zooming and HiDPI scaling to work per-`WebView` in
both libservo and Compositor. This means that you can pinch zoom one
`WebView` and it should now work independently of other `WebView`s.
This is accomplished by making each `WebView` in the WebRender scene
have its own scaling reference frame.

All WebViews are now expected to manage their HiDPI scaling factor and
this can be set independently of other WebViews. Perhaps in the future
this will become a Servo-wide setting.

This allows full removal of the `WindowMethods` trait from Servo.

Testing: There are not yet any tests for the WebView API, but I hope
to add those soon.

Co-authored-by: Shubham Gupta <shubham13297@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Shubham Gupta <shubham13297@gmail.com>
2025-04-14 12:01:49 +00:00
..
background_hang_monitor script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
base Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas canvas: Implement line dash setters and getters (#36257) 2025-04-01 11:22:00 +00:00
compositing libservo: Make zooming and HiDPI scaling work per-WebView (#36419) 2025-04-14 12:01:49 +00:00
constellation Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
devtools Devtools: initial Debugger > Sources panel (#36164) 2025-04-08 09:22:53 +00:00
embedder libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420) 2025-04-09 14:19:33 +00:00
fonts Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
net Update FetchTaskTarget to propagate CSP violations. (#36409) 2025-04-13 20:54:59 +00:00
profile Make the memory reporting multi-process aware (#35863) 2025-04-05 05:42:12 +00:00
script compositing: Combine webrender_traits and compositing_traits (#36372) 2025-04-06 17:34:18 +00:00
script_layout feat: Implement display for text selection and caret (#35830) 2025-04-10 14:40:38 +00:00
webgpu Add serde and wgsl features to wgpu-core (#36411) 2025-04-09 10:09:13 +00:00
webxr libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420) 2025-04-09 14:19:33 +00:00