Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: Source/WebCore/rendering/RenderObject.cpp

Issue 10911116: Merge 126048 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderObjectChildList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderObjectChildList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698