Per https://github.com/w3c/csswg-drafts/issues/6285, it was decided to make -webkit-image-set a parse-time alias.
<rdar://problem/82999675>
per bug 206909 we did actually briefly do this, but this then got reverted due to Gmail breakage, gonna file a new bug for fixing the underlying issue there and mark this as blocked on that
The prior Gmail issue no longer seems to trivially reproduce, as empty URLs in image-set no longer cause a broken image icon to be shown.
Not sure why some of these tests are failing http://wpt.live/css/css-images/image-set/image-set-parsing.html But manually it is working. > document.body.style.backgroundImage < "" > document.body.style['background-image'] < "" > document.body.style.backgroundImage = "-webkit-image-set(url('example.png') 1x)" < "-webkit-image-set(url('example.png') 1x)" > document.body.style.backgroundImage < "image-set(url(\"example.png\") 1x)" > document.body.style['background-image'] < "image-set(url(\"example.png\") 1x)" > document.body.style.getPropertyValue("background-image") < "image-set(url(\"example.png\") 1x)"
Probably necessary for Interop2023. Note that -webkit-image-set() is already an alias of image-set
It sorta is and sorta isn't. It still has its own parser: https://github.com/WebKit/WebKit/blob/1e76207c4357149a69994b53bb756f31996c13df/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp#L4666
Ah thanks for the link, Sam. I need to dig into this for understanding the differences.
I can't reproduce the gmail issue with this simple diff: diff --git a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp index 173d2397e7c4..5c836404e9ba 100644 --- a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp +++ b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp @@ -4672,10 +4672,8 @@ RefPtr<CSSValue> consumeImage(CSSParserTokenRange& range, const CSSParserContext return consumeGeneratedImage(range, context); if (allowedImageTypes.contains(AllowedImageType::ImageSet)) { - if (functionId == CSSValueImageSet) + if (functionId == CSSValueImageSet || functionId == CSSValueWebkitImageSet) return consumeImageSet(range, context, (allowedImageTypes | AllowedImageType::RawStringAsURL) - AllowedImageType::ImageSet); - if (functionId == CSSValueWebkitImageSet) - return consumeImageSet(range, context, AllowedImageType::URLFunction); } } But that diff does progress some of the WPT subtests we are currently failing because we don't implement -webkit-image-set as an alias.
Pull request: https://github.com/WebKit/WebKit/pull/9718
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/38394
Committed 259994@main (5e38273c02f7): <https://commits.webkit.org/259994@main> Reviewed commits have been landed. Closing PR #9718 and removing active labels.