[webkit-changes] [WebKit/WebKit] 1ef44e: [css-color] color-mix() should not serialize to le...

Tim Nguyen noreply at github.com
Tue Sep 5 06:32:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1ef44e37dd8a99ee413a9753574e927d30c0be14
      https://github.com/WebKit/WebKit/commit/1ef44e37dd8a99ee413a9753574e927d30c0be14
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2023-09-05 (Tue, 05 Sep 2023)

  Changed paths:
    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-mix-out-of-gamut-expected.txt
    M LayoutTests/platform/gtk/fast/forms/basic-inputs-expected.txt
    M LayoutTests/platform/gtk/fast/forms/basic-textareas-expected.txt
    M LayoutTests/platform/gtk/fast/forms/basic-textareas-quirks-expected.txt
    M LayoutTests/platform/gtk/fast/forms/input-appearance-disabled-expected.txt
    M LayoutTests/platform/gtk/fast/forms/input-disabled-color-expected.txt
    M LayoutTests/platform/gtk/fast/forms/placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/gtk/fast/forms/textarea-placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/ios-wk2/fast/forms/basic-textareas-quirks-expected.txt
    M LayoutTests/platform/ios/fast/forms/basic-inputs-expected.txt
    M LayoutTests/platform/ios/fast/forms/basic-textareas-expected.txt
    M LayoutTests/platform/ios/fast/forms/basic-textareas-quirks-expected.txt
    M LayoutTests/platform/ios/fast/forms/input-appearance-disabled-expected.txt
    M LayoutTests/platform/ios/fast/forms/input-disabled-color-expected.txt
    M LayoutTests/platform/ios/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt
    M LayoutTests/platform/ios/fast/forms/placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/ios/fast/forms/textarea-placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/mac-monterey/fast/forms/basic-inputs-expected.txt
    M LayoutTests/platform/mac-monterey/fast/forms/input-disabled-color-expected.txt
    M LayoutTests/platform/mac-monterey/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt
    M LayoutTests/platform/mac-monterey/fast/forms/placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt
    M LayoutTests/platform/mac-ventura/fast/forms/basic-inputs-expected.txt
    M LayoutTests/platform/mac-ventura/fast/forms/input-disabled-color-expected.txt
    M LayoutTests/platform/mac-ventura/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt
    M LayoutTests/platform/mac-ventura/fast/forms/placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/mac/fast/forms/basic-inputs-expected.txt
    M LayoutTests/platform/mac/fast/forms/basic-textareas-expected.txt
    M LayoutTests/platform/mac/fast/forms/basic-textareas-quirks-expected.txt
    M LayoutTests/platform/mac/fast/forms/input-appearance-disabled-expected.txt
    M LayoutTests/platform/mac/fast/forms/input-disabled-color-expected.txt
    M LayoutTests/platform/mac/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt
    M LayoutTests/platform/mac/fast/forms/placeholder-pseudo-style-expected.txt
    M LayoutTests/platform/mac/fast/forms/textarea-placeholder-pseudo-style-expected.txt
    M Source/WebCore/css/color/CSSResolvedColorMix.cpp
    M Source/WebCore/platform/graphics/ColorNormalization.h

  Log Message:
  -----------
  [css-color] color-mix() should not serialize to legacy color syntax
https://bugs.webkit.org/show_bug.cgi?id=261122
rdar://114949008

Reviewed by Antti Koivisto.

According to https://drafts.csswg.org/css-color-5/#serial-color-mix, color-mix() should always serialize to the color() function, except
when interpolating with lab/lch/oklab/oklch (since the color() function doesn't take those).

Rebaseline a bunch of forms tests to reflect this, since UA stylesheet uses color-mix().

* 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-mix-out-of-gamut-expected.txt:

Out of gamut test needs interpolation behavior changes in order to pass.

* LayoutTests/platform/gtk/fast/forms/basic-inputs-expected.txt:
* LayoutTests/platform/gtk/fast/forms/basic-textareas-expected.txt:
* LayoutTests/platform/gtk/fast/forms/basic-textareas-quirks-expected.txt:
* LayoutTests/platform/gtk/fast/forms/input-appearance-disabled-expected.txt:
* LayoutTests/platform/gtk/fast/forms/input-disabled-color-expected.txt:
* LayoutTests/platform/gtk/fast/forms/placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/gtk/fast/forms/textarea-placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/ios-wk2/fast/forms/basic-textareas-quirks-expected.txt:
* LayoutTests/platform/ios/fast/forms/basic-inputs-expected.txt:
* LayoutTests/platform/ios/fast/forms/basic-textareas-expected.txt:
* LayoutTests/platform/ios/fast/forms/basic-textareas-quirks-expected.txt:
* LayoutTests/platform/ios/fast/forms/input-appearance-disabled-expected.txt:
* LayoutTests/platform/ios/fast/forms/input-disabled-color-expected.txt:
* LayoutTests/platform/ios/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt:
* LayoutTests/platform/ios/fast/forms/placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/ios/fast/forms/textarea-placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/mac-monterey/fast/forms/basic-inputs-expected.txt:
* LayoutTests/platform/mac-monterey/fast/forms/input-disabled-color-expected.txt:
* LayoutTests/platform/mac-monterey/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt:
* LayoutTests/platform/mac-monterey/fast/forms/placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt: Renamed from LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt.
* LayoutTests/platform/mac-ventura/fast/forms/basic-inputs-expected.txt:
* LayoutTests/platform/mac-ventura/fast/forms/input-disabled-color-expected.txt:
* LayoutTests/platform/mac-ventura/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt:
* LayoutTests/platform/mac-ventura/fast/forms/placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/mac/fast/forms/basic-inputs-expected.txt:
* LayoutTests/platform/mac/fast/forms/basic-textareas-expected.txt:
* LayoutTests/platform/mac/fast/forms/basic-textareas-quirks-expected.txt:
* LayoutTests/platform/mac/fast/forms/input-appearance-disabled-expected.txt:
* LayoutTests/platform/mac/fast/forms/input-disabled-color-expected.txt:
* LayoutTests/platform/mac/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt:
* LayoutTests/platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
* LayoutTests/platform/mac/fast/forms/textarea-placeholder-pseudo-style-expected.txt:
* Source/WebCore/css/color/CSSResolvedColorMix.cpp:
(WebCore::mixColorComponentsUsingColorInterpolationMethod):
* Source/WebCore/platform/graphics/ColorNormalization.h:
(WebCore::makeCanonicalColor):
(WebCore::makeCanonicalColor<HWBA<float>>):
(WebCore::makeCanonicalColor<HSLA<float>>):

Canonical link: https://commits.webkit.org/267626@main




More information about the webkit-changes mailing list