[webkit-changes] [WebKit/WebKit] 39681d: [css-fonts] font-feature-settings and font-variati...

Antoine Quint noreply at github.com
Tue Feb 14 23:00:12 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39681d9b2bda037dcbaf89aa6e7c3ece7436d449
      https://github.com/WebKit/WebKit/commit/39681d9b2bda037dcbaf89aa6e7c3ece7436d449
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    M LayoutTests/animations/font-variations/font-variation-settings-order-expected.txt
    M LayoutTests/animations/font-variations/font-variation-settings-order.html
    M LayoutTests/fast/text/variations/getComputedStyle-expected.txt
    M LayoutTests/fast/text/variations/getComputedStyle.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/inheritance-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-feature-settings-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-feature-settings-computed.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-variation-settings-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-variation-settings-computed.html
    M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt
    M Source/WebCore/animation/CSSPropertyAnimation.cpp
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/platform/graphics/FontTaggedSettings.h

  Log Message:
  -----------
  [css-fonts] font-feature-settings and font-variation-settings should sort their tags alphabetically
https://bugs.webkit.org/show_bug.cgi?id=252238

Reviewed by Myles C. Maxfield.

We have some WPT test failures for font-variation-settings animation due to our sorting duplicate
tags differently than Chrome and Firefox (alphabetically by ascending order). While the css-fonts
spec does not specify any order for tags in the computed style, we adopt the same style as Chrome
and Firefox for font-variation-settings.

Since this applies not just to animated values but this issue wasn't caught by parsing test, we add
some new WPT tests to css/css-fonts/parsing/font-variation-settings-computed.html.

Finally, since font-feature-settings is a similar type of property, and we implement both with the
templatized FontTaggedSettings class, we apply the same rule for this CSS property as well. We also
update our copy of the css/css-fonts/parsing/font-variation-settings-computed.html WPT since it now
passes with our new rule.

Since we implement the deduplication and sorting directly in FontTaggedSettings<T>::insert, there is
no need for the FontTaggedSettings<T>::deduplicated method used in ComputedStyleExtractor and
CSSPropertyAnimation which was recently introduced in 260212 at main, so we largely revert that patch
as far as those two classes are concerned.

A spec issue was filed to match this behavior: https://github.com/w3c/csswg-drafts/issues/8450.

* LayoutTests/animations/font-variations/font-variation-settings-order-expected.txt:
* LayoutTests/animations/font-variations/font-variation-settings-order.html:
* LayoutTests/fast/text/variations/getComputedStyle-expected.txt:
* LayoutTests/fast/text/variations/getComputedStyle.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/inheritance-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-feature-settings-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-feature-settings-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-variation-settings-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-variation-settings-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::PropertyWrapperGetter::value const):
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* Source/WebCore/platform/graphics/FontTaggedSettings.h:
(WebCore::FontTaggedSettings<T>::insert):
(WebCore::FontTaggedSetting<T>::operator< const): Deleted.
(WebCore::FontTaggedSettings<T>::deduplicated const): Deleted.

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




More information about the webkit-changes mailing list