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

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

Issue 425223005: Move Node/ContainerNode's traverseToChildAt() to NodeTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/NodeTraversal.h » ('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) 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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 bool inDocument() const 459 bool inDocument() const
460 { 460 {
461 return getFlag(InDocumentFlag); 461 return getFlag(InDocumentFlag);
462 } 462 }
463 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } 463 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
464 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); } 464 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); }
465 465
466 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; } 466 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; }
467 virtual bool childTypeAllowed(NodeType) const { return false; } 467 virtual bool childTypeAllowed(NodeType) const { return false; }
468 unsigned countChildren() const; 468 unsigned countChildren() const;
469 Node* traverseToChildAt(unsigned index) const;
470 469
471 bool isDescendantOf(const Node*) const; 470 bool isDescendantOf(const Node*) const;
472 bool contains(const Node*) const; 471 bool contains(const Node*) const;
473 bool containsIncludingShadowDOM(const Node*) const; 472 bool containsIncludingShadowDOM(const Node*) const;
474 bool containsIncludingHostElements(const Node&) const; 473 bool containsIncludingHostElements(const Node&) const;
475 Node* commonAncestor(const Node&, Node* (*parent)(const Node&)); 474 Node* commonAncestor(const Node&, Node* (*parent)(const Node&));
476 475
477 // Used to determine whether range offsets use characters or node indices. 476 // Used to determine whether range offsets use characters or node indices.
478 virtual bool offsetInCharacters() const; 477 virtual bool offsetInCharacters() const;
479 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of 478 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } // namespace blink 880 } // namespace blink
882 881
883 #ifndef NDEBUG 882 #ifndef NDEBUG
884 // Outside the WebCore namespace for ease of invocation from gdb. 883 // Outside the WebCore namespace for ease of invocation from gdb.
885 void showNode(const blink::Node*); 884 void showNode(const blink::Node*);
886 void showTree(const blink::Node*); 885 void showTree(const blink::Node*);
887 void showNodePath(const blink::Node*); 886 void showNodePath(const blink::Node*);
888 #endif 887 #endif
889 888
890 #endif 889 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/NodeTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698