Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix list of supported font-formats at parse time (256313) #13513

Merged
merged 1 commit into from May 10, 2023

Conversation

vitorroriz
Copy link
Contributor

@vitorroriz vitorroriz commented May 5, 2023

0a0261e

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

2651178

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@vitorroriz vitorroriz self-assigned this May 5, 2023
@vitorroriz vitorroriz added the CSS Cascading Style Sheets implementation label May 5, 2023
@vitorroriz vitorroriz requested review from nt1m and litherum May 5, 2023 20:22
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 5, 2023
@vitorroriz vitorroriz removed the merging-blocked Applied to prevent a change from being merged label May 8, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 8, 2023
@vitorroriz vitorroriz removed the merging-blocked Applied to prevent a change from being merged label May 10, 2023
@vitorroriz vitorroriz requested a review from a team as a code owner May 10, 2023 11:19
@vitorroriz vitorroriz added the merge-queue Applied to send a pull request to merge-queue label May 10, 2023
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
@webkit-commit-queue
Copy link
Collaborator

Committed 263914@main (0a0261e): https://commits.webkit.org/263914@main

Reviewed commits have been landed. Closing PR #13513 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 0a0261e into WebKit:main May 10, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Cascading Style Sheets implementation
Projects
None yet
5 participants