servo/components/shared
Martin Robinson fb344ba4e9
constellation: Stop assuming that the viewport is shared by all WebViews (#36312)
The `Constellation` previously held a `window_size` member, but this
assumes that all `WebView`s have the same size. This change removes that
assumption as well as making sure that all `WebView`s pass their size
and HiDIP scaling to the `Constellation` when they are created.

In addition

- `WindowSizeData` is renamed to `ViewportDetails`, as it was
holding more than just the size and it didn't necessarily correspond to
  a "window." It's used for tracking viewport data, whether for an
  `<iframe>` or the main `WebView` viewport.
- `ViewportDetails` is stored more consistently so that conceptually an
  `<iframe>` can also have its own HiDPI scaling. This isn't something
  we necessarily want, but it makes everything conceptually simpler.

The goal with this change is to work toward allowing per-`WebView` HiDPI
scaling and sizing. There are still some corresponding changes in the
compositor to make that happen, but they will in a subsequent change.

Testing: This is covered by existing tests. There should be no behavior
changes.
Fixes: This is part of #36232.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-04 17:06:34 +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 compositor: Remove the script channel from the compositor (#36089) 2025-03-23 11:19:27 +00:00
constellation constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
devtools Add SimulateColorScheme command and script thread handling (#36253) 2025-04-01 02:08:27 +00:00
embedder constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
fonts Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
net Webdriver delete cookie (#36306) 2025-04-04 05:24:47 +00:00
profile metrics: Simplify ProgressiveWebMetrics (#35985) 2025-03-21 14:55:00 +00:00
script constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
script_layout constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
webgpu webgpu: Add a webgpu_traits crate (#36320) 2025-04-04 08:06:07 +00:00
webrender libservo: Start moving WindowMethods to WebViewDelegate (#36223) 2025-04-02 11:17:24 +00:00
webxr Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00