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/FrameSelection.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: Rebase 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/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index 4e72e8c317979864b9730bbc34459d17d35e6c9f..337a1b7dc08977c1d8caa9473b8004240690c1c1 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1414,7 +1414,7 @@ bool FrameSelection::setSelectedRange(Range* range, EAffinity affinity, SetSelec
m_logicalRange = nullptr;
stopObservingVisibleSelectionChangeIfNecessary();
- VisibleSelection newSelection(range, affinity);
+ VisibleSelection newSelection(range, affinity, range->collapsed() ? m_selection.isDirectional() : true);
setSelection(newSelection, options);
m_logicalRange = range->cloneRange();

Powered by Google App Engine
This is Rietveld 408576698