Skip to content

Conversation

@tabatkins
Copy link
Member

At the f2f we agreed to drop the max argument and just always resolve to white/black for now, with the intention of resolving on additional functionality in the near future. (We just ran out of timebox for the topic.)

Copy link

@argyleink argyleink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thx!

@tabatkins tabatkins merged commit 1ccd616 into main Feb 4, 2025
1 check passed
@tabatkins tabatkins deleted the color branch February 4, 2025 21:37
webkit-commit-queue pushed a commit to weinig/WebKit that referenced this pull request Feb 11, 2025
https://bugs.webkit.org/show_bug.cgi?id=287410

Reviewed by Tim Nguyen.

Updates the implementation of `contrast-color()` to match the latest
spec which removed `max` parameter (see w3c/csswg-drafts#11654).

Also updates tests and moves the non-WPT tests to WPT, changing the
computed style tests to allow either `white` or `black` for all computed
values due to the lack of agreed upon algorithm.

To keep coverage of the algorithm in WebKit, a copy of the computed style
test was kept in css/fast that retains the specific results.

* LayoutTests/fast/css/color-computed-contrast-color-function-expected.txt:
* LayoutTests/fast/css/color-computed-contrast-color-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-contrast-color-function-expected.txt: Copied from LayoutTests/fast/css/color-computed-contrast-color-function-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-contrast-color-function.html: Copied from LayoutTests/fast/css/color-computed-contrast-color-function.html.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-contrast-color-function-expected.txt: Renamed from LayoutTests/fast/css/color-invalid-contrast-color-function-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-contrast-color-function.html: Renamed from LayoutTests/fast/css/color-invalid-contrast-color-function.html.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-contrast-color-function-expected.txt: Renamed LayoutTests/fast/css/color-valid-contrast-color-function-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-contrast-color-function.html: Renamed LayoutTests/fast/css/color-valid-contrast-color-function.html.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.cpp:
* Source/WebCore/css/values/color/CSSContrastColor.cpp:
* Source/WebCore/css/values/color/CSSContrastColor.h:
* Source/WebCore/css/values/color/CSSContrastColorResolver.h:
* Source/WebCore/css/values/color/CSSContrastColorSerialization.h:
* Source/WebCore/style/values/color/StyleContrastColor.cpp:
* Source/WebCore/style/values/color/StyleContrastColor.h:

Canonical link: https://commits.webkit.org/290210@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants