[webkit-changes] [WebKit/WebKit] 924018: [css-color-5] Implement light-dark() function for ...
Aditya Keerthi
noreply at github.com
Mon Jan 1 18:39:00 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9240183bbeb26b30cfaa51cd0f5739eb1429731f
https://github.com/WebKit/WebKit/commit/9240183bbeb26b30cfaa51cd0f5739eb1429731f
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-01-01 (Mon, 01 Jan 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-color/light-dark-basic-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSValueKeywords.in
M Source/WebCore/css/color/CSSUnresolvedColor.cpp
M Source/WebCore/css/color/CSSUnresolvedColor.h
A Source/WebCore/css/color/CSSUnresolvedLightDark.cpp
A Source/WebCore/css/color/CSSUnresolvedLightDark.h
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserContext.h
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js
Log Message:
-----------
[css-color-5] Implement light-dark() function for color values
https://bugs.webkit.org/show_bug.cgi?id=266889
rdar://120171629
Reviewed by Tim Nguyen.
`light-dark()` allows authors to easily specify colors that adjust depending on
an element's used color scheme.
Spec: https://drafts.csswg.org/css-color-5/#light-dark
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/light-dark-basic-expected.txt:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/color/CSSUnresolvedColor.cpp:
(WebCore::CSSUnresolvedColor::containsCurrentColor const):
(WebCore::CSSUnresolvedColor::createStyleColor const):
* Source/WebCore/css/color/CSSUnresolvedColor.h:
* Source/WebCore/css/color/CSSUnresolvedLightDark.cpp: Added.
(WebCore::serializationForCSS):
(WebCore::operator==):
(WebCore::createStyleColor):
* Source/WebCore/css/color/CSSUnresolvedLightDark.h: Added.
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::add):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseLightDarkFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionRaw):
Similar to system colors, there is not an existing mechanism to resolve dynamic
colors in workers.
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
* Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js:
Canonical link: https://commits.webkit.org/272560@main
More information about the webkit-changes
mailing list