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

Unified Diff: Source/core/editing/DeleteSelectionCommand.cpp

Issue 69543007: Have NodeTraversal::nextSkippingChildren() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
index 3fc44584c7440334205c86601d43ffd155e7823c..ce27bb711cf0898ce1eb7760c9b3a2d8e635bdc6 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -431,7 +431,7 @@ void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr
while (node && node != range->pastLastNode()) {
RefPtr<Node> nextNode = NodeTraversal::next(*node);
if ((node->hasTagName(styleTag) && !(toElement(node)->hasAttribute(scopedAttr))) || node->hasTagName(linkTag)) {
- nextNode = NodeTraversal::nextSkippingChildren(node.get());
+ nextNode = NodeTraversal::nextSkippingChildren(*node);
RefPtr<ContainerNode> rootEditableElement = node->rootEditableElement();
if (rootEditableElement.get()) {
removeNode(node);
@@ -468,7 +468,7 @@ void DeleteSelectionCommand::handleGeneralDelete()
}
if (startOffset >= lastOffsetForEditing(startNode)) {
- startNode = NodeTraversal::nextSkippingChildren(startNode);
+ startNode = NodeTraversal::nextSkippingChildren(*startNode);
startOffset = 0;
}
@@ -517,7 +517,7 @@ void DeleteSelectionCommand::handleGeneralDelete()
// NodeTraversal::nextSkippingChildren just blew past the end position, so stop deleting
node = 0;
} else if (!m_downstreamEnd.deprecatedNode()->isDescendantOf(node.get())) {
- RefPtr<Node> nextNode = NodeTraversal::nextSkippingChildren(node.get());
+ RefPtr<Node> nextNode = NodeTraversal::nextSkippingChildren(*node);
// if we just removed a node from the end container, update end position so the
// check above will work
updatePositionForNodeRemoval(m_downstreamEnd, node.get());
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698