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

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

Issue 2146973004: Add Node::isInDocumentTree() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@is-connected
Patch Set: inDocumentTree -> isInDocumentTree Created 4 years, 5 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 25d2a8915f62645b00f44d38dd50df5b182ce47e..e493eeaf467919c2fc8e02b99bd4f10a70e8f1dc 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -480,6 +480,7 @@ public:
// See https://dom.spec.whatwg.org/#connected for the definition.
bool isConnected() const { return getFlag(IsConnectedFlag); }
+ bool isInDocumentTree() const { return isConnected() && !isInShadowTree(); }
bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(IsConnectedFlag | IsInShadowTreeFlag)); }
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698