Skip to content
Permalink
Browse files
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
mdubet committed Oct 26, 2022
1 parent 23864cb commit a14a556da51f33eb6557c948e684c7f783d5da77
Show file tree
Hide file tree
Showing 24 changed files with 484 additions and 161 deletions.
@@ -3763,23 +3763,10 @@ webkit.org/b/182042 imported/w3c/web-platform-tests/css/css-fonts/font-kerning-0
webkit.org/b/86071 imported/w3c/web-platform-tests/css/css-fonts/font-kerning-05.html [ ImageOnlyFailure ]

# font-variant-alternates
# (failing because of font-family case matching, and multiple properties unimplemented)
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/alternates-order.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-03.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-04.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-05.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-06.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-07.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-08.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-09.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-10.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-11.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-12.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-13.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-14.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-15.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-16.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-17.html [ ImageOnlyFailure ]
webkit.org/b/246121 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-18.html [ ImageOnlyFailure ]

# font-size-adjust CSS Fonts Module level 5 (current implementation is at level 4)
webkit.org/b/15257 imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-009.html [ ImageOnlyFailure ]
@@ -1961,4 +1961,20 @@ webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intri
webkit.org/b/245900 [ Debug ] fast/inline/inline-box-adjust-position-crash2.html [ Skip ]

# http version of this test fails, but https passes. May be a PingLoad issue in GTK
webkit.org/b/246766 imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub.html [ Failure ]
webkit.org/b/246766 imported/w3c/web-platform-tests/reporting/generateTestReport-honors-endpoint.http.sub.html [ Failure ]

# font-variant-alternates https://bugs.webkit.org/show_bug.cgi?id=246952
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-03.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-04.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-05.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-06.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-07.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-08.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-09.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-10.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-11.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-12.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-15.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-16.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-17.html [ ImageOnlyFailure ]
webkit.org/b/246952 imported/w3c/web-platform-tests/css/css-fonts/font-variant-alternates-18.html [ ImageOnlyFailure ]
@@ -1577,6 +1577,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
platform/graphics/FontCreationContext.h
platform/graphics/FontDescription.h
platform/graphics/FontFamilySpecificationNull.h
platform/graphics/FontFeatureValues.h
platform/graphics/FontGenericFamilies.h
platform/graphics/FontMetrics.h
platform/graphics/FontPalette.h
@@ -2120,6 +2120,7 @@ platform/graphics/FontCascadeDescription.cpp
platform/graphics/FontCascadeFonts.cpp
platform/graphics/FontDescription.cpp
platform/graphics/FontFamilySpecificationNull.cpp
platform/graphics/FontFeatureValues.cpp
platform/graphics/FontGenericFamilies.cpp
platform/graphics/FontPlatformData.cpp
platform/graphics/FontRanges.cpp
@@ -4503,6 +4503,7 @@
BE20508218A460C30080647E /* JSVTTCue.h in Headers */ = {isa = PBXBuildFile; fileRef = BE20508018A460AA0080647E /* JSVTTCue.h */; };
BE23480D18A9871400E4B6E8 /* DataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = BE23480A18A9870300E4B6E8 /* DataCue.h */; settings = {ATTRIBUTES = (Private, ); }; };
BE61039E18A9D65A00DD50D7 /* JSDataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = BE61039C18A9D61200DD50D7 /* JSDataCue.h */; };
BE88176C28FF5C3E001AF304 /* FontFeatureValues.h in Headers */ = {isa = PBXBuildFile; fileRef = BE4662C128F853D10050A5D3 /* FontFeatureValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
BE88E0C21715CE2600658D98 /* TrackListBase.h in Headers */ = {isa = PBXBuildFile; fileRef = BE88E0C01715CE2600658D98 /* TrackListBase.h */; };
BE88E0D91715D2A200658D98 /* AudioTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = BE88E0CD1715D2A200658D98 /* AudioTrack.h */; settings = {ATTRIBUTES = (Private, ); }; };
BE88E0DC1715D2A200658D98 /* AudioTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = BE88E0D01715D2A200658D98 /* AudioTrackList.h */; };
@@ -16272,6 +16273,7 @@
BE23480918A9870300E4B6E8 /* DataCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataCue.cpp; sourceTree = "<group>"; };
BE23480A18A9870300E4B6E8 /* DataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataCue.h; sourceTree = "<group>"; };
BE23480B18A9870300E4B6E8 /* DataCue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DataCue.idl; sourceTree = "<group>"; };
BE4662C128F853D10050A5D3 /* FontFeatureValues.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontFeatureValues.h; sourceTree = "<group>"; };
BE61039B18A9D61200DD50D7 /* JSDataCue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataCue.cpp; sourceTree = "<group>"; };
BE61039C18A9D61200DD50D7 /* JSDataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataCue.h; sourceTree = "<group>"; };
BE855F7F0701E83500239769 /* WebCoreView.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -29853,6 +29855,7 @@
B2C3DA550D006CD600EF6F26 /* FontDescription.h */,
C280B3FD1EF4608900D35135 /* FontFamilySpecificationNull.cpp */,
C2C2CF551EF3761A004281A8 /* FontFamilySpecificationNull.h */,
BE4662C128F853D10050A5D3 /* FontFeatureValues.h */,
E44EE3A617576E5500EEE8CF /* FontGenericFamilies.cpp */,
E44EE3A717576E5500EEE8CF /* FontGenericFamilies.h */,
0845680712B90DA600960A9F /* FontMetrics.h */,
@@ -35806,6 +35809,7 @@
1C24EEA51C729CE40080F8FC /* FontFaceSet.h in Headers */,
1C12AC2B1EE778AE0079E0A0 /* FontFamilySpecificationCoreText.h in Headers */,
3294ECFA274EFA57006BE8C8 /* FontFamilySpecificationCoreTextCache.h in Headers */,
BE88176C28FF5C3E001AF304 /* FontFeatureValues.h in Headers */,
E42EE3A717576E5500EEE8CF /* FontGenericFamilies.h in Headers */,
658436860AE01B7400E53743 /* FontLoadRequest.h in Headers */,
BC4A532F256057CD0028C592 /* FontLoadTimingOverride.h in Headers */,
@@ -702,7 +702,7 @@ static Font::Visibility visibility(CSSFontFace::Status status, CSSFontFace::Font
}
}

