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

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

Issue 20473002: Update RenderImage when the image src is cleared (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-baselined one of the expected test result Created 7 years, 5 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: Source/core/loader/ImageLoader.cpp
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
index b2fb978a04aba40953027d0ccb55c7efaba5d4ae..612a04bd3dd65a11b07a9979f04f237670db862a 100644
--- a/Source/core/loader/ImageLoader.cpp
+++ b/Source/core/loader/ImageLoader.cpp
@@ -149,7 +149,7 @@ void ImageLoader::updateFromElement()
AtomicString attr = m_element->imageSourceURL();
- if (attr == m_failedLoadURL)
+ if (!m_failedLoadURL.isEmpty() && attr == m_failedLoadURL)
return;
// Do not load any image if the 'src' attribute is missing or if it is
@@ -229,7 +229,10 @@ void ImageLoader::updateFromElement()
// being queued to fire. Ensure this happens after beforeload is
// dispatched.
newImage->addClient(this);
+ } else {
+ updateRenderer();
}
+
if (oldImage)
oldImage->removeClient(this);
}

Powered by Google App Engine
This is Rietveld 408576698