Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Implement font-variant-alternates matching
https://bugs.webkit.org/show_bug.cgi?id=246121 rdar://100830615 Reviewed by Myles C. Maxfield. There are still some parts of the spec missing: * mutiple ident in font-variant-alternates for styleset and character-variant * serialization of overwritten declarations The FontFeatureValues object is reference-counted because it is fairly large (it contains 6 HashMaps). * LayoutTests/TestExpectations: * LayoutTests/platform/gtk/TestExpectations: * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/css/CSSFontFace.cpp: (WebCore::CSSFontFace::font): * Source/WebCore/css/CSSFontFace.h: * Source/WebCore/css/CSSFontFeatureValuesRule.cpp: (WebCore::CSSFontFeatureValuesRule::cssText const): * Source/WebCore/css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontPaletteValuesRule): (WebCore::CSSFontSelector::addFontFeatureValuesRule): (WebCore::CSSFontSelector::lookupFontFeatureValues): (WebCore::CSSFontSelector::fontRangesForFamily): * Source/WebCore/css/CSSFontSelector.h: * Source/WebCore/css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::fontRanges): * Source/WebCore/css/CSSSegmentedFontFace.h: * Source/WebCore/css/StyleRule.cpp: (WebCore::StyleRuleFontFeatureValues::StyleRuleFontFeatureValues): (WebCore::StyleRuleFontFeatureValuesBlock::StyleRuleFontFeatureValuesBlock): (WebCore::StyleRuleFontFeatureValues::create): * Source/WebCore/css/StyleRule.h: * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::fontFeatureValuesTypeMappings): (WebCore::CSSParserImpl::consumeFontFeatureValuesRuleBlock): (WebCore::CSSParserImpl::consumeFontFeatureValuesRule): * Source/WebCore/platform/graphics/FontCreationContext.h: (WebCore::FontCreationContextRareData::create): (WebCore::FontCreationContextRareData::fontFeatureValues const): (WebCore::FontCreationContextRareData::operator== const): (WebCore::FontCreationContextRareData::FontCreationContextRareData): (WebCore::FontCreationContext::FontCreationContext): (WebCore::FontCreationContext::fontFeatureValues const): (WebCore::add): * Source/WebCore/platform/graphics/FontFeatureValues.cpp: Added. (WebCore::add): (WebCore::FontFeatureValues::updateOrInsert): (WebCore::FontFeatureValues::updateOrInsertForType): (WebCore::operator<<): * Source/WebCore/platform/graphics/FontFeatureValues.h: Added. (WebCore::FontFeatureValues::create): (WebCore::FontFeatureValues::isEmpty const): (WebCore::FontFeatureValues::operator== const): (WebCore::FontFeatureValues::operator!= const): (WebCore::FontFeatureValues::styleset const): (WebCore::FontFeatureValues::styleset): (WebCore::FontFeatureValues::stylistic const): (WebCore::FontFeatureValues::stylistic): (WebCore::FontFeatureValues::characterVariant const): (WebCore::FontFeatureValues::characterVariant): (WebCore::FontFeatureValues::swash const): (WebCore::FontFeatureValues::swash): (WebCore::FontFeatureValues::ornaments const): (WebCore::FontFeatureValues::ornaments): (WebCore::FontFeatureValues::annotation const): (WebCore::FontFeatureValues::annotation): * Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::preparePlatformFont): * Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp: * Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::fontFeatures): * Source/WebCore/platform/text/TextFlags.cpp: (WebCore::operator<<): (WebCore::add): (WebCore::computeFeatureSettingsFromVariants): (WebCore::reduce): Deleted. * Source/WebCore/platform/text/TextFlags.h: * Source/WebCore/style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::addChildRules): (WebCore::Style::RuleSetBuilder::addMutatingRulesToResolver): Canonical link: https://commits.webkit.org/256002@main
- Loading branch information
Showing
24 changed files
with
484 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.