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

Unified Diff: third_party/WebKit/Source/core/loader/ImageLoader.cpp

Issue 1844603002: Make ImageLoader non-ResourceClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « third_party/WebKit/Source/core/loader/ImageLoader.h ('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/loader/ImageLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
index 542f881433fe5d6505069794fc9a8bf95e280d86..73e2f1916e24f1d0e1af09c5b445cbf6158a5b25 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -180,7 +180,6 @@ void ImageLoader::dispose()
#endif
if (m_image) {
- m_image->removeClient(this);
m_image->removeObserver(this);
m_image = nullptr;
}
@@ -227,11 +226,9 @@ void ImageLoader::setImageWithoutConsideringPendingLoadEvent(ImageResource* newI
}
m_imageComplete = true;
if (newImage) {
- newImage->addClient(this);
newImage->addObserver(this);
}
if (oldImage) {
- oldImage->removeClient(this);
oldImage->removeObserver(this);
}
}
@@ -370,14 +367,12 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up
m_imageComplete = !newImage;
updateLayoutObject();
- // If newImage exists and is cached, addClient() will result in the load event
+ // If newImage exists and is cached, addObserver() will result in the load event
// being queued to fire. Ensure this happens after beforeload is dispatched.
if (newImage) {
- newImage->addClient(this);
newImage->addObserver(this);
}
if (oldImage) {
- oldImage->removeClient(this);
oldImage->removeObserver(this);
}
}
@@ -418,7 +413,6 @@ void ImageLoader::updateFromElement(UpdateFromElementBehavior updateBehavior, Re
if (imageSourceURL.isEmpty()) {
ImageResource* image = m_image.get();
if (image) {
- image->removeClient(this);
image->removeObserver(this);
}
m_image = nullptr;
@@ -463,9 +457,9 @@ bool ImageLoader::shouldLoadImmediately(const KURL& url) const
return (m_loadingImageDocument || isHTMLObjectElement(m_element) || isHTMLEmbedElement(m_element) || url.protocolIsData());
}
-void ImageLoader::notifyFinished(Resource* resource)
+void ImageLoader::imageNotifyFinished(ImageResource* resource)
{
- WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d",
+ WTF_LOG(Timers, "ImageLoader::imageNotifyFinished %p; m_hasPendingLoadEvent=%d",
this, m_hasPendingLoadEvent);
ASSERT(m_failedLoadURL.isEmpty());
« no previous file with comments | « third_party/WebKit/Source/core/loader/ImageLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698