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

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

Issue 1870573003: Full Keyboard Access: Second Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/combobox/combobox.cc ('k') | ui/views/controls/link.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 d1a6cafa9c1da072b6de2c4f3842769d92318266..8441a7f3353a56f9df89207987bb565b1a2c85a2 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -213,6 +213,8 @@ base::string16 Label::GetDisplayTextForTesting() {
gfx::Insets Label::GetInsets() const {
gfx::Insets insets = View::GetInsets();
+ // TODO(karandeepb): This won't work for Mac where labels are not focusable
+ // but accessibility focusable. Fix this.
if (focusable()) {
insets += gfx::Insets(kFocusBorderPadding, kFocusBorderPadding,
kFocusBorderPadding, kFocusBorderPadding);
@@ -435,6 +437,8 @@ void Label::MaybeBuildRenderTextLines() {
return;
gfx::Rect rect = GetContentsBounds();
+ // TODO(karandeepb): This won't work for Mac where labels are not focusable
+ // but accessibility focusable. Fix this.
if (focusable())
rect.Inset(kFocusBorderPadding, kFocusBorderPadding);
if (rect.IsEmpty())
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/link.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698