Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b487fb860c56c76b34d97cfd7ca3c13e5c35f05
      
https://github.com/WebKit/WebKit/commit/9b487fb860c56c76b34d97cfd7ca3c13e5c35f05
  Author: Vitor Roriz <[email protected]>
  Date:   2026-06-03 (Wed, 03 Jun 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html
    M Source/WebCore/css/CSSFontFace.cpp
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp
    M Source/WebCore/css/values/fonts/CSSFontStyleRange.cpp
    M Source/WebCore/css/values/fonts/CSSFontStyleRange.h

  Log Message:
  -----------
  Serialize @font-face descriptor ranges with equal bounds as a single value
https://bugs.webkit.org/show_bug.cgi?id=316086
rdar://178517226

Reviewed by Sam Weinig.

Per CSSOM 6.7.2, equal-bounded <X>{1,2} ranges should collapse to a single
value. font-weight and font-width descriptors now use a @(type=CSSValuePair
default=previous) grammar annotation, which produces a coalescing CSSValuePair
that serializes equal values as one. font-style oblique has a custom parser, so
the collapse is achieved by storing both angles in a
MinimallySerializingSpaceSeparatedPair, which coalesces equal values on
serialization.

Also fix the WPT test to expect oblique 20deg for oblique 20deg 20deg, matching
the same collapse rule the test already asserts for oblique 10deg 10deg.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html:
* Source/WebCore/css/CSSFontFace.cpp:
(WebCore::calculateFontFaceStyleInfo):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp:
(WebCore::CSSPropertyParserHelpers::consumeUnresolvedFontFaceFontStyle):
* Source/WebCore/css/values/fonts/CSSFontStyleRange.cpp:
(WebCore::CSS::Serialize<FontStyleRange::Oblique>::operator()):
* Source/WebCore/css/values/fonts/CSSFontStyleRange.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to