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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 2399863002: views: call UpdateAfterChange() in Textfield::InsertOrReplaceText(). (Closed)
Patch Set: unit tests are good 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 | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 21dcca1a578fd0b1d316d46510e8f17aded8487b..6921255b7ec64eb864c8eaa02fd3f679cb0e6d91 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -89,6 +89,9 @@ class VIEWS_EXPORT Textfield : public View,
void AppendText(const base::string16& new_text);
// Inserts |new_text| at the cursor position, replacing any selected text.
+ // This method is used to handle user input via paths Textfield doesn't
+ // normally handle, so it calls UpdateAfterChange() and notifies observers of
+ // changes.
void InsertOrReplaceText(const base::string16& new_text);
// Returns the text that is currently selected. Call sites should take care to
@@ -329,6 +332,7 @@ class VIEWS_EXPORT Textfield : public View,
private:
friend class TextfieldTestApi;
+ FRIEND_TEST_ALL_PREFIXES(TextfieldTest, CursorBlinkRestartsOnInsertOrReplace);
msw 2016/10/07 17:16:38 Please plumb the call through TextfieldTestApi ins
Elly Fong-Jones 2016/10/07 17:25:57 Done.
// View overrides:
// Declared final since overriding by subclasses would interfere with the
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698