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

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

Issue 23450030: Introduce Position::inDocument() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/editing/InsertTextCommand.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/MoveSelectionCommand.cpp
diff --git a/Source/core/editing/MoveSelectionCommand.cpp b/Source/core/editing/MoveSelectionCommand.cpp
index 5d70c5099065ec6ba3dcafd81158d83e078a3e95..7d45d37106b20914baf7c4e5244b0b4eeddf6495 100644
--- a/Source/core/editing/MoveSelectionCommand.cpp
+++ b/Source/core/editing/MoveSelectionCommand.cpp
@@ -62,13 +62,13 @@ void MoveSelectionCommand::doApply()
// set the destination to the ending point after the deletion.
// Fixes: <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand;
// selection is empty, leading to null deref
- if (!pos.anchorNode()->inDocument())
+ if (!pos.inDocument())
pos = endingSelection().start();
cleanupAfterDeletion(pos);
setEndingSelection(VisibleSelection(pos, endingSelection().affinity(), endingSelection().isDirectional()));
- if (!pos.anchorNode()->inDocument()) {
+ if (!pos.inDocument()) {
// Document was modified out from under us.
return;
}
« no previous file with comments | « Source/core/editing/InsertTextCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698