Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 005000ee701fad3f8dbad0f7af39d1da53cb8638
      
https://github.com/WebKit/WebKit/commit/005000ee701fad3f8dbad0f7af39d1da53cb8638
  Author: Sam Weinig <wei...@apple.com>
  Date:   2024-04-27 (Sat, 27 Apr 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/animation/color-interpolation-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-invalid-relative-color-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-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/css/parser/CSSPropertyParserConsumer+Color.cpp
    M Source/WebCore/platform/graphics/ColorModels.h
    M Source/WebCore/platform/graphics/ColorTypes.h
    M Source/WebCore/platform/graphics/ColorUtilities.h

  Log Message:
  -----------
  Re-sync remaining color types with the latest spec
https://bugs.webkit.org/show_bug.cgi?id=273278

Reviewed by Darin Adler.

The CSS Color specification has changed since color(), lab(), lch(),
oklab(), and oklch() were last worked on. This updates things to support:

- Updated ranges of allowed values (with oklab and oklch needing their
  own model objects to represent a different ranges).
- Normalize the hue angle for lch/oklch at parse time.
- Changes to the types used by the component symbols used in the relative
  color form to always be CSS_NUMBER.
- Update to use the origin color's alpha value if there is none provided
  in a relative color.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/animation/color-interpolation-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-invalid-relative-color-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt:
    - Updated results for additional passing tests.

* LayoutTests/platform/glib/fast/css/hsl-color-expected.txt
* LayoutTests/LayoutTests/platform/ios/fast/css/hsl-color-expected.txt
* LayoutTests/LayoutTests/platform/mac/fast/css/hsl-color-expected.txt
* LayoutTests/LayoutTests/platform/wincairo/fast/css/hsl-color-expected.txt
    - Updated to account for change in the oklab style gamut mapping. This is 
only visible in
      render tree dumps as we explicitly convert in the render tree 
serialization.

* Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.cpp:
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParametersRaw):
(WebCore::CSSPropertyParserHelpers::parseLCHParametersRaw):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParametersRaw):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionForXYZTypes):
    - Update relative function symbol tables and provided default alpha values.
    - Hue is now normalized consistently.

* Source/WebCore/platform/graphics/ColorModels.h:
    - Added separate models for OKLab and OKLCH.
    - Update ranges to match latest spec (including one small fix to HSL, though
      that is only ever really going to be used for assertions so now test 
changes).
    - Remove concept of a Percentage ColorComponentType, replacing all of them
      with Number. The only distinction we care about is angle vs. not-angle.

* Source/WebCore/platform/graphics/ColorTypes.h:
    - Update models for OKLab and OKLCHA.

* Source/WebCore/platform/graphics/ColorUtilities.h:
    - Update isWhite/isBlack for new model types and replaced use of component
      info min/max values with hard coded values, as the max range does not
      correspond with the white/black point.

Canonical link: https://commits.webkit.org/278083@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

Reply via email to