Index: third_party/WebKit/Source/core/css/CSSFontSelector.h |
diff --git a/third_party/WebKit/Source/core/css/CSSFontSelector.h b/third_party/WebKit/Source/core/css/CSSFontSelector.h |
index c1a1b8ae9b9fc9bfdc18c30e3498d36d5ab1e735..286e07283dfa3251727bc00768d78b4ad6e58cba 100644 |
--- a/third_party/WebKit/Source/core/css/CSSFontSelector.h |
+++ b/third_party/WebKit/Source/core/css/CSSFontSelector.h |
@@ -28,6 +28,7 @@ |
#include "core/CoreExport.h" |
#include "core/css/FontFaceCache.h" |
+#include "core/dom/Document.h" |
#include "platform/fonts/FontSelector.h" |
#include "platform/fonts/GenericFontFamilySettings.h" |
#include "platform/heap/Handle.h" |
@@ -48,7 +49,9 @@ class CORE_EXPORT CSSFontSelector : public FontSelector { |
} |
~CSSFontSelector() override; |
- unsigned version() const override { return m_fontFaceCache.version(); } |
+ unsigned version() const override { |
+ return m_document->fontFaceCache()->version(); |
+ } |
PassRefPtr<FontData> getFontData(const FontDescription&, |
const AtomicString&) override; |
@@ -70,7 +73,6 @@ class CORE_EXPORT CSSFontSelector : public FontSelector { |
void unregisterForInvalidationCallbacks(CSSFontSelectorClient*); |
Document* document() const { return m_document; } |
- FontFaceCache* fontFaceCache() { return &m_fontFaceCache; } |
const GenericFontFamilySettings& genericFontFamilySettings() const { |
return m_genericFontFamilySettings; |
@@ -85,12 +87,16 @@ class CORE_EXPORT CSSFontSelector : public FontSelector { |
void dispatchInvalidationCallbacks(); |
private: |
+ CSSSegmentedFontFace* getFontFaceFromCache( |
+ const FontDescription& fontDescription, |
+ const AtomicString& family) { |
+ return m_document->fontFaceCache()->get(fontDescription, family); |
+ } |
+ |
// TODO(Oilpan): Ideally this should just be a traced Member but that will |
// currently leak because ComputedStyle and its data are not on the heap. |
// See crbug.com/383860 for details. |
WeakMember<Document> m_document; |
- // FIXME: Move to Document or StyleEngine. |
- FontFaceCache m_fontFaceCache; |
HeapHashSet<WeakMember<CSSFontSelectorClient>> m_clients; |
GenericFontFamilySettings m_genericFontFamilySettings; |
}; |