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

Unified Diff: ui/views/controls/combobox/combobox.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/button/md_text_button.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/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 3de636fbdc15b1add675be3c316968e7afca2c1f..5215c7c800c50a229b9d8c2c061bae7c97788ccc 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -95,6 +95,8 @@ class TransparentButton : public CustomButton {
TransparentButton(ButtonListener* listener)
: CustomButton(listener) {
SetAnimationDuration(LabelButton::kHoverAnimationDurationMs);
+ SetFocusable(false);
+ SetAccessibilityFocusable(false);
}
~TransparentButton() override {}
@@ -353,7 +355,7 @@ Combobox::Combobox(ui::ComboboxModel* model)
arrow_button_(new TransparentButton(this)),
weak_ptr_factory_(this) {
ModelChanged();
- SetFocusable(true);
+ PlatformStyle::ConfigureFocus(PlatformStyle::CONTROL::COMBOBOX, this);
UpdateBorder();
// set_background() takes ownership but takes a raw pointer.
scoped_ptr<Background> b = PlatformStyle::CreateComboboxBackground();
@@ -381,8 +383,6 @@ Combobox::Combobox(ui::ComboboxModel* model)
text_button_->SetVisible(true);
arrow_button_->SetVisible(true);
- text_button_->SetFocusable(false);
- arrow_button_->SetFocusable(false);
AddChildView(text_button_);
AddChildView(arrow_button_);
}
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698