| 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 bbb81831e358837ecc7c8e28b0520e71b81a2cc7..78265abfe5c678a0097ce4350504e72fb012fa64 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);
|
|
|