RefPtr<Font> CSSFontFace::font(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, ExternalResourceDownloadPolicy policy, const FontPaletteValues& fontPaletteValues)
RefPtr<Font> CSSFontFace::font(const FontDescription& fontDescription, bool syntheticBold, bool syntheticItalic, ExternalResourceDownloadPolicy policy, const FontPaletteValues& fontPaletteValues, RefPtr<FontFeatureValues> fontFeatureValues)
{
if (computeFailureState())
return nullptr;
@@ -730,7 +730,7 @@ RefPtr<Font> CSSFontFace::font(const FontDescription& fontDescription, bool synt
return Font::create(FontCache::forCurrentThread().lastResortFallbackFont(fontDescription)->platformData(), Font::Origin::Local, Font::Interstitial::Yes, visibility);
}
case CSSFontFaceSource::Status::Success: {
FontCreationContext fontCreationContext { m_featureSettings, m_fontSelectionCapabilities, fontPaletteValues };
FontCreationContext fontCreationContext { m_featureSettings, m_fontSelectionCapabilities, fontPaletteValues, fontFeatureValues };
if (auto result = source->font(fontDescription, syntheticBold, syntheticItalic, fontCreationContext))
return result;
break;
@@ -46,6 +46,7 @@ class Document;
class Font;
class FontDescription;
class FontFace;
class FontFeatureValues;
class FontPaletteValues;
class MutableStyleProperties;
class ScriptExecutionContext;
@@ -116,7 +117,7 @@ class CSSFontFace final : public RefCounted<CSSFontFace> {

void load();

RefPtr<Font> font(const FontDescription&, bool syntheticBold, bool syntheticItalic, ExternalResourceDownloadPolicy, const FontPaletteValues&);
RefPtr<Font> font(const FontDescription&, bool syntheticBold, bool syntheticItalic, ExternalResourceDownloadPolicy, const FontPaletteValues&, RefPtr<FontFeatureValues>);

static void appendSources(CSSFontFace&, CSSValueList&, ScriptExecutionContext*, bool isInitiatingElementInUserAgentShadowTree);

@@ -51,9 +51,9 @@ String CSSFontFeatureValuesRule::cssText() const
};
joinFontFamiliesWithSeparator(m_fontFeatureValuesRule->fontFamilies(), ", "_s);
builder.append(" { ");
auto& value = m_fontFeatureValuesRule->value();
const auto& value = m_fontFeatureValuesRule->value();

auto addVariant = [&builder] (String variantName, Tags tags) {
auto addVariant = [&builder] (const String& variantName, const auto& tags) {
if (!tags.isEmpty()) {
builder.append("@", variantName, " { ");
for (auto tag : tags) {
@@ -69,12 +69,12 @@ String CSSFontFeatureValuesRule::cssText() const

// WPT expects the order used in Servo.
// https://searchfox.org/mozilla-central/source/servo/components/style/stylesheets/font_feature_values_rule.rs#430
addVariant("swash"_s, value.swash);
addVariant("stylistic"_s, value.stylistic);
addVariant("ornaments"_s, value.ornaments);
addVariant("annotation"_s, value.annotation);
addVariant("character-variant"_s, value.characterVariant);
addVariant("styleset"_s, value.styleset);
addVariant("swash"_s, value->swash());
addVariant("stylistic"_s, value->stylistic());
addVariant("ornaments"_s, value->ornaments());
addVariant("annotation"_s, value->annotation());
addVariant("character-variant"_s, value->characterVariant());
addVariant("styleset"_s, value->styleset());

builder.append('}');
return builder.toString();
@@ -31,6 +31,7 @@
#include "CSSFontFace.h"
#include "CSSFontFaceSource.h"
#include "CSSFontFamily.h"
#include "CSSFontFeatureValuesRule.h"
#include "CSSPrimitiveValue.h"
#include "CSSPropertyNames.h"
#include "CSSSegmentedFontFace.h"
@@ -236,7 +237,7 @@ void CSSFontSelector::addFontFaceRule(StyleRuleFontFace& fontFaceRule, bool isIn
++m_version;
}

void CSSFontSelector::addFontPaletteValuesRule(StyleRuleFontPaletteValues& fontPaletteValuesRule)
void CSSFontSelector::addFontPaletteValuesRule(const StyleRuleFontPaletteValues& fontPaletteValuesRule)
{
AtomString fontFamily = fontPaletteValuesRule.fontFamily().isNull() ? emptyAtom() : fontPaletteValuesRule.fontFamily();
AtomString name = fontPaletteValuesRule.name().isNull() ? emptyAtom() : fontPaletteValuesRule.name();
@@ -245,6 +246,21 @@ void CSSFontSelector::addFontPaletteValuesRule(StyleRuleFontPaletteValues& fontP
++m_version;
}

void CSSFontSelector::addFontFeatureValuesRule(const StyleRuleFontFeatureValues& fontFeatureValuesRule)
{
Ref<FontFeatureValues> fontFeatureValues = fontFeatureValuesRule.value();

for (const auto& fontFamily : fontFeatureValuesRule.fontFamilies()) {
auto exist = m_featureValues.get(fontFamily);
if (exist)
exist->updateOrInsert(fontFeatureValues.get());
else
m_featureValues.set(fontFamily, fontFeatureValues);
}

++m_version;
}

void CSSFontSelector::registerForInvalidationCallbacks(FontSelectorClient& client)
{
m_clients.add(&client);
@@ -334,6 +350,15 @@ const FontPaletteValues& CSSFontSelector::lookupFontPaletteValues(const AtomStri
return iterator->value;
}

RefPtr<FontFeatureValues> CSSFontSelector::lookupFontFeatureValues(const AtomString& familyName)
{
auto iterator = m_featureValues.find(familyName);
if (iterator == m_featureValues.end())
return nullptr;

return iterator->value.ptr();
}

FontRanges CSSFontSelector::fontRangesForFamily(const FontDescription& fontDescription, const AtomString& familyName)
{
// If this ASSERT() fires, it usually means you forgot a document.updateStyleIfNeeded() somewhere.
@@ -351,6 +376,7 @@ FontRanges CSSFontSelector::fontRangesForFamily(const FontDescription& fontDescr
};

const auto& fontPaletteValues = lookupFontPaletteValues(familyName, fontDescription);
auto fontFeatureValues = lookupFontFeatureValues(familyName);

if (resolveGenericFamilyFirst)
resolveAndAssignGenericFamily();
@@ -359,12 +385,13 @@ FontRanges CSSFontSelector::fontRangesForFamily(const FontDescription& fontDescr
if (face) {
if (document && DeprecatedGlobalSettings::webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logFontLoad(*document, familyForLookup.string(), true);
return face->fontRanges(*fontDescriptionForLookup, fontPaletteValues);
return face->fontRanges(*fontDescriptionForLookup, fontPaletteValues, fontFeatureValues);
}

if (!resolveGenericFamilyFirst)
resolveAndAssignGenericFamily();
auto font = FontCache::forCurrentThread().fontForFamily(*fontDescriptionForLookup, familyForLookup, { { }, { }, fontPaletteValues });

auto font = FontCache::forCurrentThread().fontForFamily(*fontDescriptionForLookup, familyForLookup, { { }, { }, fontPaletteValues, fontFeatureValues });
if (document && DeprecatedGlobalSettings::webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logFontLoad(*document, familyForLookup.string(), !!font);
return FontRanges { WTFMove(font) };
@@ -47,6 +47,7 @@ class CSSValueList;
class CachedFont;
class ScriptExecutionContext;
class StyleRuleFontFace;
class StyleRuleFontFeatureValues;
class StyleRuleFontPaletteValues;

class CSSFontSelector final : public FontSelector, public CSSFontFace::Client, public CanMakeWeakPtr<CSSFontSelector>, public ActiveDOMObject {
@@ -67,7 +68,8 @@ class CSSFontSelector final : public FontSelector, public CSSFontFace::Client, p
void buildCompleted();

void addFontFaceRule(StyleRuleFontFace&, bool isInitiatingElementInUserAgentShadowTree);
void addFontPaletteValuesRule(StyleRuleFontPaletteValues&);
void addFontPaletteValuesRule(const StyleRuleFontPaletteValues&);
void addFontFeatureValuesRule(const StyleRuleFontFeatureValues&);

void fontCacheInvalidated() final;

@@ -102,6 +104,7 @@ class CSSFontSelector final : public FontSelector, public CSSFontFace::Client, p
std::optional<AtomString> resolveGenericFamily(const FontDescription&, const AtomString& family);

const FontPaletteValues& lookupFontPaletteValues(const AtomString& familyName, const FontDescription&);
RefPtr<FontFeatureValues> lookupFontFeatureValues(const AtomString& familyName);

// CSSFontFace::Client
void fontLoaded(CSSFontFace&) final;
@@ -135,6 +138,7 @@ class CSSFontSelector final : public FontSelector, public CSSFontFace::Client, p
}
};
HashMap<std::pair<AtomString, AtomString>, FontPaletteValues, PaletteMapHash> m_paletteMap;
HashMap<AtomString, Ref<FontFeatureValues>> m_featureValues;

HashSet<RefPtr<CSSFontFace>> m_cssConnectionsPossiblyToRemove;
HashSet<RefPtr<StyleRuleFontFace>> m_cssConnectionsEncounteredDuringBuild;

0 comments on commit a14a556

Please sign in to comment.