servo/components/shared/script
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
..
tests Create a constellation_traits crate (#36088) 2025-03-22 15:49:08 +00:00
Cargo.toml webgpu: Add a webgpu_traits crate (#36320) 2025-04-04 08:06:07 +00:00
lib.rs constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
script_msg.rs constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
serializable.rs Make DOMPoint and DOMPointReadOnly serializable (#35989) 2025-03-27 01:35:02 +00:00
transferable.rs Move non-gfx things out of gfx_traits and create a base crate (#32296) 2024-05-17 12:28:58 +00:00