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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 776653003: Don't delete a flow thread just because it becomes childless. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review. Created 6 years 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/multicol/remove-all-children-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 if (documentBeingDestroyed()) { 2393 if (documentBeingDestroyed()) {
2394 destroy(); 2394 destroy();
2395 return; 2395 return;
2396 } 2396 }
2397 2397
2398 RenderObject* destroyRoot = this; 2398 RenderObject* destroyRoot = this;
2399 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) { 2399 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) {
2400 // Anonymous block continuations are tracked and destroyed elsewhere (se e the bottom of RenderBlock::removeChild) 2400 // Anonymous block continuations are tracked and destroyed elsewhere (se e the bottom of RenderBlock::removeChild)
2401 if (destroyRootParent->isRenderBlock() && toRenderBlock(destroyRootParen t)->isAnonymousBlockContinuation()) 2401 if (destroyRootParent->isRenderBlock() && toRenderBlock(destroyRootParen t)->isAnonymousBlockContinuation())
2402 break; 2402 break;
2403 // Column spans are tracked elsewhere, so we can't destroy them here. 2403 // A flow thread is tracked by its containing block. Whether its childre n are removed or not is irrelevant.
2404 if (destroyRootParent->isRenderFlowThread())
2405 break;
2406 // Column spans are tracked elsewhere.
2404 if (destroyRootParent->isAnonymousColumnSpanBlock()) 2407 if (destroyRootParent->isAnonymousColumnSpanBlock())
2405 break; 2408 break;
2406 2409
2407 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar ent->slowLastChild() != destroyRoot) 2410 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar ent->slowLastChild() != destroyRoot)
2408 break; // Need to keep the anonymous parent, since it won't become e mpty by the removal of this renderer. 2411 break; // Need to keep the anonymous parent, since it won't become e mpty by the removal of this renderer.
2409 } 2412 }
2410 2413
2411 destroyRoot->destroy(); 2414 destroyRoot->destroy();
2412 2415
2413 // WARNING: |this| is deleted here. 2416 // WARNING: |this| is deleted here.
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
3117 { 3120 {
3118 if (object1) { 3121 if (object1) {
3119 const blink::RenderObject* root = object1; 3122 const blink::RenderObject* root = object1;
3120 while (root->parent()) 3123 while (root->parent())
3121 root = root->parent(); 3124 root = root->parent();
3122 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3125 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3123 } 3126 }
3124 } 3127 }
3125 3128
3126 #endif 3129 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/remove-all-children-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698