Index: Source/core/layout/LayoutObject.cpp |
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
index 46551c480117b4ee2bf3c3128ff347d08f885d6e..8fd41bb6a41fbfe124c8241d65c7cc7e86e356fe 100644 |
--- a/Source/core/layout/LayoutObject.cpp |
+++ b/Source/core/layout/LayoutObject.cpp |
@@ -1823,6 +1823,16 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style) |
updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style->borderImage().image()); |
updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style->maskBoxImage().image()); |
+ StyleImage* newContentImage = m_style->contentData() && m_style->contentData()->isImage() ? |
+ toImageContentData(m_style->contentData())->image() : nullptr; |
+ StyleImage* oldContentImage = oldStyle && oldStyle->contentData() && oldStyle->contentData()->isImage() ? |
+ toImageContentData(oldStyle->contentData())->image() : nullptr; |
+ updateImage(oldContentImage, newContentImage); |
+ |
+ StyleImage* newBoxReflectMaskImage = m_style->boxReflect() ? m_style->boxReflect()->mask().image() : nullptr; |
+ StyleImage* oldBoxReflectMaskImage = oldStyle && oldStyle->boxReflect() ? oldStyle->boxReflect()->mask().image() : nullptr; |
+ updateImage(oldBoxReflectMaskImage, newBoxReflectMaskImage); |
+ |
updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style->shapeOutside()); |
bool doesNotNeedLayoutOrPaintInvalidation = !m_parent; |
@@ -2459,6 +2469,12 @@ void LayoutObject::willBeDestroyed() |
if (StyleImage* maskBoxImage = m_style->maskBoxImage().image()) |
maskBoxImage->removeClient(this); |
+ if (m_style->contentData() && m_style->contentData()->isImage()) |
+ toImageContentData(m_style->contentData())->image()->removeClient(this); |
+ |
+ if (m_style->boxReflect() && m_style->boxReflect()->mask().image()) |
+ m_style->boxReflect()->mask().image()->removeClient(this); |
+ |
removeShapeImageClient(m_style->shapeOutside()); |
} |
ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeLayoutObject(this); |