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

Unified Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 1070233002: Remove dead code around anonymous renderers. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderObject.cpp
diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
index 1dadcf47b4f8c14b0de50e8642044aa776008e45..acfa50e1507b666db1ffe504d3cbd0abac30b546 100644
--- a/sky/engine/core/rendering/RenderObject.cpp
+++ b/sky/engine/core/rendering/RenderObject.cpp
@@ -483,9 +483,9 @@ void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderOb
if (!container && !object->isRenderView())
return;
if (!last->isText() && last->style()->hasOutOfFlowPosition()) {
- bool willSkipRelativelyPositionedInlines = !object->isRenderBlock() || object->isAnonymousBlock();
+ bool willSkipRelativelyPositionedInlines = !object->isRenderBlock();
// Skip relatively positioned inlines and anonymous blocks to get to the enclosing RenderBlock.
- while (object && (!object->isRenderBlock() || object->isAnonymousBlock()))
+ while (object && !object->isRenderBlock())
object = object->container();
if (!object || object->posChildNeedsLayout())
return;
@@ -594,9 +594,6 @@ RenderBlock* RenderObject::containingBlock() const
if (o && !o->isRenderBlock())
o = o->containingBlock();
-
- while (o && o->isAnonymousBlock())
- o = o->containingBlock();
} else {
while (o && ((o->isInline() && !o->isReplaced()) || !o->isRenderBlock()))
o = o->parent();
@@ -1590,25 +1587,6 @@ void RenderObject::willBeRemovedFromTree()
parent()->dirtyLinesFromChangedChild(this);
}
-void RenderObject::destroyAndCleanupAnonymousWrappers()
-{
- // If the tree is destroyed, there is no need for a clean-up phase.
- if (documentBeingDestroyed()) {
- destroy();
- return;
- }
-
- RenderObject* destroyRoot = this;
- for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootParent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destroyRootParent = destroyRootParent->parent()) {
- if (destroyRootParent->slowFirstChild() != this || destroyRootParent->slowLastChild() != this)
- break;
- }
-
- destroyRoot->destroy();
-
- // WARNING: |this| is deleted here.
-}
-
void RenderObject::destroy()
{
#if ENABLE(ASSERT) && ENABLE(OILPAN)
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698