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) { |