Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a08c3d1966f92e32a037a51a30b99567a536cd4b
      
https://github.com/WebKit/WebKit/commit/a08c3d1966f92e32a037a51a30b99567a536cd4b
  Author: Antoine Quint <[email protected]>
  Date:   2024-04-09 (Tue, 09 Apr 2024)

  Changed paths:
    M LayoutTests/css3/color/color-function-computed-style-expected.txt
    M LayoutTests/css3/color/color-function-computed-style.html
    M LayoutTests/css3/color/color-function-parsing-expected.txt
    M LayoutTests/css3/color/color-function-parsing.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animate-with-color-mix-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-mix-out-of-gamut-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/animate-with-color-mix-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-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/platform/graphics/ColorSerialization.cpp

  Log Message:
  -----------
  [css-animations] css/css-animations/animate-with-color-mix.html is a failure
https://bugs.webkit.org/show_bug.cgi?id=272083

Reviewed by Anne van Kesteren and Darin Adler.

The `assert_oklab_color()` function in `css/support/color-testcommon.js` 
rejected our serialization
for `oklab()` colors because they included scientific notation. Indeed, this is 
incorrect, since CSS
numbers ought not be serialized using scientific notation, as the css-color 
spec indicates [0]:

    The component values are serialized in base 10; the L, a, b and C component 
values are serialized as <number>

And the CSSOM spec indicates the following for serialization of `<number>` [1]:

    A base-ten number using digits 0-9 (U+0030 to U+0039) in the shortest form 
possible, using “.” to
    separate decimals (if any), rounding the value if necessary to not produce 
more than 6 decimals,
    preceded by “-” (U+002D) if it is negative.
    NOTE: scientific notation is not used.

Credit to Anne van Kesteren for pointing out the relevant spec text here and 
find the root cause
of this issue. So all we needed to do was change the way we serialized 
`oklab()` and `oklch()` colors.

This change required some rebaselining or the addition of fuzzy comparison in 
the case of the WPT
test `css/css-color/parsing/color-valid-color-mix-function.html`.

[0] https://drafts.csswg.org/css-color-4/#serializing-oklab-oklch
[1] https://drafts.csswg.org/cssom/#serializing-css-values

* LayoutTests/css3/color/color-function-computed-style-expected.txt:
* LayoutTests/css3/color/color-function-computed-style.html:
* LayoutTests/css3/color/color-function-parsing-expected.txt:
* LayoutTests/css3/color/color-function-parsing.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animate-with-color-mix-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-mix-out-of-gamut-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/animate-with-color-mix-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-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/platform/graphics/ColorSerialization.cpp:
(WebCore::numericComponent):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to