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

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

Issue 10916222: Conservative update button/label/textfield content (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years, 3 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
« ui/views/controls/label.cc ('K') | « ui/views/controls/label.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 5ea98f4e55753894a27819e74975ebbf3e13ebfd..3833122196580e43b2540b26ff07451600bf4d11 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -149,9 +149,11 @@ void Textfield::SetTextInputType(ui::TextInputType type) {
}
void Textfield::SetText(const string16& text) {
- text_ = text;
- if (native_wrapper_)
- native_wrapper_->UpdateText();
+ if (text != text_) {
Daniel Erat 2012/09/11 20:53:37 and here
+ text_ = text;
+ if (native_wrapper_)
+ native_wrapper_->UpdateText();
+ }
}
void Textfield::AppendText(const string16& text) {
« ui/views/controls/label.cc ('K') | « ui/views/controls/label.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698