Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index 631aa137483d3a004995dee13d9aca43102ee429..4005d0ee995fe2d0fad28f48e20c9a6e4faaca61 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -105,11 +105,22 @@ void RenderBox::willBeDestroyed() |
RenderBlock::removePercentHeightDescendantIfNeeded(this); |
- ShapeOutsideInfo::removeInfo(*this); |
+ clearShapeOutside(); |
RenderBoxModelObject::willBeDestroyed(); |
} |
+void RenderBox::clearShapeOutside() |
+{ |
+ const ShapeValue* shapeValue = style()->shapeOutside(); |
+ if (shapeValue) { |
rwlbuis
2014/04/10 15:05:55
Nit: you could inline the shapeValue into the if s
|
+ if (StyleImage* shapeImage = shapeValue->image()) |
+ shapeImage->removeClient(this); |
+ } |
+ |
+ ShapeOutsideInfo::removeInfo(*this); |
+} |
+ |
void RenderBox::removeFloatingOrPositionedChildFromBlockLists() |
{ |
ASSERT(isFloatingOrOutOfFlowPositioned()); |
@@ -242,7 +253,7 @@ void RenderBox::updateShapeOutsideInfoAfterStyleChange(const RenderStyle& style, |
return; |
if (!shapeOutside) |
- ShapeOutsideInfo::removeInfo(*this); |
+ clearShapeOutside(); |
else |
ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty(); |