servo/components/layout_2020/display_list
ToBinio 4f41354349
layout: Scale images in image_set by their specified resolution (#36374)
This PR makes it so the `resolution` factor in `image-set` also affects
the image size.
For instance, in the example below:

```css
background-image: image-set("./small.png" 1x, "./large.png" 2x);
```

if `large.png` is used, an image which is 32x32 will be rendered as
16x16. This is specified
in <https://drafts.csswg.org/css-images-4/#image-set-notation>.

Testing:
 - `css/css-images/image-set/image-set-resolution-002.html`

---------

Signed-off-by: tobinio <Tobias.frischmann1@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-07 13:54:29 +00:00
..
background.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
clip_path.rs Create a constellation_traits crate (#36088) 2025-03-22 15:49:08 +00:00
conversions.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
gradient.rs Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
mod.rs layout: Scale images in image_set by their specified resolution (#36374) 2025-04-07 13:54:29 +00:00
stacking_context.rs compositing: Combine webrender_traits and compositing_traits (#36372) 2025-04-06 17:34:18 +00:00