Commit 1055d9bd authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Chromium LUCI CQ

Move FontFaceCache object onto the heap.

This is in preparation for being able to share FontFaceCache between
CSSFontSelectors which share the same @font-face rules via the same set
of StyleSheetContents.

Bug: 336876
Change-Id: I65b0aec9077b54465d74f48a66230679a854346d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562380
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832524}
parent 20261249
...@@ -55,8 +55,9 @@ CSSFontSelector::CSSFontSelector(const TreeScope& tree_scope) ...@@ -55,8 +55,9 @@ CSSFontSelector::CSSFontSelector(const TreeScope& tree_scope)
DCHECK(tree_scope.GetDocument().GetFrame()); DCHECK(tree_scope.GetDocument().GetFrame());
FontCache::GetFontCache()->AddClient(this); FontCache::GetFontCache()->AddClient(this);
if (tree_scope.RootNode().IsDocumentNode()) { if (tree_scope.RootNode().IsDocumentNode()) {
font_face_cache_ = MakeGarbageCollected<FontFaceCache>();
FontFaceSetDocument::From(tree_scope.GetDocument()) FontFaceSetDocument::From(tree_scope.GetDocument())
->AddFontFacesToFontFaceCache(&font_face_cache_); ->AddFontFacesToFontFaceCache(font_face_cache_);
} }
} }
...@@ -75,7 +76,7 @@ void CSSFontSelector::UnregisterForInvalidationCallbacks( ...@@ -75,7 +76,7 @@ void CSSFontSelector::UnregisterForInvalidationCallbacks(
void CSSFontSelector::DispatchInvalidationCallbacks( void CSSFontSelector::DispatchInvalidationCallbacks(
FontInvalidationReason reason) { FontInvalidationReason reason) {
font_face_cache_.IncrementVersion(); font_face_cache_->IncrementVersion();
HeapVector<Member<FontSelectorClient>> clients; HeapVector<Member<FontSelectorClient>> clients;
CopyToVector(clients_, clients); CopyToVector(clients_, clients);
...@@ -99,7 +100,7 @@ scoped_refptr<FontData> CSSFontSelector::GetFontData( ...@@ -99,7 +100,7 @@ scoped_refptr<FontData> CSSFontSelector::GetFontData(
const AtomicString& family_name) { const AtomicString& family_name) {
Document& document = GetTreeScope()->GetDocument(); Document& document = GetTreeScope()->GetDocument();
if (CSSSegmentedFontFace* face = if (CSSSegmentedFontFace* face =
font_face_cache_.Get(font_description, family_name)) { font_face_cache_->Get(font_description, family_name)) {
document.GetFontMatchingMetrics()->ReportWebFontFamily(family_name); document.GetFontMatchingMetrics()->ReportWebFontFamily(family_name);
return face->GetFontData(font_description); return face->GetFontData(font_description);
} }
...@@ -130,7 +131,7 @@ scoped_refptr<FontData> CSSFontSelector::GetFontData( ...@@ -130,7 +131,7 @@ scoped_refptr<FontData> CSSFontSelector::GetFontData(
void CSSFontSelector::WillUseFontData(const FontDescription& font_description, void CSSFontSelector::WillUseFontData(const FontDescription& font_description,
const AtomicString& family, const AtomicString& family,
const String& text) { const String& text) {
CSSSegmentedFontFace* face = font_face_cache_.Get(font_description, family); CSSSegmentedFontFace* face = font_face_cache_->Get(font_description, family);
if (face) if (face)
face->WillUseFontData(font_description, text); face->WillUseFontData(font_description, text);
} }
...@@ -138,7 +139,7 @@ void CSSFontSelector::WillUseFontData(const FontDescription& font_description, ...@@ -138,7 +139,7 @@ void CSSFontSelector::WillUseFontData(const FontDescription& font_description,
void CSSFontSelector::WillUseRange(const FontDescription& font_description, void CSSFontSelector::WillUseRange(const FontDescription& font_description,
const AtomicString& family, const AtomicString& family,
const FontDataForRangeSet& range_set) { const FontDataForRangeSet& range_set) {
CSSSegmentedFontFace* face = font_face_cache_.Get(font_description, family); CSSSegmentedFontFace* face = font_face_cache_->Get(font_description, family);
if (face) if (face)
face->WillUseRange(font_description, range_set); face->WillUseRange(font_description, range_set);
} }
......
...@@ -45,7 +45,7 @@ class CORE_EXPORT CSSFontSelector : public FontSelector { ...@@ -45,7 +45,7 @@ class CORE_EXPORT CSSFontSelector : public FontSelector {
explicit CSSFontSelector(const TreeScope&); explicit CSSFontSelector(const TreeScope&);
~CSSFontSelector() override; ~CSSFontSelector() override;
unsigned Version() const override { return font_face_cache_.Version(); } unsigned Version() const override { return font_face_cache_->Version(); }
void ReportNotDefGlyph() const override; void ReportNotDefGlyph() const override;
...@@ -102,7 +102,7 @@ class CORE_EXPORT CSSFontSelector : public FontSelector { ...@@ -102,7 +102,7 @@ class CORE_EXPORT CSSFontSelector : public FontSelector {
ExecutionContext* GetExecutionContext() const override { ExecutionContext* GetExecutionContext() const override {
return tree_scope_ ? GetDocument().GetExecutionContext() : nullptr; return tree_scope_ ? GetDocument().GetExecutionContext() : nullptr;
} }
FontFaceCache* GetFontFaceCache() override { return &font_face_cache_; } FontFaceCache* GetFontFaceCache() override { return font_face_cache_; }
const GenericFontFamilySettings& GetGenericFontFamilySettings() const { const GenericFontFamilySettings& GetGenericFontFamilySettings() const {
return generic_font_family_settings_; return generic_font_family_settings_;
...@@ -125,9 +125,7 @@ class CORE_EXPORT CSSFontSelector : public FontSelector { ...@@ -125,9 +125,7 @@ class CORE_EXPORT CSSFontSelector : public FontSelector {
// currently leak because ComputedStyle and its data are not on the heap. // currently leak because ComputedStyle and its data are not on the heap.
// See crbug.com/383860 for details. // See crbug.com/383860 for details.
WeakMember<const TreeScope> tree_scope_; WeakMember<const TreeScope> tree_scope_;
// TODO(futhark): Make this a Member which can be shared between scopes Member<FontFaceCache> font_face_cache_;
// sharing the same set of @font-faces.
FontFaceCache font_face_cache_;
HeapHashSet<WeakMember<FontSelectorClient>> clients_; HeapHashSet<WeakMember<FontSelectorClient>> clients_;
GenericFontFamilySettings generic_font_family_settings_; GenericFontFamilySettings generic_font_family_settings_;
}; };
......
...@@ -42,9 +42,7 @@ namespace blink { ...@@ -42,9 +42,7 @@ namespace blink {
class FontDescription; class FontDescription;
class CORE_EXPORT FontFaceCache final { class CORE_EXPORT FontFaceCache final : public GarbageCollected<FontFaceCache> {
DISALLOW_NEW();
public: public:
FontFaceCache(); FontFaceCache();
......
...@@ -41,9 +41,7 @@ class FontFaceCacheTest : public PageTestBase { ...@@ -41,9 +41,7 @@ class FontFaceCacheTest : public PageTestBase {
FontSelectionValue style, FontSelectionValue style,
FontSelectionValue weight); FontSelectionValue weight);
FontFaceCache cache_; Persistent<FontFaceCache> cache_;
void Trace(Visitor*) const;
protected: protected:
const AtomicString kFontNameForTesting{"Arial"}; const AtomicString kFontNameForTesting{"Arial"};
...@@ -51,11 +49,12 @@ class FontFaceCacheTest : public PageTestBase { ...@@ -51,11 +49,12 @@ class FontFaceCacheTest : public PageTestBase {
void FontFaceCacheTest::SetUp() { void FontFaceCacheTest::SetUp() {
PageTestBase::SetUp(); PageTestBase::SetUp();
cache_ = MakeGarbageCollected<FontFaceCache>();
ClearCache(); ClearCache();
} }
void FontFaceCacheTest::ClearCache() { void FontFaceCacheTest::ClearCache() {
cache_.ClearAll(); cache_->ClearAll();
} }
void FontFaceCacheTest::AppendTestFaceForCapabilities(const CSSValue& stretch, void FontFaceCacheTest::AppendTestFaceForCapabilities(const CSSValue& stretch,
...@@ -83,7 +82,7 @@ void FontFaceCacheTest::AppendTestFaceForCapabilities(const CSSValue& stretch, ...@@ -83,7 +82,7 @@ void FontFaceCacheTest::AppendTestFaceForCapabilities(const CSSValue& stretch,
MakeGarbageCollected<StyleRuleFontFace>(font_face_descriptor); MakeGarbageCollected<StyleRuleFontFace>(font_face_descriptor);
FontFace* font_face = FontFace::Create(&GetDocument(), style_rule_font_face); FontFace* font_face = FontFace::Create(&GetDocument(), style_rule_font_face);
CHECK(font_face); CHECK(font_face);
cache_.Add(style_rule_font_face, font_face); cache_->Add(style_rule_font_face, font_face);
} }
void FontFaceCacheTest::AppendTestFaceForCapabilities( void FontFaceCacheTest::AppendTestFaceForCapabilities(
...@@ -125,7 +124,7 @@ TEST_F(FontFaceCacheTest, Instantiate) { ...@@ -125,7 +124,7 @@ TEST_F(FontFaceCacheTest, Instantiate) {
*weight_value); *weight_value);
AppendTestFaceForCapabilities(*stretch_value_condensed, *style_value, AppendTestFaceForCapabilities(*stretch_value_condensed, *style_value,
*weight_value); *weight_value);
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
} }
TEST_F(FontFaceCacheTest, SimpleWidthMatch) { TEST_F(FontFaceCacheTest, SimpleWidthMatch) {
...@@ -141,12 +140,12 @@ TEST_F(FontFaceCacheTest, SimpleWidthMatch) { ...@@ -141,12 +140,12 @@ TEST_F(FontFaceCacheTest, SimpleWidthMatch) {
*weight_value); *weight_value);
AppendTestFaceForCapabilities(*stretch_value_condensed, *style_value, AppendTestFaceForCapabilities(*stretch_value_condensed, *style_value,
*weight_value); *weight_value);
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
const FontDescription& description_condensed = FontDescriptionForRequest( const FontDescription& description_condensed = FontDescriptionForRequest(
CondensedWidthValue(), NormalSlopeValue(), NormalWeightValue()); CondensedWidthValue(), NormalSlopeValue(), NormalWeightValue());
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(description_condensed, kFontNameForTesting); cache_->Get(description_condensed, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
FontSelectionCapabilities result_capabilities = FontSelectionCapabilities result_capabilities =
...@@ -172,12 +171,12 @@ TEST_F(FontFaceCacheTest, SimpleWeightMatch) { ...@@ -172,12 +171,12 @@ TEST_F(FontFaceCacheTest, SimpleWeightMatch) {
CSSNumericLiteralValue::Create(100, CSSPrimitiveValue::UnitType::kNumber); CSSNumericLiteralValue::Create(100, CSSPrimitiveValue::UnitType::kNumber);
AppendTestFaceForCapabilities(*stretch_value, *style_value, AppendTestFaceForCapabilities(*stretch_value, *style_value,
*weight_value_thin); *weight_value_thin);
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
const FontDescription& description_bold = FontDescriptionForRequest( const FontDescription& description_bold = FontDescriptionForRequest(
NormalWidthValue(), NormalSlopeValue(), BoldWeightValue()); NormalWidthValue(), NormalSlopeValue(), BoldWeightValue());
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(description_bold, kFontNameForTesting); cache_->Get(description_bold, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
FontSelectionCapabilities result_capabilities = FontSelectionCapabilities result_capabilities =
result->GetFontSelectionCapabilities(); result->GetFontSelectionCapabilities();
...@@ -272,7 +271,7 @@ TEST_F(FontFaceCacheTest, DISABLED_MatchCombinations) { ...@@ -272,7 +271,7 @@ TEST_F(FontFaceCacheTest, DISABLED_MatchCombinations) {
} }
for (FontDescription& test_description : test_descriptions) { for (FontDescription& test_description : test_descriptions) {
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(test_description, kFontNameForTesting); cache_->Get(test_description, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
FontSelectionCapabilities result_capabilities = FontSelectionCapabilities result_capabilities =
result->GetFontSelectionCapabilities(); result->GetFontSelectionCapabilities();
...@@ -315,12 +314,12 @@ TEST_F(FontFaceCacheTest, WidthRangeMatching) { ...@@ -315,12 +314,12 @@ TEST_F(FontFaceCacheTest, WidthRangeMatching) {
AppendTestFaceForCapabilities(*stretch_value, *style_value, AppendTestFaceForCapabilities(*stretch_value, *style_value,
*second_weight_list); *second_weight_list);
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
const FontDescription& description_bold = FontDescriptionForRequest( const FontDescription& description_bold = FontDescriptionForRequest(
NormalWidthValue(), NormalSlopeValue(), BoldWeightValue()); NormalWidthValue(), NormalSlopeValue(), BoldWeightValue());
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(description_bold, kFontNameForTesting); cache_->Get(description_bold, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
FontSelectionCapabilities result_capabilities = FontSelectionCapabilities result_capabilities =
result->GetFontSelectionCapabilities(); result->GetFontSelectionCapabilities();
...@@ -365,14 +364,14 @@ TEST_F(FontFaceCacheTest, WidthRangeMatchingBetween400500) { ...@@ -365,14 +364,14 @@ TEST_F(FontFaceCacheTest, WidthRangeMatchingBetween400500) {
*(weight_values_lower[0]), *(weight_values_lower[0]),
*(weight_values_upper[0])); *(weight_values_upper[0]));
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 1ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 1ul);
FontSelectionValue test_weight(450); FontSelectionValue test_weight(450);
const FontDescription& description_expanded = FontDescriptionForRequest( const FontDescription& description_expanded = FontDescriptionForRequest(
NormalWidthValue(), NormalSlopeValue(), test_weight); NormalWidthValue(), NormalSlopeValue(), test_weight);
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(description_expanded, kFontNameForTesting); cache_->Get(description_expanded, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
ASSERT_EQ(result->GetFontSelectionCapabilities().weight.minimum, ASSERT_EQ(result->GetFontSelectionCapabilities().weight.minimum,
FontSelectionValue(600)); FontSelectionValue(600));
...@@ -380,9 +379,9 @@ TEST_F(FontFaceCacheTest, WidthRangeMatchingBetween400500) { ...@@ -380,9 +379,9 @@ TEST_F(FontFaceCacheTest, WidthRangeMatchingBetween400500) {
AppendTestFaceForCapabilities(*stretch_value, *style_value, AppendTestFaceForCapabilities(*stretch_value, *style_value,
*(weight_values_lower[1]), *(weight_values_lower[1]),
*(weight_values_upper[1])); *(weight_values_upper[1]));
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
result = cache_.Get(description_expanded, kFontNameForTesting); result = cache_->Get(description_expanded, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
ASSERT_EQ(result->GetFontSelectionCapabilities().weight.minimum, ASSERT_EQ(result->GetFontSelectionCapabilities().weight.minimum,
FontSelectionValue(415)); FontSelectionValue(415));
...@@ -390,9 +389,9 @@ TEST_F(FontFaceCacheTest, WidthRangeMatchingBetween400500) { ...@@ -390,9 +389,9 @@ TEST_F(FontFaceCacheTest, WidthRangeMatchingBetween400500) {
AppendTestFaceForCapabilities(*stretch_value, *style_value, AppendTestFaceForCapabilities(*stretch_value, *style_value,
*(weight_values_lower[2]), *(weight_values_lower[2]),
*(weight_values_upper[2])); *(weight_values_upper[2]));
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 3ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 3ul);
result = cache_.Get(description_expanded, kFontNameForTesting); result = cache_->Get(description_expanded, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
ASSERT_EQ(result->GetFontSelectionCapabilities().weight.minimum, ASSERT_EQ(result->GetFontSelectionCapabilities().weight.minimum,
FontSelectionValue(475)); FontSelectionValue(475));
...@@ -424,12 +423,12 @@ TEST_F(FontFaceCacheTest, StretchRangeMatching) { ...@@ -424,12 +423,12 @@ TEST_F(FontFaceCacheTest, StretchRangeMatching) {
AppendTestFaceForCapabilities(*second_stretch_list, *style_value, AppendTestFaceForCapabilities(*second_stretch_list, *style_value,
*weight_value); *weight_value);
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
const FontDescription& description_expanded = FontDescriptionForRequest( const FontDescription& description_expanded = FontDescriptionForRequest(
FontSelectionValue(105), NormalSlopeValue(), NormalWeightValue()); FontSelectionValue(105), NormalSlopeValue(), NormalWeightValue());
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(description_expanded, kFontNameForTesting); cache_->Get(description_expanded, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
FontSelectionCapabilities result_capabilities = FontSelectionCapabilities result_capabilities =
result->GetFontSelectionCapabilities(); result->GetFontSelectionCapabilities();
...@@ -477,12 +476,12 @@ TEST_F(FontFaceCacheTest, ObliqueRangeMatching) { ...@@ -477,12 +476,12 @@ TEST_F(FontFaceCacheTest, ObliqueRangeMatching) {
AppendTestFaceForCapabilities(*stretch_value, *oblique_value_second, AppendTestFaceForCapabilities(*stretch_value, *oblique_value_second,
*weight_value); *weight_value);
ASSERT_EQ(cache_.GetNumSegmentedFacesForTesting(), 2ul); ASSERT_EQ(cache_->GetNumSegmentedFacesForTesting(), 2ul);
const FontDescription& description_italic = FontDescriptionForRequest( const FontDescription& description_italic = FontDescriptionForRequest(
NormalWidthValue(), ItalicSlopeValue(), NormalWeightValue()); NormalWidthValue(), ItalicSlopeValue(), NormalWeightValue());
CSSSegmentedFontFace* result = CSSSegmentedFontFace* result =
cache_.Get(description_italic, kFontNameForTesting); cache_->Get(description_italic, kFontNameForTesting);
ASSERT_TRUE(result); ASSERT_TRUE(result);
FontSelectionCapabilities result_capabilities = FontSelectionCapabilities result_capabilities =
result->GetFontSelectionCapabilities(); result->GetFontSelectionCapabilities();
...@@ -495,8 +494,4 @@ TEST_F(FontFaceCacheTest, ObliqueRangeMatching) { ...@@ -495,8 +494,4 @@ TEST_F(FontFaceCacheTest, ObliqueRangeMatching) {
FontSelectionRange({FontSelectionValue(30), FontSelectionValue(35)})); FontSelectionRange({FontSelectionValue(30), FontSelectionValue(35)}));
} }
void FontFaceCacheTest::Trace(Visitor* visitor) const {
visitor->Trace(cache_);
}
} // namespace blink } // namespace blink
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
namespace blink { namespace blink {
OffscreenFontSelector::OffscreenFontSelector(WorkerGlobalScope* worker) OffscreenFontSelector::OffscreenFontSelector(WorkerGlobalScope* worker)
: worker_(worker) { : font_face_cache_(MakeGarbageCollected<FontFaceCache>()), worker_(worker) {
DCHECK(worker); DCHECK(worker);
FontCache::GetFontCache()->AddClient(this); FontCache::GetFontCache()->AddClient(this);
} }
...@@ -43,7 +43,7 @@ scoped_refptr<FontData> OffscreenFontSelector::GetFontData( ...@@ -43,7 +43,7 @@ scoped_refptr<FontData> OffscreenFontSelector::GetFontData(
const FontDescription& font_description, const FontDescription& font_description,
const AtomicString& family_name) { const AtomicString& family_name) {
if (CSSSegmentedFontFace* face = if (CSSSegmentedFontFace* face =
font_face_cache_.Get(font_description, family_name)) { font_face_cache_->Get(font_description, family_name)) {
worker_->GetFontMatchingMetrics()->ReportWebFontFamily(family_name); worker_->GetFontMatchingMetrics()->ReportWebFontFamily(family_name);
return face->GetFontData(font_description); return face->GetFontData(font_description);
} }
...@@ -74,7 +74,7 @@ void OffscreenFontSelector::WillUseFontData( ...@@ -74,7 +74,7 @@ void OffscreenFontSelector::WillUseFontData(
const FontDescription& font_description, const FontDescription& font_description,
const AtomicString& family, const AtomicString& family,
const String& text) { const String& text) {
CSSSegmentedFontFace* face = font_face_cache_.Get(font_description, family); CSSSegmentedFontFace* face = font_face_cache_->Get(font_description, family);
if (face) if (face)
face->WillUseFontData(font_description, text); face->WillUseFontData(font_description, text);
} }
...@@ -83,7 +83,7 @@ void OffscreenFontSelector::WillUseRange( ...@@ -83,7 +83,7 @@ void OffscreenFontSelector::WillUseRange(
const FontDescription& font_description, const FontDescription& font_description,
const AtomicString& family, const AtomicString& family,
const FontDataForRangeSet& range_set) { const FontDataForRangeSet& range_set) {
CSSSegmentedFontFace* face = font_face_cache_.Get(font_description, family); CSSSegmentedFontFace* face = font_face_cache_->Get(font_description, family);
if (face) if (face)
face->WillUseRange(font_description, range_set); face->WillUseRange(font_description, range_set);
} }
...@@ -166,7 +166,7 @@ void OffscreenFontSelector::ReportLastResortFallbackFontLookup( ...@@ -166,7 +166,7 @@ void OffscreenFontSelector::ReportLastResortFallbackFontLookup(
} }
void OffscreenFontSelector::FontCacheInvalidated() { void OffscreenFontSelector::FontCacheInvalidated() {
font_face_cache_.IncrementVersion(); font_face_cache_->IncrementVersion();
} }
void OffscreenFontSelector::FontFaceInvalidated(FontInvalidationReason) { void OffscreenFontSelector::FontFaceInvalidated(FontInvalidationReason) {
......
...@@ -81,7 +81,7 @@ class CORE_EXPORT OffscreenFontSelector : public FontSelector { ...@@ -81,7 +81,7 @@ class CORE_EXPORT OffscreenFontSelector : public FontSelector {
void UpdateGenericFontFamilySettings(const GenericFontFamilySettings&); void UpdateGenericFontFamilySettings(const GenericFontFamilySettings&);
FontFaceCache* GetFontFaceCache() override { return &font_face_cache_; } FontFaceCache* GetFontFaceCache() override { return font_face_cache_; }
bool IsPlatformFamilyMatchAvailable( bool IsPlatformFamilyMatchAvailable(
const FontDescription&, const FontDescription&,
...@@ -99,7 +99,7 @@ class CORE_EXPORT OffscreenFontSelector : public FontSelector { ...@@ -99,7 +99,7 @@ class CORE_EXPORT OffscreenFontSelector : public FontSelector {
private: private:
GenericFontFamilySettings generic_font_family_settings_; GenericFontFamilySettings generic_font_family_settings_;
FontFaceCache font_face_cache_; Member<FontFaceCache> font_face_cache_;
Member<WorkerGlobalScope> worker_; Member<WorkerGlobalScope> worker_;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment