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

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageLoader.cpp

Issue 1833303002: [Not committed] Make image load completion async and remove EventSender from ImageLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Loader_asyncImageLoadEvent_1
Patch Set: Rebase. Created 4 years, 8 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/html/HTMLImageLoader.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp b/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
index 01e59d35a5261c135f29f0445146c64e97c8177c..dd628292a55b7fcd0a0d59879e9d8ccd8646a489 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
@@ -73,13 +73,11 @@ void HTMLImageLoader::noImageResourceToLoad()
loadFallbackContentForElement(element());
}
-void HTMLImageLoader::imageNotifyFinished(ImageResource*)
+void HTMLImageLoader::finishInternal(ImageResource* imageResource)
{
- ImageResource* cachedImage = image();
RawPtr<Element> element = this->element();
- ImageLoader::imageNotifyFinished(cachedImage);
- bool loadError = cachedImage->errorOccurred();
+ bool loadError = imageResource->errorOccurred();
if (isHTMLImageElement(*element)) {
if (loadError)
ensureFallbackContent();
@@ -94,7 +92,7 @@ void HTMLImageLoader::imageNotifyFinished(ImageResource*)
toHTMLInputElement(element)->ensurePrimaryContent();
}
- if ((loadError || cachedImage->response().httpStatusCode() >= 400) && isHTMLObjectElement(*element))
+ if ((loadError || imageResource->response().httpStatusCode() >= 400) && isHTMLObjectElement(*element))
toHTMLObjectElement(element)->renderFallbackContent();
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageLoader.h ('k') | third_party/WebKit/Source/core/loader/ImageLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698