Index: Source/core/loader/ImageLoader.cpp |
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp |
index 3c0d8b679fdac3776145ae9c6e980eae03d51343..91f5cd67bbaf7dc3d8d21c57e78de7c0890ae84e 100644 |
--- a/Source/core/loader/ImageLoader.cpp |
+++ b/Source/core/loader/ImageLoader.cpp |
@@ -289,8 +289,11 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up |
} |
ImageResource* oldImage = m_image.get(); |
- if (newImage != oldImage) { |
- sourceImageChanged(); |
+ if (updateBehavior == UpdateSizeChanged && m_element->layoutObject() && m_element->layoutObject()->isImage() && newImage == oldImage) { |
Yoav Weiss
2015/04/02 07:52:10
Hmm, I'm not sure that's the cleanest way to do th
rhogan
2015/04/02 18:15:16
It's not material for the test cases added by my C
|
+ toLayoutImage(m_element->layoutObject())->intrinsicSizeChanged(); |
+ } else { |
+ if (newImage != oldImage) |
+ sourceImageChanged(); |
if (m_hasPendingLoadEvent) { |
loadEventSender().cancelEvent(this); |
@@ -318,8 +321,6 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up |
if (oldImage) |
oldImage->removeClient(this); |
Jimmy Jo
2016/04/28 13:02:33
I have a question.
If newImage and oldImage are eq
|
- } else if (updateBehavior == UpdateSizeChanged && m_element->layoutObject() && m_element->layoutObject()->isImage()) { |
- toLayoutImage(m_element->layoutObject())->intrinsicSizeChanged(); |
} |
if (LayoutImageResource* imageResource = layoutImageResource()) |