Files
servo/components/shared/script_layout/Cargo.toml
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

45 lines
1.3 KiB
TOML

[package]
name = "script_layout_interface"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
name = "script_layout_interface"
path = "lib.rs"
[dependencies]
base = { workspace = true }
app_units = { workspace = true }
atomic_refcell = { workspace = true }
canvas_traits = { workspace = true }
constellation_traits = { workspace = true }
embedder_traits = { workspace = true }
euclid = { workspace = true }
fnv = { workspace = true }
fonts = { path = "../../fonts" }
fonts_traits = { workspace = true }
fxhash = { workspace = true }
html5ever = { workspace = true }
ipc-channel = { workspace = true }
libc = { workspace = true }
malloc_size_of = { workspace = true }
malloc_size_of_derive = { workspace = true }
metrics = { path = "../../metrics" }
net_traits = { workspace = true }
pixels = { path = "../../pixels" }
profile_traits = { workspace = true }
range = { path = "../../range" }
script_traits = { workspace = true }
selectors = { workspace = true }
serde = { workspace = true }
servo_arc = { workspace = true }
servo_url = { path = "../../url" }
stylo = { workspace = true }
stylo_traits = { workspace = true }
webrender_api = { workspace = true }
webrender_traits = { workspace = true }