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

Issue 1973073003: Views: Change View::RequestFocus to respect keyboard accessibility. (Closed)

Created:
4 years, 7 months ago by karandeepb
Modified:
4 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Views: Change View::RequestFocus to respect keyboard accessibility. This CL fixes some regressions introduced in http://crrev.com/1894383002/. These regression are caused due to the change in View::RequestFocus() from IsFocusable() to IsAccessibilityFocusable(). On a mouse click on a CustomButton, CustomButton::MousePressed() requests focus on the button, if it has request_focus_on_press_ set to true. It turns out that most button subclasses, do not explicitly set request_focus_on_press_ to false, which has a default value of true. These custom buttons which are accessibility focusable, can now gain focus on a mouse press, hence the bug. This CL changes View::RequestFocus to use IsFocusable when keyboard accessibility is off (i.e on Non-Mac platforms), hence fixing bugs 609701, 610186, 610235, 610740, 610802, 610664. This is how View::RequestFocus behaved before crrev.com/1894383002 on Non-Mac platforms. Also, on Mac, since View::RequestFocus now respects keyboard accessibility, bug 611280 is also fixed. BUG=609701, 610186, 610235, 610740, 610802, 610664, 564912, 611280 Committed: https://crrev.com/8c6b2ee186d786623f0e4cb6d05c08c934c0ff9b Cr-Commit-Position: refs/heads/master@{#393781}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Add test for TabCloseButton. #

Patch Set 4 : Add RequestFocus test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -12 lines) Patch
M chrome/browser/ui/views/tabs/tab_unittest.cc View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M ui/views/focus/focus_manager.cc View 1 2 1 chunk +17 lines, -10 lines 1 comment Download
M ui/views/focus/focus_manager_unittest.cc View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (8 generated)
karandeepb
PTAL sky@. I also had another CL https://codereview.chromium.org/1963563002/ which fixed these bugs, but this is ...
4 years, 7 months ago (2016-05-13 09:05:32 UTC) #4
sky
LGTM
4 years, 7 months ago (2016-05-13 15:52:58 UTC) #5
sky
I'm ok with changing the default of request_focus_on_press.
4 years, 7 months ago (2016-05-13 15:54:29 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1973073003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1973073003/60001
4 years, 7 months ago (2016-05-15 23:59:15 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1973073003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1973073003/60001
4 years, 7 months ago (2016-05-16 00:05:54 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-16 01:14:56 UTC) #13
commit-bot: I haz the power
4 years, 7 months ago (2016-05-16 01:16:36 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8c6b2ee186d786623f0e4cb6d05c08c934c0ff9b
Cr-Commit-Position: refs/heads/master@{#393781}

Powered by Google App Engine
This is Rietveld 408576698