Chromium Code Reviews| 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..aa03f7a1ec93edc16c1312331d83dcc8b96be5c1 100644 |
| --- a/third_party/WebKit/Source/core/dom/Node.h |
| +++ b/third_party/WebKit/Source/core/dom/Node.h |
| @@ -476,14 +476,14 @@ 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 |
| + // Returns true if this node is connected to a document, false otherwise. |
| + // If you are looking for inDocument() or inShadowIncludingDocument(), they were removed. Use isConnected() instead. |
|
tkent
2016/07/14 08:21:09
I don't think this line is necessary.
Also, I wan
hayato
2016/07/14 08:47:12
Done.
Since the definition of "connected" is "An
|
| + bool isConnected() const |
| { |
| - return getFlag(InDocumentFlag); |
| + 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 +571,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 +710,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 +757,7 @@ protected: |
| CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, |
| CreateHTMLElement = CreateElement | IsHTMLFlag, |
| CreateSVGElement = CreateElement | IsSVGFlag, |
| - CreateDocument = CreateContainer | InDocumentFlag, |
| + CreateDocument = CreateContainer | IsConnectedFlag, |
| CreateInsertionPoint = CreateHTMLElement | IsInsertionPointFlag, |
| CreateEditingText = CreateText | HasNameOrIsEditingTextFlag, |
| }; |