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

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

Issue 125503002: We should unify various forms of tree traversal in DOM (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 | Source/core/dom/NodeTraversal.h » ('j') | Source/core/dom/NodeTraversal.h » ('J')
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, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 virtual ~Node(); 165 virtual ~Node();
166 166
167 // DOM methods & attributes for Node 167 // DOM methods & attributes for Node
168 168
169 bool hasTagName(const QualifiedName&) const; 169 bool hasTagName(const QualifiedName&) const;
170 virtual String nodeName() const = 0; 170 virtual String nodeName() const = 0;
171 virtual String nodeValue() const; 171 virtual String nodeValue() const;
172 virtual void setNodeValue(const String&); 172 virtual void setNodeValue(const String&);
173 virtual NodeType nodeType() const = 0; 173 virtual NodeType nodeType() const = 0;
174 ContainerNode* parent() const { return parentNode(); }
Inactive 2014/01/07 14:37:03 Longer term, we probably want to get rid of parent
174 ContainerNode* parentNode() const; 175 ContainerNode* parentNode() const;
175 Element* parentElement() const; 176 Element* parentElement() const;
176 Node* previousSibling() const { return m_previous; } 177 Node* previousSibling() const { return m_previous; }
177 Node* nextSibling() const { return m_next; } 178 Node* nextSibling() const { return m_next; }
178 PassRefPtr<NodeList> childNodes(); 179 PassRefPtr<NodeList> childNodes();
179 Node* firstChild() const; 180 Node* firstChild() const;
180 Node* lastChild() const; 181 Node* lastChild() const;
181 182
182 // ChildNode interface API 183 // ChildNode interface API
183 Element* previousElementSibling() const; 184 Element* previousElementSibling() const;
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 923
923 } // namespace WebCore 924 } // namespace WebCore
924 925
925 #ifndef NDEBUG 926 #ifndef NDEBUG
926 // Outside the WebCore namespace for ease of invocation from gdb. 927 // Outside the WebCore namespace for ease of invocation from gdb.
927 void showTree(const WebCore::Node*); 928 void showTree(const WebCore::Node*);
928 void showNodePath(const WebCore::Node*); 929 void showNodePath(const WebCore::Node*);
929 #endif 930 #endif
930 931
931 #endif 932 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/NodeTraversal.h » ('j') | Source/core/dom/NodeTraversal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698