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

Unified Diff: Source/core/dom/ChildNodeList.h

Issue 180143003: Have LiveNodeListBase::ownerNode() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 | « Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp ('k') | Source/core/dom/ChildNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ChildNodeList.h
diff --git a/Source/core/dom/ChildNodeList.h b/Source/core/dom/ChildNodeList.h
index 0fe38cc7abdc24faa58e532c019570c05693df56..aab6861c3b2d1d309d1a8409e03dc818ede6de3d 100644
--- a/Source/core/dom/ChildNodeList.h
+++ b/Source/core/dom/ChildNodeList.h
@@ -46,10 +46,10 @@ public:
// Non-DOM API.
void invalidateCache() { m_collectionIndexCache.invalidate(); }
- ContainerNode* ownerNode() const { return m_parent.get(); }
+ ContainerNode& ownerNode() const { return *m_parent; }
// CollectionIndexCache API.
- ContainerNode& rootNode() const { return *m_parent; }
+ ContainerNode& rootNode() const { return ownerNode(); }
bool canTraverseBackward() const { return true; }
Node* itemBefore(const Node* previousItem) const;
Node* traverseToFirstElement(const ContainerNode& root) const { return root.firstChild(); }
« no previous file with comments | « Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp ('k') | Source/core/dom/ChildNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698