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

Unified Diff: third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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: third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp
index 655b95ecf244ac2ec4974a7630f50e8e9c39900a..f94f55c37f224a0054a24e11b30242b8a740541c 100644
--- a/third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp
@@ -63,7 +63,7 @@ void MoveSelectionCommand::doApply(EditingState* editingState)
// 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.inDocument())
+ if (!pos.inShadowIncludingDocument())
pos = endingSelection().start();
cleanupAfterDeletion(editingState, createVisiblePosition(pos));
@@ -71,7 +71,7 @@ void MoveSelectionCommand::doApply(EditingState* editingState)
return;
setEndingSelection(VisibleSelection(pos, endingSelection().affinity(), endingSelection().isDirectional()));
- if (!pos.inDocument()) {
+ if (!pos.inShadowIncludingDocument()) {
// Document was modified out from under us.
return;
}

Powered by Google App Engine
This is Rietveld 408576698