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

Unified Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 1883083002: Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamed Created 4 years, 7 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
Index: third_party/WebKit/Source/core/dom/Node.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index a9ee2d12e383f75c545bde438b64b46baec4f808..fedf63e639b20271dd49a9d7fb12d86cfa38f785 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -471,6 +471,12 @@ public:
return *m_treeScope;
}
+ TreeScope& containingTreeScope() const
+ {
+ DCHECK(isInTreeScope());
+ return *m_treeScope;
+ }
+
bool inActiveDocument() const;
// Returns true if this node is associated with a shadow-including document and is in its associated document's
« no previous file with comments | « third_party/WebKit/Source/core/dom/LiveNodeListBase.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698