Chromium Code Reviews| Index: Source/core/loader/ImageLoader.cpp |
| diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp |
| index 9fbabee79622c331ba92247f7abdc00eb8968b9a..7b4b69f062121aa0024d3681f8a92443620f36ac 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 |
| @@ -216,7 +216,7 @@ void ImageLoader::updateFromElement() |
| m_hasPendingLoadEvent = newImage; |
| m_imageComplete = !newImage; |
| - if (newImage) { |
| + if (m_image.get()) { |
|
Nate Chapin
2013/07/25 21:00:31
Aren't m_image and newImage the same thing here? W
|
| if (!m_element->document()->isImageDocument()) { |
| if (!m_element->document()->hasListenerType(Document::BEFORELOAD_LISTENER)) |
| dispatchPendingBeforeLoadEvent(); |
| @@ -228,8 +228,11 @@ void ImageLoader::updateFromElement() |
| // If newImage is cached, addClient() will result in the load event |
| // being queued to fire. Ensure this happens after beforeload is |
| // dispatched. |
| - newImage->addClient(this); |
| + m_image->addClient(this); |
| + } else { |
| + updateRenderer(); |
| } |
| + |
| if (oldImage) |
| oldImage->removeClient(this); |
| } |