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

Issue 2368283002: views: add focus to TabbedPane (Closed)

Created:
4 years, 2 months ago by Elly Fong-Jones
Modified:
4 years, 2 months ago
Reviewers:
dmazzoni, sky, Evan Stade
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views: add focus to TabbedPane This change: 1) Makes TabbedPane draw a focus ring on the selected tab when the containing TabbedPane has focus; 2) Adds bindings for left/right arrow keys to switch between tabs BUG=635176 Committed: https://crrev.com/5974cb6cb046616fdbff93b96cdbdcf9bb5e297e Cr-Commit-Position: refs/heads/master@{#423961}

Patch Set 1 #

Total comments: 10

Patch Set 2 : don't pass color arg #

Patch Set 3 : make Tab focusable #

Total comments: 5

Patch Set 4 : DomKey -> KeyboardCode #

Total comments: 9

Patch Set 5 : remove OnContainerFocusChanged #

Total comments: 10

Patch Set 6 : factor out part of OnStateChanged #

Patch Set 7 : move insets #

Total comments: 2

Patch Set 8 : remove MdTabFocusRingBorder #

Total comments: 6

Patch Set 9 : rework focus tests a bit #

Total comments: 2

Patch Set 10 : 2 -> 2.f #

Total comments: 11

Patch Set 11 : sed tr sed #

Total comments: 8

Patch Set 12 : rename some stuff, move Tab class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+460 lines, -308 lines) Patch
M ui/views/controls/tabbed_pane/tabbed_pane.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +71 lines, -4 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane.cc View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +102 lines, -91 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +38 lines, -4 lines 0 comments Download
M ui/views/focus/focus_traversal_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +249 lines, -209 lines 0 comments Download

Messages

