Bug 1684770 - Implement parsing and serialization for most of image-set(). r=boris
commit3bc6746c91f026cc5110d112ce2c443ffcbd92b9
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 7 Jan 2021 04:15:29 +0000 (7 04:15 +0000)
committerEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 7 Jan 2021 04:15:29 +0000 (7 04:15 +0000)
tree2dd600cf2353e58456f682ef8244b67dbd00125f
parent9fbf3695e7fda1adafc95383eb6bc29f987725a4
Bug 1684770 - Implement parsing and serialization for most of image-set(). r=boris

This implements the basic image-set notation without the format()
function (for simplicity).

There's a remaining serialization issue (we should probably skip 1x
resolutions), but that's fine for now, I'll address this in a follow-up
when the feature is testable.

The intention is to do the image selection at computed value time
(keeping a selected index or such), but same, follow-up.

This also fixes an issue where the cors-mode for -moz-image-rect and
cross-fade() was getting ignored when parsing.

Differential Revision: https://phabricator.services.mozilla.com/D100640
layout/painting/nsImageRenderer.cpp
layout/style/nsStyleStruct.cpp
modules/libpref/init/StaticPrefList.yaml
servo/components/style/gecko/url.rs
servo/components/style/values/computed/image.rs
servo/components/style/values/computed/resolution.rs
servo/components/style/values/generics/image.rs
servo/components/style/values/specified/image.rs
servo/components/style/values/specified/resolution.rs