Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 1d979e658a4948cb03f593c9091b70b275eff5c3 https://github.com/WebKit/WebKit/commit/1d979e658a4948cb03f593c9091b70b275eff5c3 Author: Sam Weinig <wei...@apple.com> Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-color/nested-color-mix-with-currentcolor-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/relative-color-out-of-gamut-expected.txt M LayoutTests/platform/glib/fast/css/hsl-color-expected.txt M LayoutTests/platform/ios/fast/css/hsl-color-expected.txt M LayoutTests/platform/mac/fast/css/hsl-color-expected.txt M LayoutTests/platform/wincairo/fast/css/hsl-color-expected.txt M Source/WebCore/platform/graphics/ColorConversion.cpp M Source/WebCore/platform/graphics/ColorConversion.h M Source/WebCore/platform/graphics/ColorMatrix.h M Source/WebCore/platform/graphics/ColorTypes.h M Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp Log Message: ----------- Re-sync color conversion constants with latest in spec https://bugs.webkit.org/show_bug.cgi?id=272952 Reviewed by Darin Adler. Update the following constants: - xyzToLinear/linearToXYZ 3x3 matrices for the RGB color types. - chromatic adaptation 3x3 matrices - D50 and D65 white point vector - OKLab XYZ <-> LMS matrices Also updated polar/rectilinear conversions to correctly handle the achromatic cases, ensuring conversion to lch/oklch have "powerless" hue when chroma is close to 0, and when that "powerless" hue is transformed back to lab/oklab, that it the opponent A/B values are set to 0. * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html: Update one result to account to more closely match colorjs.io reference results. * LayoutTests/imported/w3c/web-platform-tests/css/css-color/nested-color-mix-with-currentcolor-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/relative-color-out-of-gamut-expected.txt: - Updated results that are now passing. * Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp: (TestWebKitAPI::TEST(Color, P3ConversionToSRGB)): - Updated result to account for change in OKLab conversion. (OKLab is used for the gamut mapping, which is why this only effected this one test). * Source/WebCore/platform/graphics/ColorConversion.cpp: (WebCore::convertToPolarForm): - Updated to account for sufficiently small a/b values that the result would be achromatic. (WebCore::convertToRectangularForm): - Handle missing (NaN) hue, to correctly set a/b to 0. (WebCore::OKLab<float>>::convert): - Update XYZ <-> LMS constants to latest in spec. * Source/WebCore/platform/graphics/ColorConversion.h: - Move and update white point constants to the header to be closer to the chromatic adaptation code. - Update chromatic adaptation constants and add a comment explaining what they are all about. * Source/WebCore/platform/graphics/ColorMatrix.h: (WebCore::ColorMatrix::ColorMatrix): - Allow conversions on construction to allow matrices to be defined with either double or float. (WebCore::brightnessColorMatrix): (WebCore::contrastColorMatrix): (WebCore::invertColorMatrix): (WebCore::opacityColorMatrix): - Fix a typo that was copied in a few places. compontent -> component * Source/WebCore/platform/graphics/ColorTypes.h: - Update LinearRGB <-> XYZ constants. Canonical link: https://commits.webkit.org/278112@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes