| 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, 2009, 2010, 2011, 2013 Apple Inc. All | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 Collection* CachedCollection(CollectionType); | 365 Collection* CachedCollection(CollectionType); |
| 366 | 366 |
| 367 private: | 367 private: |
| 368 bool IsContainerNode() const = | 368 bool IsContainerNode() const = |
| 369 delete; // This will catch anyone doing an unnecessary check. | 369 delete; // This will catch anyone doing an unnecessary check. |
| 370 bool IsTextNode() const = | 370 bool IsTextNode() const = |
| 371 delete; // This will catch anyone doing an unnecessary check. | 371 delete; // This will catch anyone doing an unnecessary check. |
| 372 | 372 |
| 373 NodeListsNodeData& EnsureNodeLists(); | 373 NodeListsNodeData& EnsureNodeLists(); |
| 374 void RemoveBetween(Node* previous_child, Node* next_child, Node& old_child); | 374 void RemoveBetween(Node* previous_child, Node* next_child, Node& old_child); |
| 375 // Inserts the specified nodes before |next|. |
| 376 // |next| may be nullptr. |
| 377 // |post_insertion_notification_targets| must not be nullptr. |
| 375 template <typename Functor> | 378 template <typename Functor> |
| 376 void InsertNodeVector(const NodeVector&, Node* next, const Functor&); | 379 void InsertNodeVector(const NodeVector&, |
| 380 Node* next, |
| 381 const Functor&, |
| 382 NodeVector* post_insertion_notification_targets); |
| 383 void DidInsertNodeVector( |
| 384 const NodeVector&, |
| 385 Node* next, |
| 386 const NodeVector& post_insertion_notification_targets); |
| 377 class AdoptAndInsertBefore; | 387 class AdoptAndInsertBefore; |
| 378 class AdoptAndAppendChild; | 388 class AdoptAndAppendChild; |
| 379 friend class AdoptAndInsertBefore; | 389 friend class AdoptAndInsertBefore; |
| 380 friend class AdoptAndAppendChild; | 390 friend class AdoptAndAppendChild; |
| 381 void InsertBeforeCommon(Node& next_child, Node& new_child); | 391 void InsertBeforeCommon(Node& next_child, Node& new_child); |
| 382 void AppendChildCommon(Node& child); | 392 void AppendChildCommon(Node& child); |
| 383 void WillRemoveChildren(); | 393 void WillRemoveChildren(); |
| 384 void WillRemoveChild(Node& child); | 394 void WillRemoveChild(Node& child); |
| 385 void RemoveDetachedChildrenInContainer(ContainerNode&); | 395 void RemoveDetachedChildrenInContainer(ContainerNode&); |
| 386 void AddChildNodesToDeletionQueue(Node*&, Node*&, ContainerNode&); | 396 void AddChildNodesToDeletionQueue(Node*&, Node*&, ContainerNode&); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 500 |
| 491 inline void GetChildNodes(ContainerNode& node, NodeVector& nodes) { | 501 inline void GetChildNodes(ContainerNode& node, NodeVector& nodes) { |
| 492 DCHECK(!nodes.size()); | 502 DCHECK(!nodes.size()); |
| 493 for (Node* child = node.firstChild(); child; child = child->nextSibling()) | 503 for (Node* child = node.firstChild(); child; child = child->nextSibling()) |
| 494 nodes.push_back(child); | 504 nodes.push_back(child); |
| 495 } | 505 } |
| 496 | 506 |
| 497 } // namespace blink | 507 } // namespace blink |
| 498 | 508 |
| 499 #endif // ContainerNode_h | 509 #endif // ContainerNode_h |
| OLD | NEW |