Index: third_party/WebKit/Source/core/fetch/FontResource.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/FontResource.cpp b/third_party/WebKit/Source/core/fetch/FontResource.cpp |
index a5314e845fb10fa6267466f8558e4ad47ea417ab..3ad02e893a5a6bb2580da0416ea1ea27fa2136b7 100644 |
--- a/third_party/WebKit/Source/core/fetch/FontResource.cpp |
+++ b/third_party/WebKit/Source/core/fetch/FontResource.cpp |
@@ -144,9 +144,25 @@ FontPlatformData FontResource::platformDataFromCustomData( |
return m_fontData->fontPlatformData(size, bold, italic, orientation); |
} |
+void FontResource::willReloadAfterDiskCacheMiss() { |
+ ProhibitAddRemoveClientInScope prohibitAddRemoveClient(this); |
+ |
+ ResourceClientWalker<FontResourceClient> walker(clients()); |
+ while (FontResourceClient* client = walker.next()) |
+ client->willReloadAfterDiskCacheMiss(this); |
+ |
+ DCHECK(!resourceRequest().isCacheAwareLoadingActivated()); |
+ if (!m_fontLoadShortLimitTimer.isActive()) |
+ fontLoadShortLimitCallback(nullptr); |
yhirano
2016/10/12 06:30:38
This code assumes that startLoadLimitTimersIfNeede
Shao-Chuan Lee
2016/10/13 05:20:45
Load limit timers are always started after FontRes
Shao-Chuan Lee
2016/10/17 03:45:59
Added comments.
|
+ if (!m_fontLoadLongLimitTimer.isActive()) |
+ fontLoadLongLimitCallback(nullptr); |
+} |
+ |
void FontResource::fontLoadShortLimitCallback(TimerBase*) { |
if (!isLoading()) |
return; |
+ if (resourceRequest().isCacheAwareLoadingActivated()) |
+ return; |
DCHECK_EQ(m_loadLimitState, UnderLimit); |
m_loadLimitState = ShortLimitExceeded; |
ResourceClientWalker<FontResourceClient> walker(clients()); |
@@ -157,6 +173,8 @@ void FontResource::fontLoadShortLimitCallback(TimerBase*) { |
void FontResource::fontLoadLongLimitCallback(TimerBase*) { |
if (!isLoading()) |
return; |
+ if (resourceRequest().isCacheAwareLoadingActivated()) |
+ return; |
DCHECK_EQ(m_loadLimitState, ShortLimitExceeded); |
m_loadLimitState = LongLimitExceeded; |
ResourceClientWalker<FontResourceClient> walker(clients()); |