RESOLVED DUPLICATE of bug 225185251197
resolution is an optional parameter on image-set()
https://bugs.webkit.org/show_bug.cgi?id=251197
Summary resolution is an optional parameter on image-set()
Karl Dubost
Reported 2023-01-25 23:45:26 PST
Interop2023 Test is failing https://wpt.fyi/results/css/css-images/image-set/image-set-no-res-rendering-2.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2023-webcompat #test { background-image: image-set(url("/images/green.png"), url("/images/green.png")); width: 100px; height: 100px; } is a valid syntax. Safari accepts only #test { background-image: image-set(url("/images/green.png") 1x, url("/images/green.png") 1x); width: 100px; height: 100px; } The spec says: https://w3c.github.io/csswg-drafts/css-images-4/#image-set-notation A <resolution> (optional). This is used to help the UA decide which <image-set-option> to choose. If the image reference is for a raster image, it also specifies the image’s natural resolution, overriding any other source of data that might supply a natural resolution. If not specified, it behaves as 1x for the purpose of selecting which <image-set-option> to use. It also defaults the image’s natural resolution to 1x, but if some other source of data supplies a natural resolution, that resolution must be honored instead.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-01-25 23:45:48 PST
Tim Nguyen (:ntim)
Comment 2 2023-01-26 00:37:06 PST
This should be trivial to fix: https://searchfox.org/wubkat/rev/1c8b29ff201022e3a20578244e85d25d1b7706c4/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp#4432-4436 Not sure how the <= 0 case should be handled, but the !resolution case needs to fallback to 1 instead of doing an early return.
Ryan Reno
Comment 3 2023-02-23 15:21:15 PST
I'm going to dup this to https://bugs.webkit.org/show_bug.cgi?id=225185 since the fix for both of these bugs is best landed together. *** This bug has been marked as a duplicate of bug 225185 ***
Note You need to log in before you can comment on or make changes to this bug.