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

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

Issue 49613005: Have TreeScrope::adoptIfNeeded() take a reference instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // no-op, by default 129 // no-op, by default
130 } 130 }
131 }; 131 };
132 132
133 template<class GenericNode, class GenericNodeContainer> 133 template<class GenericNode, class GenericNodeContainer>
134 struct NodeRemovalDispatcher<GenericNode, GenericNodeContainer, true> { 134 struct NodeRemovalDispatcher<GenericNode, GenericNodeContainer, true> {
135 static void dispatch(GenericNode& node, GenericNodeContainer& container) 135 static void dispatch(GenericNode& node, GenericNodeContainer& container)
136 { 136 {
137 // Clean up any TreeScope to a removed tree. 137 // Clean up any TreeScope to a removed tree.
138 if (Document* containerDocument = container.ownerDocument()) 138 if (Document* containerDocument = container.ownerDocument())
139 containerDocument->adoptIfNeeded(&node); 139 containerDocument->adoptIfNeeded(node);
140 if (node.inDocument()) 140 if (node.inDocument())
141 ChildNodeRemovalNotifier(container).notify(node); 141 ChildNodeRemovalNotifier(container).notify(node);
142 } 142 }
143 }; 143 };
144 144
145 template<class GenericNode> 145 template<class GenericNode>
146 struct ShouldDispatchRemovalNotification { 146 struct ShouldDispatchRemovalNotification {
147 static const bool value = false; 147 static const bool value = false;
148 }; 148 };
149 149
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 for (Node* child = m_root->firstChild(); child; child = child->nextSibli ng()) 339 for (Node* child = m_root->firstChild(); child; child = child->nextSibli ng())
340 collectFrameOwners(child); 340 collectFrameOwners(child);
341 } 341 }
342 342
343 disconnectCollectedFrameOwners(); 343 disconnectCollectedFrameOwners();
344 } 344 }
345 345
346 } // namespace WebCore 346 } // namespace WebCore
347 347
348 #endif // ContainerNodeAlgorithms_h 348 #endif // ContainerNodeAlgorithms_h
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698