Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCache.h

Issue 1615923004: Add FontCache API for retrieving prioritized fallback fonts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/FontCache.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.h b/third_party/WebKit/Source/platform/fonts/FontCache.h
index 1b83f7de4b67e8da6b8d81a40b1c935b0e982c66..4c891418fc80da58c7ec9da72304d7950dcea78a 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.h
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.h
@@ -34,6 +34,7 @@
#include "platform/fonts/FallbackListCompositeKey.h"
#include "platform/fonts/FontCacheKey.h"
#include "platform/fonts/FontFaceCreationParams.h"
+#include "platform/fonts/FontFallbackPriority.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
@@ -86,6 +87,8 @@ public:
SimpleFontData* getNonRetainedLastResortFallbackFont(const FontDescription&);
bool isPlatformFontAvailable(const FontDescription&, const AtomicString&);
+ const Vector<AtomicString>& fontListForFallbackPriority(const FontDescription&, FontFallbackPriority);
+
// Returns the ShapeCache instance associated with the given cache key.
// Creates a new instance as needed and as such is guaranteed not to return
// a nullptr. Instances are managed by FontCache and are only guaranteed to
@@ -172,6 +175,11 @@ private:
PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription&, UChar32);
+ template <FontFallbackPriority fallbackPriority>
+ const Vector<AtomicString>& initAndGetfontListForFallbackPriority(const FontDescription);
wkorman 2016/01/25 23:38:16 Getfont -> GetFont, and make param a ref?
+
+ const Vector<AtomicString> platformFontListForFallbackPriority(FontFallbackPriority) const;
+
// Don't purge if this count is > 0;
int m_purgePreventCount;

Powered by Google App Engine
This is Rietveld 408576698