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

Issue 951433002: MacViews: Handle Tab properly (Closed)

Created:
5 years, 10 months ago by tapted
Modified:
5 years, 10 months ago
Reviewers:
Andre, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@20150129-MacViews-Bringup5
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Handle Tab properly On Mac, interpreting a tab keypress into an action message calls [NSResponder insertTab]. [RenderWidgetHostViewCocoa doCommandBySelector:] has for a long time had a check that skips converting any action message whose selector starts with "insert" into an editing command, and just treats it as a regular keypress instead. This approach also works well for UI in MacViews, so do the same. Theoretically a user could remap a different key or key combination to the 'insertTab' action message, but that's unlikely. Updates TextfieldTest.FocusTraversalTest with cross-platform checks to test for this case. Also tested manually with views_examples. For the test to work with the approach in this CL, the event simulator needs to provide an answer for -[NSApplication currentEvent], so that's done too. BUG=454353 Committed: https://crrev.com/f8a2ca3720d41d2bf03b2e68f483d5edd28d8af6 Cr-Commit-Position: refs/heads/master@{#318172}

Patch Set 1 #

Patch Set 2 : add test #

Patch Set 3 : Still need insertTexT: #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -38 lines) Patch
M ui/views/cocoa/bridged_content_view.mm View 1 2 6 chunks +43 lines, -19 lines 1 comment Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download
M ui/views/test/event_generator_delegate_mac.mm View 7 chunks +50 lines, -19 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
tapted
Hi Andre, please take a look
5 years, 10 months ago (2015-02-24 06:40:15 UTC) #2
Andre
LGTM
5 years, 10 months ago (2015-02-24 16:57:58 UTC) #3
tapted
+sky for OWNERS in ui/views - PTAL
5 years, 10 months ago (2015-02-25 10:55:39 UTC) #5
sky
LGTM
5 years, 10 months ago (2015-02-25 17:01:02 UTC) #6
tapted
andre: ptal https://codereview.chromium.org/951433002/diff/40001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/951433002/diff/40001/ui/views/cocoa/bridged_content_view.mm#newcode359 ui/views/cocoa/bridged_content_view.mm:359: - (void)insertText:(id)text { Ah, my macviews trybot ...
5 years, 10 months ago (2015-02-26 00:46:34 UTC) #7
Andre
LGTM
5 years, 10 months ago (2015-02-26 00:56:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/951433002/40001
5 years, 10 months ago (2015-02-26 01:35:06 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 10 months ago (2015-02-26 01:44:21 UTC) #12
commit-bot: I haz the power
5 years, 10 months ago (2015-02-26 01:45:17 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f8a2ca3720d41d2bf03b2e68f483d5edd28d8af6
Cr-Commit-Position: refs/heads/master@{#318172}

Powered by Google App Engine
This is Rietveld 408576698