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

Unified 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: Fix the comments in TreeNode.h to be more descriptive 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/NodeTraversal.h » ('j') | Source/wtf/TreeNode.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 7465bdd137d45a83afa4d6274d056a4c3cbfb9a6..0fab26e36c229642e40cbb5796a7fa86bf371fab 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -171,6 +171,9 @@ public:
virtual String nodeValue() const;
virtual void setNodeValue(const String&);
virtual NodeType nodeType() const = 0;
+ // FIXME: We should get rid of parentNode() usage and replace with parent()
+ // to bring us inline with the API of other tree structures in the codebase.
+ ContainerNode* parent() const { return parentNode(); }
ContainerNode* parentNode() const;
Element* parentElement() const;
Node* previousSibling() const { return m_previous; }
« no previous file with comments | « no previous file | Source/core/dom/NodeTraversal.h » ('j') | Source/wtf/TreeNode.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698