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

Unified Diff: ui/views/controls/tree/tree_view.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Make patch smaller temporarily. Created 4 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
Index: ui/views/controls/tree/tree_view.cc
diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
index 30428a31cadc3a535e06d642f68697863664b61d..16c7692b178d88900929fa55d08029c02fe5bcaf 100644
--- a/ui/views/controls/tree/tree_view.cc
+++ b/ui/views/controls/tree/tree_view.cc
@@ -81,7 +81,9 @@ TreeView::TreeView()
controller_(NULL),
root_shown_(true),
row_height_(font_list_.GetHeight() + kTextVerticalPadding * 2) {
- SetFocusable(true);
+ // On Mac, only textfields and lists are focusable by default. Since TreeView
+ // represents a list, use ALWAYS instead of CONTROL focus behavior.
+ SetFocusBehavior(ALWAYS);
closed_icon_ = *ui::ResourceBundle::GetSharedInstance().GetImageNamed(
(base::i18n::IsRTL() ? IDR_FOLDER_CLOSED_RTL
: IDR_FOLDER_CLOSED)).ToImageSkia();

Powered by Google App Engine
This is Rietveld 408576698