OLD | NEW |
---|---|
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 2789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2800 RenderObject* destroyRoot = this; | 2800 RenderObject* destroyRoot = this; |
2801 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) { | 2801 for (RenderObject* destroyRootParent = destroyRoot->parent(); destroyRootPar ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro yRootParent = destroyRootParent->parent()) { |
2802 // Anonymous block continuations are tracked and destroyed elsewhere (se e the bottom of RenderBlock::removeChild) | 2802 // Anonymous block continuations are tracked and destroyed elsewhere (se e the bottom of RenderBlock::removeChild) |
2803 if (destroyRootParent->isRenderBlock() && toRenderBlock(destroyRootParen t)->isAnonymousBlockContinuation()) | 2803 if (destroyRootParent->isRenderBlock() && toRenderBlock(destroyRootParen t)->isAnonymousBlockContinuation()) |
2804 break; | 2804 break; |
2805 // Render flow threads are tracked by the FlowThreadController, so we ca n't destroy them here. | 2805 // Render flow threads are tracked by the FlowThreadController, so we ca n't destroy them here. |
2806 // Column spans are tracked elsewhere. | 2806 // Column spans are tracked elsewhere. |
2807 if (destroyRootParent->isRenderFlowThread() || destroyRootParent->isAnon ymousColumnSpanBlock()) | 2807 if (destroyRootParent->isRenderFlowThread() || destroyRootParent->isAnon ymousColumnSpanBlock()) |
2808 break; | 2808 break; |
2809 | 2809 |
2810 if (destroyRootParent->slowFirstChild() != this || destroyRootParent->sl owLastChild() != this) | 2810 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar ent->slowLastChild() != destroyRoot) |
2811 break; // Need to keep the anonymous parent, since it won't become e mpty by the removal of this renderer. | |
2812 | |
2813 // If it's an anonymous table* renderer ancestor that's going to become empty, destroy it, | |
2814 // no matter how far up in the ancestry it is. Otherwise, stop when we h ave walked one level | |
2815 // up. Table* renderers is the only case where we know that it's necessa ry and safe to walk | |
2816 // further up than one level. | |
2817 if (destroyRoot != this && !destroyRootParent->isTableCell() && !destroy RootParent->isTableRow() && !destroyRootParent->isTableSection() && !destroyRoot Parent->isTable()) | |
Julien - ping for review
2014/09/08 21:28:49
This seems very artificial to limit this to table
mstensho (USE GERRIT)
2014/09/16 13:00:07
Done.
| |
2811 break; | 2818 break; |
2812 } | 2819 } |
2813 | 2820 |
2814 destroyRoot->destroy(); | 2821 destroyRoot->destroy(); |
2815 | 2822 |
2816 // WARNING: |this| is deleted here. | 2823 // WARNING: |this| is deleted here. |
2817 } | 2824 } |
2818 | 2825 |
2819 void RenderObject::destroy() | 2826 void RenderObject::destroy() |
2820 { | 2827 { |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3482 { | 3489 { |
3483 if (object1) { | 3490 if (object1) { |
3484 const blink::RenderObject* root = object1; | 3491 const blink::RenderObject* root = object1; |
3485 while (root->parent()) | 3492 while (root->parent()) |
3486 root = root->parent(); | 3493 root = root->parent(); |
3487 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3494 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3488 } | 3495 } |
3489 } | 3496 } |
3490 | 3497 |
3491 #endif | 3498 #endif |
OLD | NEW |