Add an argument indicating the type of insertion to Node::insertedInto
[WebKit-https.git] / Source / WebCore / dom / ShadowRoot.cpp
index ba38c94..98137ed 100644 (file)
@@ -85,13 +85,12 @@ ShadowRoot::~ShadowRoot()
     removeDetachedChildren();
 }
 
-Node::InsertionNotificationRequest ShadowRoot::insertedInto(ContainerNode& insertionPoint)
+Node::InsertedIntoResult ShadowRoot::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    bool wasInDocument = isConnected();
-    DocumentFragment::insertedInto(insertionPoint);
-    if (insertionPoint.isConnected() && !wasInDocument)
+    DocumentFragment::insertedInto(insertionType, parentOfInsertedTree);
+    if (insertionType.connectedToDocument)
         document().didInsertInDocumentShadowRoot(*this);
-    return InsertionDone;
+    return InsertedIntoResult::Done;
 }
 
 void ShadowRoot::removedFrom(ContainerNode& insertionPoint)