| Index: Source/WebCore/rendering/RenderObject.cpp
|
| ===================================================================
|
| --- Source/WebCore/rendering/RenderObject.cpp (revision 127656)
|
| +++ Source/WebCore/rendering/RenderObject.cpp (working copy)
|
| @@ -2394,6 +2394,42 @@
|
| containerFlowThread->addFlowChild(this);
|
| }
|
|
|
| +void RenderObject::willBeRemovedFromTree()
|
| +{
|
| + // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removals which would need to be fixed first.
|
| +
|
| + // If we remove a visible child from an invisible parent, we don't know the layer visibility any more.
|
| + RenderLayer* layer = 0;
|
| + if (parent()->style()->visibility() != VISIBLE && style()->visibility() == VISIBLE && !hasLayer()) {
|
| + if ((layer = parent()->enclosingLayer()))
|
| + layer->dirtyVisibleContentStatus();
|
| + }
|
| +
|
| + // Keep our layer hierarchy updated.
|
| + if (firstChild() || hasLayer()) {
|
| + if (!layer)
|
| + layer = parent()->enclosingLayer();
|
| + removeLayers(layer);
|
| + }
|
| +
|
| + if (isOutOfFlowPositioned() && parent()->childrenInline())
|
| + parent()->dirtyLinesFromChangedChild(this);
|
| +
|
| + if (inRenderFlowThread()) {
|
| + if (isBox())
|
| + enclosingRenderFlowThread()->removeRenderBoxRegionInfo(toRenderBox(this));
|
| + enclosingRenderFlowThread()->clearRenderObjectCustomStyle(this);
|
| + }
|
| +
|
| + if (RenderNamedFlowThread* containerFlowThread = parent()->enclosingRenderNamedFlowThread())
|
| + containerFlowThread->removeFlowChild(this);
|
| +
|
| +#if ENABLE(SVG)
|
| + // Update cached boundaries in SVG renderers, if a child is removed.
|
| + parent()->setNeedsBoundariesUpdate();
|
| +#endif
|
| +}
|
| +
|
| void RenderObject::destroyAndCleanupAnonymousWrappers()
|
| {
|
| RenderObject* parent = this->parent();
|
|
|