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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ImageResource.cpp

Issue 2613853002: Phase III Step 2: Call imageNotifyFinished() and image load event after SVG loading completes (Closed)
Patch Set: Rebase Created 3 years, 7 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/core/loader/resource/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
index 2aeeae561a8d7a53cb24011518d83307f067f3b7..a289ea6deed9909e0d34017781242300b1101821 100644
--- a/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
@@ -182,6 +182,16 @@ bool ImageResource::CanReuse(const FetchParameters& params) const {
return true;
}
+bool ImageResource::CanUseCacheValidator() const {
+ // Disable revalidation while ImageResourceContent is still waiting for
+ // SVG load completion.
+ // TODO(hiroshige): Clean up revalidation-related dependencies.
+ if (!GetContent()->IsLoaded())
+ return false;
+
+ return Resource::CanUseCacheValidator();
+}
+
ImageResource* ImageResource::Create(const ResourceRequest& request) {
return new ImageResource(request, ResourceLoaderOptions(),
ImageResourceContent::CreateNotStarted(), false);

Powered by Google App Engine
This is Rietveld 408576698