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 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 | 2508 |
2509 void LayoutObject::destroyAndCleanupAnonymousWrappers() | 2509 void LayoutObject::destroyAndCleanupAnonymousWrappers() |
2510 { | 2510 { |
2511 // If the tree is destroyed, there is no need for a clean-up phase. | 2511 // If the tree is destroyed, there is no need for a clean-up phase. |
2512 if (documentBeingDestroyed()) { | 2512 if (documentBeingDestroyed()) { |
2513 destroy(); | 2513 destroy(); |
2514 return; | 2514 return; |
2515 } | 2515 } |
2516 | 2516 |
2517 LayoutObject* destroyRoot = this; | 2517 LayoutObject* destroyRoot = this; |
2518 for (LayoutObject* destroyRootParent = destroyRoot->parent(); destroyRootPar
ent && destroyRootParent->isAnonymous(); destroyRoot = destroyRootParent, destro
yRootParent = destroyRootParent->parent()) { | 2518 for (LayoutObject* destroyRootParent = destroyRoot->parent(); destroyRootPar
ent && destroyRootParent->isAnonymous() && !destroyRootParent->parent()->creates
AnonymousWrapper(); destroyRoot = destroyRootParent, destroyRootParent = destroy
RootParent->parent()) { |
| 2519 |
2519 // Anonymous block continuations are tracked and destroyed elsewhere (se
e the bottom of LayoutBlock::removeChild) | 2520 // Anonymous block continuations are tracked and destroyed elsewhere (se
e the bottom of LayoutBlock::removeChild) |
2520 if (destroyRootParent->isLayoutBlockFlow() && toLayoutBlockFlow(destroyR
ootParent)->isAnonymousBlockContinuation()) | 2521 if (destroyRootParent->isLayoutBlockFlow() && toLayoutBlockFlow(destroyR
ootParent)->isAnonymousBlockContinuation()) |
2521 break; | 2522 break; |
2522 // A flow thread is tracked by its containing block. Whether its childre
n are removed or not is irrelevant. | 2523 // A flow thread is tracked by its containing block. Whether its childre
n are removed or not is irrelevant. |
2523 if (destroyRootParent->isLayoutFlowThread()) | 2524 if (destroyRootParent->isLayoutFlowThread()) |
2524 break; | 2525 break; |
2525 | 2526 |
2526 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar
ent->slowLastChild() != destroyRoot) | 2527 if (destroyRootParent->slowFirstChild() != destroyRoot || destroyRootPar
ent->slowLastChild() != destroyRoot) |
2527 break; // Need to keep the anonymous parent, since it won't become e
mpty by the removal of this layoutObject. | 2528 break; // Need to keep the anonymous parent, since it won't become e
mpty by the removal of this layoutObject. |
2528 } | 2529 } |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3231 const blink::LayoutObject* root = object1; | 3232 const blink::LayoutObject* root = object1; |
3232 while (root->parent()) | 3233 while (root->parent()) |
3233 root = root->parent(); | 3234 root = root->parent(); |
3234 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3235 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3235 } else { | 3236 } else { |
3236 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3237 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3237 } | 3238 } |
3238 } | 3239 } |
3239 | 3240 |
3240 #endif | 3241 #endif |
OLD | NEW |