[Webkit-unassigned] [Bug 170717] New: Webkit 2.14.6 fails to build: no matching function for call to ‘WebCore::ContainerNode::ensurePreInsertionValidity
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 10 21:56:15 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=170717
Bug ID: 170717
Summary: Webkit 2.14.6 fails to build: no matching function for
call to
‘WebCore::ContainerNode::ensurePreInsertionValidity
Product: WebKit
Version: WebKit Nightly Build
Hardware: PC
OS: Other
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
Assignee: webkit-unassigned at lists.webkit.org
Reporter: apyhalov at gmail.com
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
@@ -127,21 +128,27 @@
mutation.willRemoveChild(child);
}
- // FIXME: We need to do notifyMutationObserversNodeWillDetach() for each child,
- // probably inside removeDetachedChildrenInContainer.
+ disconnectSubframesIfNeeded(*oldParent, DescendantsOnly);
+ {
+ NoEventDispatchAssertion assertNoEventDispatch;
- oldParent->removeDetachedChildren();
+ oldParent->document().nodeChildrenWillBeRemoved(*oldParent);
- for (auto& child : children) {
- destroyRenderTreeIfNeeded(child);
+ WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
+ while (RefPtr<Node> child = oldParent->m_firstChild) {
+ oldParent->removeBetween(nullptr, child->nextSibling(), *child);
+ notifyChildNodeRemoved(*oldParent, *child);
+ }
+ ChildChange change = { AllChildrenRemoved, nullptr, nullptr, ChildChangeSourceParser };
+ childrenChanged(change);
+ }
- // FIXME: We need a no mutation event version of adoptNode.
- RefPtr<Node> 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& child : children) {
+ RELEASE_ASSERT(!child->parentNode() && &child->treeScope() == &treeScope());
+ ASSERT(!ensurePreInsertionValidity(child, nullptr).hasException());
+ treeScope().adoptIfNeeded(child.ptr());
+ parserAppendChild(child);
}
}
But ContainerNode.cpp uses old style of ensurePreInsertionValidity function:
// https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
bool ContainerNode::ensurePreInsertionValidity(Node& newChild, Node* refChild, ExceptionCode& 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<WebCore::Node>&, std::nullptr_t)’
ASSERT(!ensurePreInsertionValidity(child, nullptr).hasException());
...
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170411/d79705d7/attachment-0001.html>
More information about the webkit-unassigned
mailing list