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

Issue 2580293003: MacViews: Select word under cursor on right click. (Closed)

Created:
4 years ago by karandeepb
Modified:
4 years ago
Reviewers:
tapted
CC:
chromium-reviews, yusukes+watch_chromium.org, tfarina, shuchen+watch_chromium.org, nona+watch_chromium.org, mac-reviews_chromium.org, James Su, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Select word under cursor on right click. This CL modifies SelectionController::OnMousePressed to ensure right clicking outside the current selection, selects the word under the cursor on Mac. A new constant PlatformStyle::kSelectWordOnRightClick is introduced to facilitate this. BUG=657556 TEST= On Mac, enable chrome://flags/#secondary-ui-md. Open Bookmark Bubble. Enter some text in the name textfield. Ensure the word under the cursor is selected on a right click outside the current selection. Committed: https://crrev.com/e9f75eab14f8845b5f23d0d50286191454f9f90d Cr-Commit-Position: refs/heads/master@{#440373}

Patch Set 1 : -- #

Total comments: 10

Patch Set 2 : Address comments. #

Patch Set 3 : Add TODO #

Total comments: 2

Patch Set 4 : Reorder function. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -18 lines) Patch
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 chunks +40 lines, -14 lines 0 comments Download
M ui/views/selection_controller.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/selection_controller.cc View 1 2 3 3 chunks +19 lines, -4 lines 0 comments Download
M ui/views/style/platform_style.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/style/platform_style.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/style/platform_style_mac.mm View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (14 generated)
karandeepb
PTAL Trent. Another Mac specific behavior I observed is that right clicking on an unfocused ...
4 years ago (2016-12-19 06:10:39 UTC) #8
tapted
https://codereview.chromium.org/2580293003/diff/20001/ui/views/controls/textfield/textfield_unittest.cc File ui/views/controls/textfield/textfield_unittest.cc (right): https://codereview.chromium.org/2580293003/diff/20001/ui/views/controls/textfield/textfield_unittest.cc#newcode657 ui/views/controls/textfield/textfield_unittest.cc:657: void PressMouseButton(int mouse_button_flags, int extra_flags) { int -> ui::EventFlags ...
4 years ago (2016-12-19 06:49:16 UTC) #9
karandeepb
PTAL Trent. https://codereview.chromium.org/2580293003/diff/20001/ui/views/controls/textfield/textfield_unittest.cc File ui/views/controls/textfield/textfield_unittest.cc (right): https://codereview.chromium.org/2580293003/diff/20001/ui/views/controls/textfield/textfield_unittest.cc#newcode657 ui/views/controls/textfield/textfield_unittest.cc:657: void PressMouseButton(int mouse_button_flags, int extra_flags) { On ...
4 years ago (2016-12-19 07:05:43 UTC) #12
tapted
https://codereview.chromium.org/2580293003/diff/20001/ui/views/selection_controller.cc File ui/views/selection_controller.cc (right): https://codereview.chromium.org/2580293003/diff/20001/ui/views/selection_controller.cc#newcode78 ui/views/selection_controller.cc:78: SelectWord(event.location()); On 2016/12/19 07:05:43, karandeepb wrote: > On 2016/12/19 ...
4 years ago (2016-12-20 00:12:42 UTC) #13
karandeepb
PTAL Trent. https://codereview.chromium.org/2580293003/diff/20001/ui/views/selection_controller.cc File ui/views/selection_controller.cc (right): https://codereview.chromium.org/2580293003/diff/20001/ui/views/selection_controller.cc#newcode78 ui/views/selection_controller.cc:78: SelectWord(event.location()); On 2016/12/20 00:12:42, tapted wrote: > ...
4 years ago (2016-12-21 14:20:03 UTC) #14
tapted
lgtm
4 years ago (2016-12-21 23:00:27 UTC) #15
tapted
still lgtm but one more nit (sorry) then I think this is good to land. ...
4 years ago (2016-12-22 05:34:47 UTC) #16
karandeepb
https://codereview.chromium.org/2580293003/diff/60001/ui/views/selection_controller.cc File ui/views/selection_controller.cc (right): https://codereview.chromium.org/2580293003/diff/60001/ui/views/selection_controller.cc#newcode101 ui/views/selection_controller.cc:101: void SelectionController::SelectWord(const gfx::Point& point) { On 2016/12/22 05:34:46, tapted ...
4 years ago (2016-12-22 08:51:25 UTC) #17
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/2580293003/80001
4 years ago (2016-12-22 08:51:43 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years ago (2016-12-22 09:47:04 UTC) #23
commit-bot: I haz the power
4 years ago (2016-12-22 09:50:33 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e9f75eab14f8845b5f23d0d50286191454f9f90d
Cr-Commit-Position: refs/heads/master@{#440373}

Powered by Google App Engine
This is Rietveld 408576698