Index: Source/core/rendering/RenderImage.cpp |
diff --git a/Source/core/rendering/RenderImage.cpp b/Source/core/rendering/RenderImage.cpp |
index 81799184d4c68016008e3c5cc3e5ffe7b919a00f..9c17c6ee3919623cfe2e2d632887dde0b267930a 100644 |
--- a/Source/core/rendering/RenderImage.cpp |
+++ b/Source/core/rendering/RenderImage.cpp |
@@ -159,7 +159,7 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) |
if (!m_imageResource) |
return; |
- if (newImage != m_imageResource->imagePtr() || !newImage) |
+ if (newImage != m_imageResource->imagePtr()) |
return; |
if (!m_didIncrementVisuallyNonEmptyPixelCount) { |
@@ -171,7 +171,7 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) |
bool imageSizeChanged = false; |
// Set image dimensions, taking into account the size of the alt text. |
- if (m_imageResource->errorOccurred()) { |
+ if (m_imageResource->errorOccurred() || !newImage) { |
if (!m_altText.isEmpty() && document()->hasPendingStyleRecalc()) { |
ASSERT(node()); |
if (node()) { |
@@ -190,7 +190,7 @@ bool RenderImage::updateIntrinsicSizeIfNeeded(const LayoutSize& newSize, bool im |
{ |
if (newSize == intrinsicSize() && !imageSizeChanged) |
return false; |
- if (m_imageResource->errorOccurred()) |
+ if (m_imageResource->errorOccurred() || !m_imageResource->hasImage()) |
spartha
2013/07/31 09:58:07
This change was missed as the test case was defici
|
return imageSizeChanged; |
setIntrinsicSize(newSize); |
return true; |