Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Unified Diff: Source/core/dom/Node.cpp

Issue 375293002: Node.insertBefore and Node.appendChild do not use custom binding anymore (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Best is always good Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 25d4bfeddc71f5eb1f27bfa574eac9c872386a53..ce104a589d24aec107a7f20a578c5ba5cb2ab644 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -464,12 +464,13 @@ Node* Node::pseudoAwareLastChild() const
return lastChild();
}
-void Node::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<Node> Node::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState)
{
if (isContainerNode())
- toContainerNode(this)->insertBefore(newChild, refChild, exceptionState);
- else
- exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
+ return toContainerNode(this)->insertBefore(newChild, refChild, exceptionState);
+
+ exceptionState.throwDOMException(HierarchyRequestError, "This node type does not support this method.");
+ return nullptr;
}
void Node::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698