Index: Source/core/dom/Node.h |
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h |
index 58738dcc8f2720a3a7b149df6ea97f8f570ccea4..0f915b46052dc1c99d41a466fc0b9461eaf2c670 100644 |
--- a/Source/core/dom/Node.h |
+++ b/Source/core/dom/Node.h |
@@ -39,6 +39,7 @@ |
#include "weborigin/KURLHash.h" |
#include "wtf/Forward.h" |
#include "wtf/ListHashSet.h" |
+#include "wtf/NonNullPtr.h" |
#include "wtf/text/AtomicString.h" |
// This needs to be here because Document.h also depends on it. |
@@ -265,7 +266,7 @@ public: |
bool isStyledElement() const { return isHTMLElement() || isSVGElement(); } |
bool isDocumentNode() const; |
- bool isTreeScope() const { return treeScope().rootNode() == this; } |
+ bool isTreeScope() const { return treeScope()->rootNode() == this; } |
bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); } |
bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); } |
bool isInsertionPoint() const { return getFlag(IsInsertionPointFlag); } |
@@ -480,7 +481,7 @@ public: |
return *documentInternal(); |
} |
- TreeScope& treeScope() const { return *m_treeScope; } |
+ NonNullPtr<TreeScope> treeScope() const { return m_treeScope; } |
// Returns true if this node is associated with a document and is in its associated document's |
// node tree, false otherwise. |
@@ -805,7 +806,7 @@ protected: |
void setHasCustomStyleCallbacks() { setFlag(true, HasCustomStyleCallbacksFlag); } |
- Document* documentInternal() const { return treeScope().documentScope(); } |
+ Document* documentInternal() const { return treeScope()->documentScope(); } |
void setTreeScope(TreeScope* scope) { m_treeScope = scope; } |
private: |