Total messages: 39 (8 generated)
Elly Fong-Jones
estade: ptal? :)
4 years, 2 months ago (2016-09-26 13:38:13 UTC) #3
Evan Stade
+dmazzoni for a11y angle https://codereview.chromium.org/2368283002/diff/1/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/1/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode63 ui/views/controls/tabbed_pane/tabbed_pane.cc:63: // This is a bit ...
4 years, 2 months ago (2016-09-26 16:28:36 UTC) #5
Elly Fong-Jones
estade, dmazzoni: ptal? estade: I'm still on the fence about making the Tab focusable. I'll ...
4 years, 2 months ago (2016-09-26 17:48:36 UTC) #6
dmazzoni
It might be slightly easier to code if the tab has focus instead of the ...
4 years, 2 months ago (2016-09-26 17:58:06 UTC) #7
Elly Fong-Jones
On 2016/09/26 17:58:06, dmazzoni wrote: > It might be slightly easier to code if the ...
4 years, 2 months ago (2016-09-27 14:48:50 UTC) #8
dmazzoni
On 2016/09/27 at 14:48:50, ellyjones wrote: > Okay, I've changed this to give focus to ...
4 years, 2 months ago (2016-09-27 15:31:33 UTC) #9
dmazzoni
lg for accessibility, I'll leave it to Evan to review
4 years, 2 months ago (2016-09-27 15:33:07 UTC) #10
Evan Stade
https://codereview.chromium.org/2368283002/diff/40001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/40001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode515 ui/views/controls/tabbed_pane/tabbed_pane.cc:515: bool give_focus = false; I'm a bit confused here. ...
4 years, 2 months ago (2016-09-27 17:19:56 UTC) #11
dmazzoni
https://codereview.chromium.org/2368283002/diff/40001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/40001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode515 ui/views/controls/tabbed_pane/tabbed_pane.cc:515: bool give_focus = false; On 2016/09/27 17:19:55, Evan Stade ...
4 years, 2 months ago (2016-09-27 17:47:00 UTC) #12
Elly Fong-Jones
estade: ptal? :) dmazzoni: do you have any a11y concerns now that the tab is ...
4 years, 2 months ago (2016-09-28 17:21:37 UTC) #13
Evan Stade
https://codereview.chromium.org/2368283002/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode66 ui/views/controls/tabbed_pane/tabbed_pane.cc:66: void OnContainerFocusChanged(); this doesn't seem necessary any more? At ...
4 years, 2 months ago (2016-09-28 17:32:32 UTC) #14
Elly Fong-Jones
estade: ptal? :) https://codereview.chromium.org/2368283002/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode66 ui/views/controls/tabbed_pane/tabbed_pane.cc:66: void OnContainerFocusChanged(); On 2016/09/28 17:32:32, Evan ...
4 years, 2 months ago (2016-09-28 18:01:02 UTC) #15
Evan Stade
https://codereview.chromium.org/2368283002/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/60001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode572 ui/views/controls/tabbed_pane/tabbed_pane.cc:572: next_selected_index += tab_count; On 2016/09/28 18:01:01, Elly Fong-Jones wrote: ...
4 years, 2 months ago (2016-09-28 21:25:55 UTC) #16
dmazzoni
On Wed, Sep 28, 2016 at 10:21 AM <ellyjones@chromium.org> wrote: > estade: ptal? :) > ...
4 years, 2 months ago (2016-09-28 21:27:27 UTC) #17
Elly Fong-Jones
estade: ptal? :) https://codereview.chromium.org/2368283002/diff/80001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/80001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode181 ui/views/controls/tabbed_pane/tabbed_pane.cc:181: SetFocusBehavior(selected ? FocusBehavior::ALWAYS : FocusBehavior::NEVER); On ...
4 years, 2 months ago (2016-09-30 11:54:07 UTC) #18
Evan Stade
https://codereview.chromium.org/2368283002/diff/80001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/80001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode181 ui/views/controls/tabbed_pane/tabbed_pane.cc:181: SetFocusBehavior(selected ? FocusBehavior::ALWAYS : FocusBehavior::NEVER); On 2016/09/30 11:54:07, Elly ...
4 years, 2 months ago (2016-09-30 17:24:42 UTC) #19
Elly Fong-Jones
On 2016/09/30 17:24:42, Evan Stade wrote: > https://codereview.chromium.org/2368283002/diff/80001/ui/views/controls/tabbed_pane/tabbed_pane.cc > File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): > > https://codereview.chromium.org/2368283002/diff/80001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode181 ...
4 years, 2 months ago (2016-10-03 13:57:35 UTC) #20
Elly Fong-Jones
estade, sky: ptal? :) https://codereview.chromium.org/2368283002/diff/120001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/120001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode287 ui/views/controls/tabbed_pane/tabbed_pane.cc:287: MdTabFocusRingBorder(MdTab* tab); On 2016/09/30 17:24:41, ...
4 years, 2 months ago (2016-10-03 13:59:49 UTC) #21
Evan Stade
https://codereview.chromium.org/2368283002/diff/140001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/140001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode337 ui/views/controls/tabbed_pane/tabbed_pane.cc:337: bounds.Inset(kBorderStrokeWidth / 2, kBorderStrokeWidth / 2); nit: can be ...
4 years, 2 months ago (2016-10-03 19:15:16 UTC) #22
Elly Fong-Jones
estade, sky: ptal? :) https://codereview.chromium.org/2368283002/diff/140001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/140001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode337 ui/views/controls/tabbed_pane/tabbed_pane.cc:337: bounds.Inset(kBorderStrokeWidth / 2, kBorderStrokeWidth / ...
4 years, 2 months ago (2016-10-04 18:04:40 UTC) #23
Evan Stade
lgtm https://codereview.chromium.org/2368283002/diff/160001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/160001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode336 ui/views/controls/tabbed_pane/tabbed_pane.cc:336: bounds.Inset(gfx::Insets(kBorderStrokeWidth / 2)); nit: gfx::InsetsF, and s/2/2.f/
4 years, 2 months ago (2016-10-04 21:12:10 UTC) #24
Elly Fong-Jones
sky: ptal? :) https://codereview.chromium.org/2368283002/diff/160001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/160001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode336 ui/views/controls/tabbed_pane/tabbed_pane.cc:336: bounds.Inset(gfx::Insets(kBorderStrokeWidth / 2)); On 2016/10/04 21:12:10, ...
4 years, 2 months ago (2016-10-05 12:40:53 UTC) #26
sky
https://codereview.chromium.org/2368283002/diff/180001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/180001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode276 ui/views/controls/tabbed_pane/tabbed_pane.cc:276: contents()->NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); How come we only call NotifyAccessibilityEvent() in ...
4 years, 2 months ago (2016-10-05 20:00:23 UTC) #27
Elly Fong-Jones
sky: ptal? :) https://codereview.chromium.org/2368283002/diff/180001/ui/views/controls/tabbed_pane/tabbed_pane.cc File ui/views/controls/tabbed_pane/tabbed_pane.cc (right): https://codereview.chromium.org/2368283002/diff/180001/ui/views/controls/tabbed_pane/tabbed_pane.cc#newcode276 ui/views/controls/tabbed_pane/tabbed_pane.cc:276: contents()->NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, true); On 2016/10/05 20:00:22, sky ...
4 years, 2 months ago (2016-10-06 16:15:30 UTC) #28
sky
https://codereview.chromium.org/2368283002/diff/180001/ui/views/focus/focus_traversal_unittest.cc File ui/views/focus/focus_traversal_unittest.cc (right): https://codereview.chromium.org/2368283002/diff/180001/ui/views/focus/focus_traversal_unittest.cc#newcode36 ui/views/focus/focus_traversal_unittest.cc:36: enum { On 2016/10/06 16:15:30, Elly Fong-Jones wrote: > ...
4 years, 2 months ago (2016-10-06 21:14:41 UTC) #29
Evan Stade
naming nits :) https://codereview.chromium.org/2368283002/diff/200001/ui/views/focus/focus_traversal_unittest.cc File ui/views/focus/focus_traversal_unittest.cc (right): https://codereview.chromium.org/2368283002/diff/200001/ui/views/focus/focus_traversal_unittest.cc#newcode71 ui/views/focus/focus_traversal_unittest.cc:71: O_K_BUTTON_ID, heh^ https://codereview.chromium.org/2368283002/diff/200001/ui/views/focus/focus_traversal_unittest.cc#newcode77 ui/views/focus/focus_traversal_unittest.cc:77: ITALIC_CHECK_BOX_ID, s/CHECK_BOX/CHECKBOX ...
4 years, 2 months ago (2016-10-06 21:18:45 UTC) #30
Elly Fong-Jones
sky: ptal? :) https://codereview.chromium.org/2368283002/diff/200001/ui/views/controls/tabbed_pane/tabbed_pane.h File ui/views/controls/tabbed_pane/tabbed_pane.h (right): https://codereview.chromium.org/2368283002/diff/200001/ui/views/controls/tabbed_pane/tabbed_pane.h#newcode71 ui/views/controls/tabbed_pane/tabbed_pane.h:71: View* GetSelectedTabContentView(); On 2016/10/06 21:14:40, sky ...
4 years, 2 months ago (2016-10-07 17:18:24 UTC) #31
sky
LGTM
4 years, 2 months ago (2016-10-07 19:53:06 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2368283002/220001
4 years, 2 months ago (2016-10-07 20:13:22 UTC) #35
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 2 months ago (2016-10-07 20:58:43 UTC) #37
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 21:00:08 UTC) #39
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/5974cb6cb046616fdbff93b96cdbdcf9bb5e297e
Cr-Commit-Position: refs/heads/master@{#423961}

Powered by Google App Engine
This is Rietveld 408576698