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

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: 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
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->isAnonymousColumnSpanBlock()) 2404 // Column spans are tracked elsewhere.
2405 if (destroyRootParent->isRenderFlowThread() || destroyRootParent->isAnon ymousColumnSpanBlock())
Julien - ping for review 2014/12/03 23:05:00 I would keep the 2 conditions separated as it woul
mstensho (USE GERRIT) 2014/12/04 06:57:06 Done.
2405 break; 2406 break;
2406 2407
2407 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar ent->slowLastChild() != destroyRoot) 2408 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. 2409 break; // Need to keep the anonymous parent, since it won't become e mpty by the removal of this renderer.
2409 } 2410 }
2410 2411
2411 destroyRoot->destroy(); 2412 destroyRoot->destroy();
2412 2413
2413 // WARNING: |this| is deleted here. 2414 // WARNING: |this| is deleted here.
2414 } 2415 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
3117 { 3118 {
3118 if (object1) { 3119 if (object1) {
3119 const blink::RenderObject* root = object1; 3120 const blink::RenderObject* root = object1;
3120 while (root->parent()) 3121 while (root->parent())
3121 root = root->parent(); 3122 root = root->parent();
3122 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3123 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3123 } 3124 }
3124 } 3125 }
3125 3126
3126 #endif 3127 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698