DescriptionMacViews: Don't click views::Link on pressing Return key.
On Mac, the Return key is used to perform the default action associated with a
dialog even when a control is focused. Modify Link::OnKeyPressed and
Link::SkipDefaultKeyEventProcessing to respect the value of
PlatformStyle::kReturnClicksFocusedControl so that focused links are not clicked
on pressing Return. Instead on MacViews, Return is treated as an accelerator and
performs the default action.
BUG=607430
TEST=On Mac, enable chrome://flags/#secondary-ui-md. Open the Bookmark Bubble.
Enable Full Keyboard Access (Ctrl+F7). Ensure no user is signed onto Chromium.
Focus the "sign in to Chromium." link. Press Return key. Ensure the link is not
clicked. Instead, the default action is performed (associated with the Done
button).
Review-Url: https://codereview.chromium.org/2609943004
Cr-Commit-Position: refs/heads/master@{#441626}
Committed: https://chromium.googlesource.com/chromium/src/+/3da0435e15d762ba56ab91d08f3ccd63efedbeab
Patch Set 1 #Patch Set 2 : Rebase. #Patch Set 3 : Rebase. #
Total comments: 2
Patch Set 4 : Address review. #Messages
Total messages: 17 (12 generated)
|