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

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

Issue 24773003: Rename Node::attached() to confusingAndOftenMisusedAttached() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 if (m_insertionPoint->inDocument()) 221 if (m_insertionPoint->inDocument())
222 notifyNodeInsertedIntoDocument(node); 222 notifyNodeInsertedIntoDocument(node);
223 else if (node->isContainerNode()) 223 else if (node->isContainerNode())
224 notifyNodeInsertedIntoTree(toContainerNode(node)); 224 notifyNodeInsertedIntoTree(toContainerNode(node));
225 225
226 // Script runs in didNotifySubtreeInsertions so we should lazy attach before 226 // Script runs in didNotifySubtreeInsertions so we should lazy attach before
227 // to ensure that triggering a style recalc in script attaches all nodes tha t 227 // to ensure that triggering a style recalc in script attaches all nodes tha t
228 // were inserted. 228 // were inserted.
229 // FIXME: We should merge the lazy attach logic into the tree traversal in 229 // FIXME: We should merge the lazy attach logic into the tree traversal in
230 // notifyNodeInsertedIntoDocument. 230 // notifyNodeInsertedIntoDocument.
231 if (!node->attached() && node->parentNode() && node->parentNode()->attached( )) 231 if (!node->confusingAndOftenMisusedAttached() && node->parentNode() && node- >parentNode()->confusingAndOftenMisusedAttached())
232 node->lazyAttach(); 232 node->lazyAttach();
233 233
234 for (size_t i = 0; i < m_postInsertionNotificationTargets.size(); ++i) { 234 for (size_t i = 0; i < m_postInsertionNotificationTargets.size(); ++i) {
235 Node* node = m_postInsertionNotificationTargets[i].get(); 235 Node* node = m_postInsertionNotificationTargets[i].get();
236 if (node->inDocument()) 236 if (node->inDocument())
237 node->didNotifySubtreeInsertionsToDocument(); 237 node->didNotifySubtreeInsertionsToDocument();
238 } 238 }
239 } 239 }
240 240
241 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node* node) 241 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node* node)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 for (Node* child = m_root->firstChild(); child; child = child->nextSibli ng()) 338 for (Node* child = m_root->firstChild(); child; child = child->nextSibli ng())
339 collectFrameOwners(child); 339 collectFrameOwners(child);
340 } 340 }
341 341
342 disconnectCollectedFrameOwners(); 342 disconnectCollectedFrameOwners();
343 } 343 }
344 344
345 } // namespace WebCore 345 } // namespace WebCore
346 346
347 #endif // ContainerNodeAlgorithms_h 347 #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