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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed 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 a3f8ef6d7178ab3cc3fef910916d7a6ead739df0..25d2a8915f62645b00f44d38dd50df5b182ce47e 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -476,14 +476,12 @@ public:
bool inActiveDocument() const;
- // Returns true if this node is associated with a shadow-including document and is in its associated document's
- // node tree, false otherwise.
- bool inShadowIncludingDocument() const
- {
- return getFlag(InDocumentFlag);
- }
+ // Returns true if this node is connected to a document, false otherwise.
+ // See https://dom.spec.whatwg.org/#connected for the definition.
+ bool isConnected() const { return getFlag(IsConnectedFlag); }
+
bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
- bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumentFlag | IsInShadowTreeFlag)); }
+ bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(IsConnectedFlag | IsInShadowTreeFlag)); }
ElementShadow* parentElementShadow() const;
bool isInV1ShadowTree() const;
@@ -571,7 +569,7 @@ public:
// dispatching.
//
// WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree.
- // Implementation can determine the type of subtree by seeing insertionPoint->inShadowIncludingDocument().
+ // Implementation can determine the type of subtree by seeing insertionPoint->isConnected().
// For a performance reason, notifications are delivered only to ContainerNode subclasses if the insertionPoint is out of document.
//
// There are another callback named didNotifySubtreeInsertionsToDocument(), which is called after all the descendant is notified,
@@ -710,7 +708,7 @@ private:
// Tree state flags. These change when the element is added/removed
// from a DOM tree.
- InDocumentFlag = 1 << 10,
+ IsConnectedFlag = 1 << 10,
IsInShadowTreeFlag = 1 << 11,
// Set by the parser when the children are done parsing.
@@ -757,7 +755,7 @@ protected:
CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag,
CreateHTMLElement = CreateElement | IsHTMLFlag,
CreateSVGElement = CreateElement | IsSVGFlag,
- CreateDocument = CreateContainer | InDocumentFlag,
+ CreateDocument = CreateContainer | IsConnectedFlag,
CreateInsertionPoint = CreateHTMLElement | IsInsertionPointFlag,
CreateEditingText = CreateText | HasNameOrIsEditingTextFlag,
};
« no previous file with comments | « third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.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