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

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

Issue 1018463004: Fix focus rectangle for label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GetFocusBounds Created 5 years, 9 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/gfx/render_text.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index 4ecbfe12f70b8700bfc13ef6a0d6e9c3d62bb8af..300b17dcf5f0d3b1ab7abe15fecbfdaa1a71c78d 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -150,6 +150,8 @@ class VIEWS_EXPORT Label : public View {
FRIEND_TEST_ALL_PREFIXES(LabelTest, ResetRenderTextData);
FRIEND_TEST_ALL_PREFIXES(LabelTest, MultilineSupportedRenderText);
FRIEND_TEST_ALL_PREFIXES(LabelTest, TextChangeWithoutLayout);
+ FRIEND_TEST_ALL_PREFIXES(LabelFocusTest, FocusBounds);
+ FRIEND_TEST_ALL_PREFIXES(LabelFocusTest, EmptyLabel);
void Init(const base::string16& text, const gfx::FontList& font_list);
@@ -165,6 +167,8 @@ class VIEWS_EXPORT Label : public View {
// Set up |lines_| to actually be painted.
void MaybeBuildRenderTextLines();
+ gfx::Rect GetFocusBounds();
+
// Get the text broken into lines as needed to fit the given |width|.
std::vector<base::string16> GetLinesForWidth(int width) const;
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698