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

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

Issue 10916222: Conservative update button/label/textfield content (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Nit fixes.wq 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
« no previous file with comments | « ui/views/controls/button/text_button.cc ('k') | 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/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index caa5c668558d38f133a01e8ff1b85d3347a4c908..73e65b81fc8eaa8c232beb541e49e2b791e12fc5 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -54,6 +54,8 @@ void Label::SetFont(const gfx::Font& font) {
}
void Label::SetText(const string16& text) {
+ if (text == text_)
+ return;
text_ = text;
text_size_valid_ = false;
is_email_ = false;
« no previous file with comments | « ui/views/controls/button/text_button.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698