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

font-variant-alternates list support and case-insensitivity #6299

Conversation

mdubet
Copy link
Contributor

@mdubet mdubet commented Nov 9, 2022

fd6f66d

font-variant-alternates list support and case-insensitivity
https://bugs.webkit.org/show_bug.cgi?id=246811
rdar://101638181

https://www.w3.org/TR/css-fonts-4/#font-variant-alternates-prop

CSS "character-variant" and "styleset" support a list of
feature names in CSS. Before this patch, only a single feature name was supported.

This patch also contains a change to make font family name matching
case insensitive for "@font-feature-values" at-rule.

Reviewed by Darin Adler.

* LayoutTests/TestExpectations:

The alternates-order.html layout test contains 9 specific tests related to font variant.
This patch fixes the remaining 2 out of 9 which were failing:
  - one because of the case-sensitivity in font name matching.
  - another because of the missing support for list value.

* LayoutTests/platform/gtk/TestExpectations:
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::makeStringByJoining):
* Source/WTF/wtf/text/WTFString.h:
* Source/WebCore/css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFeatureValuesRule):
(WebCore::CSSFontSelector::lookupFontFeatureValues):
* Source/WebCore/css/CSSFontSelector.h:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontVariantAlternates):
* Source/WebCore/platform/text/TextFlags.cpp:
(WebCore::operator<<):
(WebCore::computeFeatureSettingsFromVariants):
* Source/WebCore/platform/text/TextFlags.h:
* Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST):

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

4f85275

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe πŸ’₯ πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug ❌ πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ jsc-armv7-tests
  πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-mips
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress βœ… πŸ§ͺ jsc-mips-tests

@mdubet mdubet self-assigned this Nov 9, 2022
@mdubet mdubet added WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). WebKit Nightly Build labels Nov 9, 2022
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 9, 2022
@mdubet mdubet removed the merging-blocked Applied to prevent a change from being merged label Nov 9, 2022
@mdubet mdubet force-pushed the font-variant-alternates-list-support branch from 185980c to c78a033 Compare November 9, 2022 17:31
Source/WTF/wtf/text/WTFString.cpp Outdated Show resolved Hide resolved
Source/WTF/wtf/text/WTFString.h Outdated Show resolved Hide resolved
Source/WebCore/css/CSSFontSelector.cpp Show resolved Hide resolved
Source/WebCore/css/CSSFontSelector.h Show resolved Hide resolved
Source/WebCore/platform/text/TextFlags.cpp Outdated Show resolved Hide resolved
Source/WebCore/platform/text/TextFlags.cpp Outdated Show resolved Hide resolved
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 14, 2022
@mdubet mdubet removed the merging-blocked Applied to prevent a change from being merged label Nov 14, 2022
@mdubet mdubet changed the title Support list for CSS feature-variant-alternates font-variant-alternates list support and case-insensitivity Nov 14, 2022
@mdubet mdubet force-pushed the font-variant-alternates-list-support branch from c78a033 to 4f85275 Compare November 14, 2022 16:28
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 14, 2022
@mdubet mdubet added the merge-queue Applied to send a pull request to merge-queue label Nov 15, 2022
@nt1m nt1m added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged merge-queue Applied to send a pull request to merge-queue labels Nov 15, 2022
https://bugs.webkit.org/show_bug.cgi?id=246811
rdar://101638181

https://www.w3.org/TR/css-fonts-4/#font-variant-alternates-prop

CSS "character-variant" and "styleset" support a list of
feature names in CSS. Before this patch, only a single feature name was supported.

This patch also contains a change to make font family name matching
case insensitive for "@font-feature-values" at-rule.

Reviewed by Darin Adler.

* LayoutTests/TestExpectations:

The alternates-order.html layout test contains 9 specific tests related to font variant.
This patch fixes the remaining 2 out of 9 which were failing:
  - one because of the case-sensitivity in font name matching.
  - another because of the missing support for list value.

* LayoutTests/platform/gtk/TestExpectations:
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::makeStringByJoining):
* Source/WTF/wtf/text/WTFString.h:
* Source/WebCore/css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFeatureValuesRule):
(WebCore::CSSFontSelector::lookupFontFeatureValues):
* Source/WebCore/css/CSSFontSelector.h:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontVariantAlternates):
* Source/WebCore/platform/text/TextFlags.cpp:
(WebCore::operator<<):
(WebCore::computeFeatureSettingsFromVariants):
* Source/WebCore/platform/text/TextFlags.h:
* Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/256702@main
@webkit-commit-queue
Copy link
Collaborator

Committed 256702@main (fd6f66d): https://commits.webkit.org/256702@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit fd6f66d into WebKit:main Nov 15, 2022
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
6 participants