Index: Source/core/dom/ContainerNode.cpp |
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp |
index 42a91511de6ab95d5464e240c9d2c30ba8dc0ce9..77c1f83be0f6ff3160492ab385c087863d2852da 100644 |
--- a/Source/core/dom/ContainerNode.cpp |
+++ b/Source/core/dom/ContainerNode.cpp |
@@ -87,7 +87,7 @@ void ContainerNode::removeDetachedChildren() |
void ContainerNode::parserTakeAllChildrenFrom(ContainerNode& oldParent) |
{ |
- while (RefPtr<Node> child = oldParent.firstChild()) { |
+ while (RefPtrWillBeRawPtr<Node> child = oldParent.firstChild()) { |
oldParent.parserRemoveChild(*child); |
treeScope().adoptIfNeeded(*child); |
parserAppendChild(child.get()); |
@@ -176,7 +176,7 @@ bool ContainerNode::checkAcceptChildGuaranteedNodeTypes(const Node& newChild, Ex |
return true; |
} |
-void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState) |
+void ContainerNode::insertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node* refChild, ExceptionState& exceptionState) |
{ |
#if !ENABLE(OILPAN) |
// Check that this node is not "floating". |
@@ -184,7 +184,7 @@ void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce |
ASSERT(refCount() || parentOrShadowHostNode()); |
#endif |
- RefPtr<Node> protect(this); |
+ RefPtrWillBeRawPtr<Node> protect(this); |
// insertBefore(node, 0) is equivalent to appendChild(node) |
if (!refChild) { |
@@ -206,7 +206,7 @@ void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce |
if (refChild->previousSibling() == newChild || refChild == newChild) // nothing to do |
return; |
- RefPtr<Node> next = refChild; |
+ RefPtrWillBeRawPtr<Node> next = refChild; |
NodeVector targets; |
collectChildrenAndRemoveFromOldParent(*newChild, targets, exceptionState); |
@@ -271,7 +271,7 @@ void ContainerNode::insertBeforeCommon(Node& nextChild, Node& newChild) |
newChild.setNextSibling(&nextChild); |
} |
-void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node& nextChild) |
+void ContainerNode::parserInsertBefore(PassRefPtrWillBeRawPtr<Node> newChild, Node& nextChild) |
{ |
ASSERT(newChild); |
ASSERT(nextChild.parentNode() == this); |
@@ -295,7 +295,7 @@ void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node& nextChil |
notifyNodeInserted(*newChild); |
} |
-void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState) |
+void ContainerNode::replaceChild(PassRefPtrWillBeRawPtr<Node> newChild, Node* oldChild, ExceptionState& exceptionState) |
{ |
#if !ENABLE(OILPAN) |
// Check that this node is not "floating". |
@@ -303,7 +303,7 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce |
ASSERT(refCount() || parentOrShadowHostNode()); |
#endif |
- RefPtr<Node> protect(this); |
+ RefPtrWillBeRawPtr<Node> protect(this); |
if (oldChild == newChild) // nothing to do |
return; |
@@ -325,10 +325,11 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce |
ChildListMutationScope mutation(*this); |
- RefPtr<Node> next = oldChild->nextSibling(); |
+ RefPtrWillBeRawPtr<Node> next = oldChild->nextSibling(); |
// Remove the node we're replacing |
- RefPtr<Node> removedChild = oldChild; |
+ // FIXME: Oilpan: |removedChild| is unnecessary. |
+ RefPtrWillBeRawPtr<Node> removedChild ALLOW_UNUSED = oldChild; |
tkent
2014/06/04 08:58:45
This was not buildable without ALLOW_UNUSED.
haraken
2014/06/04 09:04:04
Shall we rename the removeChild to something else?
zerny-chromium
2014/06/04 09:28:18
RefPtrWillBeRawPtr<Node> removedChild(oldChild);
Erik Corry
2014/06/04 09:35:47
I think you are confusing removedChild and removeC
tkent
2014/06/05 00:22:27
I removed this part due to https://codereview.chro
|
removeChild(oldChild, exceptionState); |
if (exceptionState.hadException()) |
return; |
@@ -429,7 +430,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& exceptionState) |
ASSERT(refCount() || parentOrShadowHostNode()); |
#endif |
- RefPtr<Node> protect(this); |
+ RefPtrWillBeRawPtr<Node> protect(this); |
// NotFoundError: Raised if oldChild is not a child of this node. |
// FIXME: We should never really get PseudoElements in here, but editing will sometimes |
@@ -440,7 +441,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& exceptionState) |
return; |
} |
- RefPtr<Node> child = oldChild; |
+ RefPtrWillBeRawPtr<Node> child = oldChild; |
document().removeFocusedElementOfSubtree(child.get()); |
@@ -526,7 +527,7 @@ void ContainerNode::removeChildren() |
return; |
// The container node can be removed from event handlers. |
- RefPtr<ContainerNode> protect(this); |
+ RefPtrWillBeRawPtr<ContainerNode> protect(this); |
if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document())) |
fullscreen->removeFullScreenElementOfSubtree(this, true); |
@@ -572,9 +573,9 @@ void ContainerNode::removeChildren() |
dispatchSubtreeModifiedEvent(); |
} |
-void ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionState& exceptionState) |
+void ContainerNode::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& exceptionState) |
{ |
- RefPtr<ContainerNode> protect(this); |
+ RefPtrWillBeRawPtr<ContainerNode> protect(this); |
#if !ENABLE(OILPAN) |
// Check that this node is not "floating". |
@@ -630,7 +631,7 @@ void ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionState& excep |
dispatchSubtreeModifiedEvent(); |
} |
-void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild) |
+void ContainerNode::parserAppendChild(PassRefPtrWillBeRawPtr<Node> newChild) |
{ |
ASSERT(newChild); |
ASSERT(!newChild->parentNode()); // Use appendChild if you need to handle reparenting (and want DOM mutation events). |
@@ -663,8 +664,8 @@ void ContainerNode::notifyNodeInserted(Node& root) |
InspectorInstrumentation::didInsertDOMNode(&root); |
- RefPtr<Node> protect(this); |
- RefPtr<Node> protectNode(root); |
+ RefPtrWillBeRawPtr<Node> protect(this); |
+ RefPtrWillBeRawPtr<Node> protectNode(root); |
NodeVector postInsertionNotificationTargets; |
notifyNodeInsertedInternal(root, postInsertionNotificationTargets); |