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

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

Issue 10914111: Merge 125737 (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 127654)
+++ Source/WebCore/rendering/RenderObject.cpp (working copy)
@@ -586,6 +586,15 @@
return 0;
}
+RenderNamedFlowThread* RenderObject::enclosingRenderNamedFlowThread() const
+{
+ RenderObject* object = const_cast<RenderObject*>(this);
+ while (object && object->isAnonymousBlock() && !object->isRenderNamedFlowThread())
+ object = object->parent();
+
+ return object && object->isRenderNamedFlowThread() ? toRenderNamedFlowThread(object) : 0;
+}
+
RenderBlock* RenderObject::firstLineBlock() const
{
return 0;
@@ -2357,6 +2366,34 @@
clearLayoutRootIfNeeded();
}
+void RenderObject::insertedIntoTree()
+{
+ // FIXME: We should ASSERT(isRooted()) here but generated content makes some out-of-order insertion.
+
+ // Keep our layer hierarchy updated. Optimize for the common case where we don't have any children
+ // and don't have a layer attached to ourselves.
+ RenderLayer* layer = 0;
+ if (firstChild() || hasLayer()) {
+ layer = parent()->enclosingLayer();
+ addLayers(layer);
+ }
+
+ // If |this| is visible but this object was not, tell the layer it has some visible content
+ // that needs to be drawn and layer visibility optimization can't be used
+ if (parent()->style()->visibility() != VISIBLE && style()->visibility() == VISIBLE && !hasLayer()) {
+ if (!layer)
+ layer = parent()->enclosingLayer();
+ if (layer)
+ layer->setHasVisibleContent();
+ }
+
+ if (!isFloating() && parent()->childrenInline())
+ parent()->dirtyLinesFromChangedChild(this);
+
+ if (RenderNamedFlowThread* containerFlowThread = parent()->enclosingRenderNamedFlowThread())
+ containerFlowThread->addFlowChild(this);
+}
+
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