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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/dom/LiveNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeList.h
diff --git a/Source/core/dom/LiveNodeList.h b/Source/core/dom/LiveNodeList.h
index 06e6d8f04399eb55fc23132162bcda807791eb3c..97dd515544a081d6c5657ec2bb06e095b5bef11e 100644
--- a/Source/core/dom/LiveNodeList.h
+++ b/Source/core/dom/LiveNodeList.h
@@ -68,13 +68,13 @@ public:
ASSERT(!m_overridesItemAfter || !isNodeList(collectionType));
if (collectionType != ChildNodeListType)
- document()->registerNodeList(this);
+ document().registerNodeList(this);
}
virtual ~LiveNodeListBase()
{
if (type() != ChildNodeListType)
- document()->unregisterNodeList(this);
+ document().unregisterNodeList(this);
}
// DOM API
@@ -99,7 +99,7 @@ public:
static bool shouldInvalidateTypeOnAttributeChange(NodeListInvalidationType, const QualifiedName&);
protected:
- Document* document() const { return m_ownerNode->document(); }
+ Document& document() const { return m_ownerNode->document(); }
Node* rootNode() const;
ContainerNode* rootContainerNode() const;
bool overridesItemAfter() const { return m_overridesItemAfter; }
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/dom/LiveNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698