Index: third_party/WebKit/Source/core/layout/LayoutImage.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
index 6b5a8d892b22dff0a4f54640fc164c232b5b76c8..716efe05e55f4841ab1c53765d17b8e2c58da1ca 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
@@ -89,10 +89,10 @@ void LayoutImage::setImageResource(PassOwnPtrWillBeRawPtr<LayoutImageResource> i |
{ |
ASSERT(!m_imageResource); |
m_imageResource = imageResource; |
- m_imageResource->initialize(this, this); |
+ m_imageResource->initialize(this); |
} |
-void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) |
+void LayoutImage::imageChanged(bool isNotifyingFinish, WrappedImagePtr newImage, const IntRect* rect) |
{ |
ASSERT(view()); |
ASSERT(view()->frameView()); |
@@ -100,11 +100,20 @@ void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) |
return; |
if (hasBoxDecorationBackground() || hasMask() || hasShapeOutside()) |
- LayoutReplaced::imageChanged(newImage, rect); |
+ LayoutReplaced::imageChanged(isNotifyingFinish, newImage, rect); |
if (!m_imageResource) |
return; |
+ if (isNotifyingFinish) { |
+ invalidateBackgroundObscurationStatus(); |
+ if (newImage == m_imageResource->cachedImage()) { |
+ // tell any potential compositing layers |
+ // that the image is done and they can reference it directly. |
+ contentChanged(ImageChanged); |
+ } |
+ } |
+ |
if (newImage != m_imageResource->imagePtr()) |
return; |
@@ -175,23 +184,6 @@ void LayoutImage::invalidatePaintAndMarkForLayoutIfNeeded() |
contentChanged(ImageChanged); |
} |
-void LayoutImage::notifyFinished(Resource* newImage) |
-{ |
- if (!m_imageResource) |
- return; |
- |
- if (documentBeingDestroyed()) |
- return; |
- |
- invalidateBackgroundObscurationStatus(); |
- |
- if (newImage == m_imageResource->cachedImage()) { |
- // tell any potential compositing layers |
- // that the image is done and they can reference it directly. |
- contentChanged(ImageChanged); |
- } |
-} |
- |
void LayoutImage::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) const |
{ |
ImagePainter(*this).paintReplaced(paintInfo, paintOffset); |