Index: Source/WebCore/dom/Element.h |
=================================================================== |
--- Source/WebCore/dom/Element.h (revision 139387) |
+++ Source/WebCore/dom/Element.h (working copy) |
@@ -826,6 +826,25 @@ |
return isElementNode() && toElement(this)->hasClass(); |
} |
+inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* insertionPoint) |
+{ |
+ ASSERT(insertionPoint->inDocument() || isContainerNode()); |
+ if (insertionPoint->inDocument()) |
+ setFlag(InDocumentFlag); |
+ if (parentOrHostNode()->isInShadowTree()) |
+ setFlag(IsInShadowTreeFlag); |
+ return InsertionDone; |
+} |
+ |
+inline void Node::removedFrom(ContainerNode* insertionPoint) |
+{ |
+ ASSERT(insertionPoint->inDocument() || isContainerNode()); |
+ if (insertionPoint->inDocument()) |
+ clearFlag(InDocumentFlag); |
+ if (isInShadowTree() && !treeScope()->rootNode()->isShadowRoot()) |
+ clearFlag(IsInShadowTreeFlag); |
+} |
+ |
inline bool isShadowHost(const Node* node) |
{ |
return node && node->isElementNode() && toElement(node)->shadow(); |