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

Unified Diff: third_party/WebKit/Source/core/fetch/FontResource.cpp

Issue 1704693002: [SVG 2/5] Do not reload FontResource created by resourceForStaticData() Base URL: https://chromium.googlesource.com/chromium/src.git@Loader_SVGImage_Fix1
Patch Set: auto-Rebase Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/fast/css/fontfaceset-download-error-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51d6faab1163d3bce06a2fd7e537647fe4ccc365..b7a1e5d7a3b76bd6342c888902d2b839099ea849 100644
--- a/third_party/WebKit/Source/core/fetch/FontResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/FontResource.cpp
@@ -194,6 +194,13 @@ void FontResource::allClientsRemoved()
void FontResource::checkNotify()
{
+ // When the FontResource is created by
+ // ResourceFetcher::resourceForStaticData(), checkNotify() is called while
+ // stillNeedsLoad() is true. In this case, we no longer need loading, so we
+ // set |m_state| to |LoadInitiated| and make stillNeedsLoad() false here.
+ if (stillNeedsLoad())
+ m_state = LoadInitiated;
+
m_fontLoadShortLimitTimer.stop();
m_fontLoadLongLimitTimer.stop();
ResourceClientWalker<FontResourceClient> w(m_clients);
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/fast/css/fontfaceset-download-error-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698