| Index: Source/core/loader/ImageLoader.cpp
|
| diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
|
| index a93ef263032e3ac86928e438f3d796cce8c92969..3e51b8d8ef6977f5e1c3404011295fde442c0b60 100644
|
| --- a/Source/core/loader/ImageLoader.cpp
|
| +++ b/Source/core/loader/ImageLoader.cpp
|
| @@ -272,8 +272,11 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up
|
| // Fire an error event if the url string is not empty, but the KURL is.
|
| m_hasPendingErrorEvent = true;
|
| errorEventSender().dispatchEventSoon(this);
|
| + } else {
|
| + noImageResourceToLoad();
|
| }
|
|
|
| +
|
| ImageResource* oldImage = m_image.get();
|
| if (newImage != oldImage) {
|
| sourceImageChanged();
|
| @@ -334,7 +337,7 @@ void ImageLoader::updateFromElement(UpdateFromElementBehavior updateBehavior, Lo
|
| }
|
|
|
| KURL url = imageSourceToKURL(imageSourceURL);
|
| - if (imageSourceURL.isNull() || url.isNull() || shouldLoadImmediately(url, loadType)) {
|
| + if ((!imageSourceURL.isNull() && url.isNull()) || shouldLoadImmediately(url, loadType)) {
|
| doUpdateFromElement(DoNotBypassMainWorldCSP, updateBehavior);
|
| return;
|
| }
|
| @@ -364,7 +367,8 @@ bool ImageLoader::shouldLoadImmediately(const KURL& url, LoadType loadType) cons
|
| || isHTMLObjectElement(m_element)
|
| || isHTMLEmbedElement(m_element)
|
| || url.protocolIsData()
|
| - || memoryCache()->resourceForURL(url)
|
| + || !element()->document().frame()
|
| + || (!url.isNull() && memoryCache()->resourceForURL(url))
|
| || loadType == ForceLoadImmediately);
|
| }
|
|
|
|
|