<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Webkit 2.14.6 fails to build: no matching function for call to ‘WebCore::ContainerNode::ensurePreInsertionValidity"
   href="https://bugs.webkit.org/show_bug.cgi?id=170717">170717</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Webkit 2.14.6 fails to build: no matching function for call to ‘WebCore::ContainerNode::ensurePreInsertionValidity
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>apyhalov&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In Webkit 2.14.6 the following code was added:

--- webkitgtk-2.14.5/Source/WebCore/dom/ContainerNode.cpp  2017-02-07 11:05:08.000000000 +0300
+++ webkitgtk-2.14.6/Source/WebCore/dom/ContainerNode.cpp        2017-04-06 13:52:51.000000000 +0300
&#64;&#64; -127,21 +128,27 &#64;&#64;
             mutation.willRemoveChild(child);
     }

-    // FIXME: We need to do notifyMutationObserversNodeWillDetach() for each child,
-    // probably inside removeDetachedChildrenInContainer.
+    disconnectSubframesIfNeeded(*oldParent, DescendantsOnly);
+    {
+        NoEventDispatchAssertion assertNoEventDispatch;

-    oldParent-&gt;removeDetachedChildren();
+        oldParent-&gt;document().nodeChildrenWillBeRemoved(*oldParent);

-    for (auto&amp; child : children) {
-        destroyRenderTreeIfNeeded(child);
+        WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
+        while (RefPtr&lt;Node&gt; child = oldParent-&gt;m_firstChild) {
+            oldParent-&gt;removeBetween(nullptr, child-&gt;nextSibling(), *child);
+            notifyChildNodeRemoved(*oldParent, *child);
+        }
+        ChildChange change = { AllChildrenRemoved, nullptr, nullptr, ChildChangeSourceParser };
+        childrenChanged(change);
+    }

-        // FIXME: We need a no mutation event version of adoptNode.
-        RefPtr&lt;Node&gt; adoptedChild = document().adoptNode(child, ASSERT_NO_EXCEPTION);
-        parserAppendChild(*adoptedChild);
-        // FIXME: Together with adoptNode above, the tree scope might get updated recursively twice
-        // (if the document changed or oldParent was in a shadow tree, AND *this is in a shadow tree).
-        // Can we do better?
-        treeScope().adoptIfNeeded(adoptedChild.get());
+    // FIXME: assert that we don't dispatch events here since this container node is still disconnected.
+    for (auto&amp; child : children) {
+        RELEASE_ASSERT(!child-&gt;parentNode() &amp;&amp; &amp;child-&gt;treeScope() == &amp;treeScope());
+        ASSERT(!ensurePreInsertionValidity(child, nullptr).hasException());
+        treeScope().adoptIfNeeded(child.ptr());
+        parserAppendChild(child);
     }
 }



But ContainerNode.cpp uses old style of ensurePreInsertionValidity function:

// <a href="https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity">https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity</a>
bool ContainerNode::ensurePreInsertionValidity(Node&amp; newChild, Node* refChild, ExceptionCode&amp; ec)
{
    ec = checkAcceptChild(*this, newChild, refChild, Document::AcceptChildOperation::InsertOrAdd);
    return !ec;
}

so build fails with 

webkitgtk-2.14.6/Source/WebCore/dom/ContainerNode.cpp:149:58: error: no matching function for call to ‘WebCore::ContainerNode::ensurePreInsertionValidity(WTF::Ref&lt;WebCore::Node&gt;&amp;, std::nullptr_t)’
         ASSERT(!ensurePreInsertionValidity(child, nullptr).hasException());
...</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>