| 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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 } | 1101 } |
| 1102 #endif | 1102 #endif |
| 1103 | 1103 |
| 1104 void Node::detach() | 1104 void Node::detach() |
| 1105 { | 1105 { |
| 1106 #ifndef NDEBUG | 1106 #ifndef NDEBUG |
| 1107 ASSERT(!detachingNode); | 1107 ASSERT(!detachingNode); |
| 1108 detachingNode = this; | 1108 detachingNode = this; |
| 1109 #endif | 1109 #endif |
| 1110 | 1110 |
| 1111 if (renderer()) { | 1111 if (renderer()) |
| 1112 renderer()->destroyAndCleanupAnonymousWrappers(); | 1112 renderer()->destroyAndCleanupAnonymousWrappers(); |
| 1113 #ifndef NDEBUG | 1113 setRenderer(0); |
| 1114 for (Node* node = this; node; node = NodeTraversal::next(node, this)) { | |
| 1115 RenderObject* renderer = node->renderer(); | |
| 1116 // RenderFlowThread and the top layer remove elements from the regul
ar tree | |
| 1117 // hierarchy. They will be cleaned up when we call detach on them. | |
| 1118 #if ENABLE(DIALOG_ELEMENT) | |
| 1119 ASSERT(!renderer || renderer->inRenderFlowThread() || (renderer->enc
losingLayer()->isInTopLayerSubtree())); | |
| 1120 #else | |
| 1121 ASSERT(!renderer || renderer->inRenderFlowThread()); | |
| 1122 #endif | |
| 1123 } | |
| 1124 #endif | |
| 1125 } | |
| 1126 | |
| 1127 ASSERT(!renderer()); | |
| 1128 | 1114 |
| 1129 Document* doc = document(); | 1115 Document* doc = document(); |
| 1130 if (isUserActionElement()) { | 1116 if (isUserActionElement()) { |
| 1131 if (hovered()) | 1117 if (hovered()) |
| 1132 doc->hoveredNodeDetached(this); | 1118 doc->hoveredNodeDetached(this); |
| 1133 if (inActiveChain()) | 1119 if (inActiveChain()) |
| 1134 doc->activeChainNodeDetached(this); | 1120 doc->activeChainNodeDetached(this); |
| 1135 doc->userActionElements().didDetach(this); | 1121 doc->userActionElements().didDetach(this); |
| 1136 } | 1122 } |
| 1137 | 1123 |
| (...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2681 node->showTreeForThis(); | 2667 node->showTreeForThis(); |
| 2682 } | 2668 } |
| 2683 | 2669 |
| 2684 void showNodePath(const WebCore::Node* node) | 2670 void showNodePath(const WebCore::Node* node) |
| 2685 { | 2671 { |
| 2686 if (node) | 2672 if (node) |
| 2687 node->showNodePathForThis(); | 2673 node->showNodePathForThis(); |
| 2688 } | 2674 } |
| 2689 | 2675 |
| 2690 #endif | 2676 #endif |
| OLD | NEW |