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

Unified Diff: ui/views/controls/button/label_button.h

Issue 14646037: Enable the new dialog style by default; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LabelButton preferred size calculations; stack overflow for STYLE_BUTTON. Created 7 years, 7 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
Index: ui/views/controls/button/label_button.h
diff --git a/ui/views/controls/button/label_button.h b/ui/views/controls/button/label_button.h
index b96c7854de60267627dded24aee36ae42f83620f..38417672e63aafba6973f6964057e11edd380b27 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -114,6 +114,9 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// |max_size_| may be set to clamp the preferred size.
gfx::Size max_size_;
+ // A cached preferred size; used to avoid costly text size calculations.
+ gfx::Size cached_size_;
+
// Flag indicating default handling of the return key via an accelerator.
// Whether or not the button appears or behaves as the default button in its
// current context;

Powered by Google App Engine
This is Rietveld 408576698