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

Unified Diff: third_party/WebKit/Source/core/editing/DOMSelection.cpp

Issue 2278463002: Get rid of FrameSelection::moveTo() taking two VisiblePosition objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-24T17:07:58 Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index 4b4556ed9d7511399cec1209ca999155cd4982cb..f50cf2dba5784b8c3267098f010a5fed90f0873c 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -295,8 +295,8 @@ void DOMSelection::setBaseAndExtent(Node* baseNode, int baseOffset, Node* extent
VisiblePosition visibleBase = createVisiblePosition(createPosition(baseNode, baseOffset));
VisiblePosition visibleExtent = createVisiblePosition(createPosition(extentNode, extentOffset));
-
- m_frame->selection().moveTo(visibleBase, visibleExtent);
+ const bool selectionHasDirection = true;
+ m_frame->selection().setSelection(VisibleSelection(visibleBase, visibleExtent, selectionHasDirection));
}
void DOMSelection::modify(const String& alterString, const String& directionString, const String& granularityString)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698