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

Side by Side Diff: Source/WebCore/dom/ContainerNodeAlgorithms.h

Issue 10543044: Revert 119622 - Merge 118096 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 }; 129 };
130 130
131 template<class GenericNode, class GenericNodeContainer> 131 template<class GenericNode, class GenericNodeContainer>
132 struct NodeRemovalDispatcher<GenericNode, GenericNodeContainer, true> { 132 struct NodeRemovalDispatcher<GenericNode, GenericNodeContainer, true> {
133 static void dispatch(GenericNode* node, GenericNodeContainer* container) 133 static void dispatch(GenericNode* node, GenericNodeContainer* container)
134 { 134 {
135 // Clean up any TreeScope to a removed tree. 135 // Clean up any TreeScope to a removed tree.
136 if (Document* containerDocument = container->ownerDocument()) 136 if (Document* containerDocument = container->ownerDocument())
137 containerDocument->adoptIfNeeded(node); 137 containerDocument->adoptIfNeeded(node);
138 ChildNodeRemovalNotifier(container).notify(node); 138 if (node->inDocument())
139 ChildNodeRemovalNotifier(container).notify(node);
139 } 140 }
140 }; 141 };
141 142
142 template<class GenericNode> 143 template<class GenericNode>
143 struct ShouldDispatchRemovalNotification { 144 struct ShouldDispatchRemovalNotification {
144 static const bool value = false; 145 static const bool value = false;
145 }; 146 };
146 147
147 template<> 148 template<>
148 struct ShouldDispatchRemovalNotification<Node> { 149 struct ShouldDispatchRemovalNotification<Node> {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 { 261 {
261 if (node->inDocument()) 262 if (node->inDocument())
262 notifyNodeRemovedFromDocument(node); 263 notifyNodeRemovedFromDocument(node);
263 else if (node->isContainerNode()) 264 else if (node->isContainerNode())
264 notifyNodeRemovedFromTree(toContainerNode(node)); 265 notifyNodeRemovedFromTree(toContainerNode(node));
265 } 266 }
266 267
267 } // namespace WebCore 268 } // namespace WebCore
268 269
269 #endif // ContainerNodeAlgorithms_h 270 #endif // ContainerNodeAlgorithms_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698