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

Unified Diff: ui/views/controls/textfield/textfield_model.cc

Issue 2348143003: MacViews: Implement Force Touch/Mac dictionary lookup for Textfields. (Closed)
Patch Set: Address nits. Created 4 years, 2 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 | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield_model.cc
diff --git a/ui/views/controls/textfield/textfield_model.cc b/ui/views/controls/textfield/textfield_model.cc
index a89c3cc99aa9ae0d48a321b85faef35ef54e74a0..dc1bc5539ef39a35a37a72714a9ad13923daf36a 100644
--- a/ui/views/controls/textfield/textfield_model.cc
+++ b/ui/views/controls/textfield/textfield_model.cc
@@ -624,9 +624,7 @@ void TextfieldModel::DeleteSelectionAndInsertTextAt(
}
base::string16 TextfieldModel::GetTextFromRange(const gfx::Range& range) const {
- if (range.IsValid() && range.GetMin() < text().length())
- return text().substr(range.GetMin(), range.length());
- return base::string16();
+ return render_text_->GetTextFromRange(range);
}
void TextfieldModel::GetTextRange(gfx::Range* range) const {
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698