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

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

Issue 420323002: Move Node::lastDescendantOrSelf() to NodeTraversal and rename to lastWithinOrSelf() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
« no previous file with comments | « Source/core/dom/NodeTraversal.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.h » ('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 66ab6ae4aa60e3f5a1f2e4396dac22bd6b386d81..76fdbf5cae0e883828ea0da12e27e29726a57c86 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -522,7 +522,7 @@ void DeleteSelectionCommand::handleGeneralDelete()
removeNode(node.get());
node = nextNode.get();
} else {
- Node& n = node->lastDescendantOrSelf();
+ Node& n = NodeTraversal::lastWithinOrSelf(*node);
if (m_downstreamEnd.deprecatedNode() == n && m_downstreamEnd.deprecatedEditingOffset() >= caretMaxOffset(&n)) {
removeNode(node.get());
node = nullptr;
« no previous file with comments | « Source/core/dom/NodeTraversal.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698