| 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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 } | 1099 } |
| 1100 #endif | 1100 #endif |
| 1101 | 1101 |
| 1102 void Node::detach() | 1102 void Node::detach() |
| 1103 { | 1103 { |
| 1104 #ifndef NDEBUG | 1104 #ifndef NDEBUG |
| 1105 ASSERT(!detachingNode); | 1105 ASSERT(!detachingNode); |
| 1106 detachingNode = this; | 1106 detachingNode = this; |
| 1107 #endif | 1107 #endif |
| 1108 | 1108 |
| 1109 if (renderer()) { | 1109 if (renderer()) |
| 1110 renderer()->destroyAndCleanupAnonymousWrappers(); | 1110 renderer()->destroyAndCleanupAnonymousWrappers(); |
| 1111 #ifndef NDEBUG | 1111 setRenderer(0); |
| 1112 for (Node* node = this; node; node = NodeTraversal::next(node, this)) { | |
| 1113 RenderObject* renderer = node->renderer(); | |
| 1114 // RenderFlowThread and the top layer remove elements from the regul
ar tree | |
| 1115 // hierarchy. They will be cleaned up when we call detach on them. | |
| 1116 #if ENABLE(DIALOG_ELEMENT) | |
| 1117 ASSERT(!renderer || renderer->inRenderFlowThread() || (renderer->enc
losingLayer()->isInTopLayerSubtree())); | |
| 1118 #else | |
| 1119 ASSERT(!renderer || renderer->inRenderFlowThread()); | |
| 1120 #endif | |
| 1121 } | |
| 1122 #endif | |
| 1123 } | |
| 1124 | |
| 1125 ASSERT(!renderer()); | |
| 1126 | 1112 |
| 1127 Document* doc = document(); | 1113 Document* doc = document(); |
| 1128 if (isUserActionElement()) { | 1114 if (isUserActionElement()) { |
| 1129 if (hovered()) | 1115 if (hovered()) |
| 1130 doc->hoveredNodeDetached(this); | 1116 doc->hoveredNodeDetached(this); |
| 1131 if (inActiveChain()) | 1117 if (inActiveChain()) |
| 1132 doc->activeChainNodeDetached(this); | 1118 doc->activeChainNodeDetached(this); |
| 1133 doc->userActionElements().didDetach(this); | 1119 doc->userActionElements().didDetach(this); |
| 1134 } | 1120 } |
| 1135 | 1121 |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2733 node->showTreeForThis(); | 2719 node->showTreeForThis(); |
| 2734 } | 2720 } |
| 2735 | 2721 |
| 2736 void showNodePath(const WebCore::Node* node) | 2722 void showNodePath(const WebCore::Node* node) |
| 2737 { | 2723 { |
| 2738 if (node) | 2724 if (node) |
| 2739 node->showNodePathForThis(); | 2725 node->showNodePathForThis(); |
| 2740 } | 2726 } |
| 2741 | 2727 |
| 2742 #endif | 2728 #endif |
| OLD | NEW |