Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4ed6be0ffe79ff604e667da41f9bb4160a56a86d
https://github.com/WebKit/WebKit/commit/4ed6be0ffe79ff604e667da41f9bb4160a56a86d
Author: Taher Ali <[email protected]>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
A
LayoutTests/imported/w3c/web-platform-tests/css/css-link-params/url-modifier-param-typed-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-link-params/url-modifier-param-typed.html
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserContext.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+LinkParameters.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+LinkParameters.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+URL.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+URL.h
M Source/WebCore/css/values/primitives/CSSURL.cpp
M Source/WebCore/css/values/primitives/CSSURLModifiers.h
M Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp
M Source/WebCore/style/values/link-params/StyleLinkParameters.cpp
M Source/WebCore/style/values/link-params/StyleLinkParameters.h
M Source/WebCore/style/values/primitives/StyleURL.cpp
M Source/WebCore/style/values/primitives/StyleURL.h
Log Message:
-----------
[css-link-params] Support param() as a <url-modifier>
https://bugs.webkit.org/show_bug.cgi?id=323888
rdar://187128717
Reviewed by Sam Weinig.
css-link-params makes param() a valid <url-modifier>, so parameters can be
attached
to one URL instead of to every resource the element references:
background-image: url("icon.svg" param(--bg, green));
In this PR we parse, serialize and apply parameters from the url(). These
parameters are merged with those from link-parameters, so a duplicate
name later in the combined list wins.
Note: A <css-type> in url() parses here but is not resolved yet. This will
be done as a follow-up.
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::add):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp:
(WebCore::CSSPropertyParserHelpers::consumeImage):
* Source/WebCore/css/parser/CSSPropertyParserConsumer+LinkParameters.cpp:
(WebCore::CSSPropertyParserHelpers::consumeParamFunctionRaw):
(WebCore::CSSPropertyParserHelpers::consumeParamFunction):
* Source/WebCore/css/parser/CSSPropertyParserConsumer+LinkParameters.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+URL.cpp:
(WebCore::CSSPropertyParserHelpers::consumeURLRaw):
* Source/WebCore/css/parser/CSSPropertyParserConsumer+URL.h:
* Source/WebCore/css/values/primitives/CSSURL.cpp:
(WebCore::CSS::Serialize<URL>::operator):
* Source/WebCore/css/values/primitives/CSSURLModifiers.h:
(WebCore::CSS::get):
* Source/WebCore/style/values/primitives/StyleURL.cpp:
(WebCore::Style::operator<<):
* LayoutTests/TestExpectations:
* Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp:
(WebCore::Style::CachedImage::setContainerContextForRenderer):
* Source/WebCore/style/values/link-params/StyleLinkParameters.cpp:
(WebCore::Style::linkParametersForResource):
* Source/WebCore/style/values/link-params/StyleLinkParameters.h:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-link-params/url-modifier-param-typed-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-link-params/url-modifier-param-typed.html:
Added.
* Source/WebCore/style/values/primitives/StyleURL.h:
Canonical link: https://commits.webkit.org/321418@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications