servo/components/layout_2020
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
..
display_list Fix: display: inline-grid considered an atomic inline (#36298) 2025-04-03 19:48:19 +00:00
flexbox layout: Restrict stretch alignment to flex items with computed auto size (#36288) 2025-04-04 10:15:40 +00:00
flow layout: Restrict stretch alignment to flex items with computed auto size (#36288) 2025-04-04 10:15:40 +00:00
fragment_tree Fix: display: inline-grid considered an atomic inline (#36298) 2025-04-03 19:48:19 +00:00
table layout: Simplify and generalize the usage of pseudo-elements (#36202) 2025-03-29 12:41:04 +00:00
taffy layout: Improve style conversion for Taffy (#36311) 2025-04-03 15:47:56 +00:00
tests Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
Cargo.toml Cleanup Stylo dependencies (#36046) 2025-03-19 08:53:26 +00:00
cell.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
construct_modern.rs layout: Simplify and generalize the usage of pseudo-elements (#36202) 2025-03-29 12:41:04 +00:00
context.rs layout: Implement support for image-set() notation (#36210) 2025-03-29 13:20:16 +00:00
dom.rs layout: Simplify and generalize the usage of pseudo-elements (#36202) 2025-03-29 12:41:04 +00:00
dom_traversal.rs fix: root element not establishing stacking context (#35390) (#36174) 2025-04-03 17:30:42 +00:00
formatting_contexts.rs layout: Cache IndependentNonReplacedContents::layout() (#36082) 2025-03-24 12:33:44 +00:00
geom.rs layout: Implement the fit-content() sizing function (#36056) 2025-03-23 14:26:44 +00:00
layout_box_base.rs layout: Cache IndependentNonReplacedContents::layout() (#36082) 2025-03-24 12:33:44 +00:00
lib.rs layout: Cache IndependentNonReplacedContents::layout() (#36082) 2025-03-24 12:33:44 +00:00
lists.rs layout: Simplify and generalize the usage of pseudo-elements (#36202) 2025-03-29 12:41:04 +00:00
positioned.rs layout: Cache IndependentNonReplacedContents::layout() (#36082) 2025-03-24 12:33:44 +00:00
query.rs layout: Simplify and generalize the usage of pseudo-elements (#36202) 2025-03-29 12:41:04 +00:00
quotes.rs layout: Implement a non-recursive version of CSS quotes (#34770) 2025-02-27 16:00:21 +00:00
replaced.rs constellation: Stop assuming that the viewport is shared by all WebViews (#36312) 2025-04-04 17:06:34 +00:00
sizing.rs layout: Restrict stretch alignment to flex items with computed auto size (#36288) 2025-04-04 10:15:40 +00:00
style_ext.rs layout: Restrict stretch alignment to flex items with computed auto size (#36288) 2025-04-04 10:15:40 +00:00
traversal.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00