[webkit-changes] [WebKit/WebKit] 0a0261: Fix list of supported font-formats at parse time (...

Vitor Roriz noreply at github.com
Wed May 10 11:02:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0a0261e666d93c3ad1f0e942ebba0e419d2be2bd
      https://github.com/WebKit/WebKit/commit/0a0261e666d93c3ad1f0e942ebba0e419d2be2bd
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-face-src-format-expected.txt
    M Source/WebCore/css/CSSFontFaceSrcValue.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
    M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp
    M Source/WebCore/css/parser/CSSSupportsParser.cpp
    M Source/WebCore/platform/graphics/coretext/FontCustomPlatformDataCoreText.cpp
    M Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
    M Source/WebCore/platform/graphics/win/FontCustomPlatformDataWin.cpp

  Log Message:
  -----------
  Fix list of supported font-formats at parse time (256313)
https://bugs.webkit.org/show_bug.cgi?id=256313
rdar://108897052

Reviewed by Myles C. Maxfield.

We are now rejecting unsupported formats at parsing time.
We are also moving the code fragment that parses the font-format to
its own function, so it can be used by both @font-face src and @supports
parsers.

* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-face-src-format-expected.txt:
* Source/WebCore/css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcResourceValue::fontLoadRequest):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeFontFormat):
(WebCore::CSSPropertyParserHelpers::identMatchesSupportedFontFormat): Deleted.
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp:
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcURI):
* Source/WebCore/css/parser/CSSSupportsParser.cpp:
(WebCore::CSSSupportsParser::consumeSupportsFontFormatFunction):
* Source/WebCore/platform/graphics/coretext/FontCustomPlatformDataCoreText.cpp:
(WebCore::FontCustomPlatformData::supportsFormat):
* Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::supportsFormat):
* Source/WebCore/platform/graphics/win/FontCustomPlatformDataWin.cpp:
(WebCore::FontCustomPlatformData::supportsFormat):

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




More information about the webkit-changes mailing list