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

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

Issue 225303002: Let Selection.collapse remember a raw Position instead of a canonicalized one. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix setSelectedRange arguments Created 6 years, 6 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: Source/core/editing/EditorCommand.cpp
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp
index fb8e79ac89f15306bfb0552052fb622fb8c25f2b..b88e577a4258ced1f67923b988f928e3325d80c1 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -219,7 +219,7 @@ static bool expandSelectionToGranularity(LocalFrame& frame, TextGranularity gran
if (newRange->collapsed())
return false;
EAffinity affinity = frame.selection().affinity();
- frame.selection().setSelectedRange(newRange.get(), affinity, FrameSelection::CloseTyping);
+ frame.selection().setSelectedRange(newRange.get(), affinity, false, FrameSelection::CloseTyping);
return true;
}
@@ -381,7 +381,7 @@ static bool executeDeleteToMark(LocalFrame& frame, Event*, EditorCommandSource,
{
RefPtrWillBeRawPtr<Range> mark = frame.editor().mark().toNormalizedRange();
if (mark) {
- bool selected = frame.selection().setSelectedRange(unionDOMRanges(mark.get(), frame.editor().selectedRange().get()).get(), DOWNSTREAM, FrameSelection::CloseTyping);
+ bool selected = frame.selection().setSelectedRange(unionDOMRanges(mark.get(), frame.editor().selectedRange().get()).get(), DOWNSTREAM, false, FrameSelection::CloseTyping);
ASSERT(selected);
if (!selected)
return false;
@@ -1031,7 +1031,7 @@ static bool executeSelectToMark(LocalFrame& frame, Event*, EditorCommandSource,
RefPtrWillBeRawPtr<Range> selection = frame.editor().selectedRange();
if (!mark || !selection)
return false;
- frame.selection().setSelectedRange(unionDOMRanges(mark.get(), selection.get()).get(), DOWNSTREAM, FrameSelection::CloseTyping);
+ frame.selection().setSelectedRange(unionDOMRanges(mark.get(), selection.get()).get(), DOWNSTREAM, false, FrameSelection::CloseTyping);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698