Title: [126674] branches/chromium/1229/Source/WebCore/rendering/RenderBlock.cpp
Revision
126674
Author
[email protected]
Date
2012-08-24 19:07:09 -0700 (Fri, 24 Aug 2012)

Log Message

Merge 125315
BUG=137409
Review URL: https://chromiumcodereview.appspot.com/10867075

Modified Paths

Diff

Modified: branches/chromium/1229/Source/WebCore/rendering/RenderBlock.cpp (126673 => 126674)


--- branches/chromium/1229/Source/WebCore/rendering/RenderBlock.cpp	2012-08-25 01:57:14 UTC (rev 126673)
+++ branches/chromium/1229/Source/WebCore/rendering/RenderBlock.cpp	2012-08-25 02:07:09 UTC (rev 126674)
@@ -1145,15 +1145,21 @@
     RenderBlock* anonBlock = toRenderBlock(parent->children()->removeChildNode(parent, child, child->hasLayer()));
     anonBlock->moveAllChildrenTo(parent, nextSibling, child->hasLayer());
     // Delete the now-empty block's lines and nuke it.
-    if (!parent->documentBeingDestroyed())
-        anonBlock->deleteLineBoxTree();
-    if (!parent->documentBeingDestroyed() && childFlowThread && childFlowThread->isRenderNamedFlowThread())
+    anonBlock->deleteLineBoxTree();
+    if (childFlowThread && childFlowThread->isRenderNamedFlowThread())
         toRenderNamedFlowThread(childFlowThread)->removeFlowChildInfo(anonBlock);
     anonBlock->destroy();
 }
 
 void RenderBlock::removeChild(RenderObject* oldChild)
 {
+    // No need to waste time in merging or removing empty anonymous blocks.
+    // We can just bail out if our document is getting destroyed.
+    if (documentBeingDestroyed()) {
+        RenderBox::removeChild(oldChild);
+        return;
+    }
+
     // If this child is a block, and if our previous and next siblings are
     // both anonymous blocks with inline content, then we can go ahead and
     // fold the inline content back together.
@@ -1223,7 +1229,7 @@
         }
     }
 
-    if (!firstChild() && !documentBeingDestroyed()) {
+    if (!firstChild()) {
         // If this was our last child be sure to clear out our line boxes.
         if (childrenInline())
             deleteLineBoxTree();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to