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

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

Issue 2750833002: TextControlElement::selection() should return SelectionInDOMTree. (Closed)
Patch Set: Y Created 3 years, 9 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/html/TextControlElement.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/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index ce1da9ec34ced06e438f7647dde0cbd4303ae33b..3d14024799bffafc78c2f719d63aaf64683faa6f 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -171,13 +171,9 @@ VisibleSelection Editor::selectionForCommand(Event* event) {
if (textControlOfTarget &&
(selection.start().isNull() ||
textControlOfTarget != textControlOfSelectionStart)) {
- if (Range* range = textControlOfTarget->selection()) {
- return createVisibleSelection(
- SelectionInDOMTree::Builder()
- .setBaseAndExtent(EphemeralRange(range))
- .setIsDirectional(selection.isDirectional())
- .build());
- }
+ const SelectionInDOMTree& select = textControlOfTarget->selection();
+ if (!select.isNone())
+ return createVisibleSelection(select);
}
return selection;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/TextControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698