| Index: Source/core/dom/ContainerNodeAlgorithms.h
|
| diff --git a/Source/core/dom/ContainerNodeAlgorithms.h b/Source/core/dom/ContainerNodeAlgorithms.h
|
| index c6014f3598e04f325a85d8f7fc341f110ff34a58..a8094a3c1426d3cd1bd5826dcc62f71f4933b7fc 100644
|
| --- a/Source/core/dom/ContainerNodeAlgorithms.h
|
| +++ b/Source/core/dom/ContainerNodeAlgorithms.h
|
| @@ -85,34 +85,6 @@ inline void appendChildToContainer(GenericNode& child, GenericNodeContainer& con
|
| // Helper methods for removeDetachedChildrenInContainer, hidden from WebCore namespace
|
| namespace Private {
|
|
|
| - template<class GenericNode, class GenericNodeContainer, bool dispatchRemovalNotification>
|
| - struct NodeRemovalDispatcher {
|
| - static void dispatch(GenericNode&, GenericNodeContainer&)
|
| - {
|
| - // no-op, by default
|
| - }
|
| - };
|
| -
|
| - template<class GenericNode, class GenericNodeContainer>
|
| - struct NodeRemovalDispatcher<GenericNode, GenericNodeContainer, true> {
|
| - static void dispatch(GenericNode& node, GenericNodeContainer& container)
|
| - {
|
| - container.document().adoptIfNeeded(node);
|
| - if (node.inDocument())
|
| - container.notifyNodeRemoved(node);
|
| - }
|
| - };
|
| -
|
| - template<class GenericNode>
|
| - struct ShouldDispatchRemovalNotification {
|
| - static const bool value = false;
|
| - };
|
| -
|
| - template<>
|
| - struct ShouldDispatchRemovalNotification<Node> {
|
| - static const bool value = true;
|
| - };
|
| -
|
| template<class GenericNode, class GenericNodeContainer>
|
| void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer& container)
|
| {
|
| @@ -142,7 +114,9 @@ namespace Private {
|
| tail = n;
|
| } else {
|
| RefPtrWillBeRawPtr<GenericNode> protect(n); // removedFromDocument may remove all references to this node.
|
| - NodeRemovalDispatcher<GenericNode, GenericNodeContainer, ShouldDispatchRemovalNotification<GenericNode>::value>::dispatch(*n, container);
|
| + container.document().adoptIfNeeded(*n);
|
| + if (n->inDocument())
|
| + container.notifyNodeRemoved(*n);
|
| }
|
| }
|
|
|
|
|