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

Issue 2650963002: MacViews: Select all text on right clicking an unfocused text view. (Closed)

Created:
3 years, 11 months ago by karandeepb
Modified:
3 years, 10 months ago
Reviewers:
msw, 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 all text on right clicking an unfocused text view. When an unfocused Cocoa text view is right clicked, all its text is selected. This CL implements this behavior on MacViews for views::Textfield and views::Label. A new variable kSelectAllOnRightClickWhenUnfocused is introduced to the PlatformStyle class to account for the platform specific differences. SelectionController::OnMousePressed is also modified to take the initial focus state of its client view as an argument. A test is also added to textfield_unittest.cc. BUG=676296 Review-Url: https://codereview.chromium.org/2650963002 Cr-Commit-Position: refs/heads/master@{#446588} Committed: https://chromium.googlesource.com/chromium/src/+/81dc16e8871f33d24d0e12b0020491ee6ca18399

Patch Set 1 #

Patch Set 2 : Fix tests #

Total comments: 4

Patch Set 3 : Rebase, #

Patch Set 4 : Nit #

Total comments: 2

Patch Set 5 : Nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -23 lines) Patch
M ui/views/controls/label.cc View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 1 chunk +7 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 chunks +16 lines, -3 lines 0 comments Download
M ui/views/selection_controller.h View 3 chunks +13 lines, -1 line 0 comments Download
M ui/views/selection_controller.cc View 3 chunks +22 lines, -13 lines 0 comments Download
M ui/views/style/platform_style.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/style/platform_style.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/style/platform_style_mac.mm View 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (15 generated)
karandeepb
PTAL Trent.
3 years, 11 months ago (2017-01-24 04:52:35 UTC) #7
karandeepb
Seems Trent missed this. msw@ can you review this, since tomorrow it's a holiday here.
3 years, 11 months ago (2017-01-25 06:45:04 UTC) #11
tapted
Sorry! lgtm - looks pretty good! But msw is a more specific OWNER (in ui/views/controls/textfield) ...
3 years, 11 months ago (2017-01-25 09:11:16 UTC) #13
karandeepb
Will wait for msw@ to take a look. https://codereview.chromium.org/2650963002/diff/20001/ui/views/controls/label.cc File ui/views/controls/label.cc (right): https://codereview.chromium.org/2650963002/diff/20001/ui/views/controls/label.cc#newcode512 ui/views/controls/label.cc:512: const ...
3 years, 11 months ago (2017-01-25 10:43:56 UTC) #15
msw
lgtm with a minor q; thanks! https://codereview.chromium.org/2650963002/diff/80001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2650963002/diff/80001/ui/views/controls/textfield/textfield.cc#newcode582 ui/views/controls/textfield/textfield.cc:582: RequestFocus(); q: should ...
3 years, 11 months ago (2017-01-25 19:23:54 UTC) #16
karandeepb
https://codereview.chromium.org/2650963002/diff/80001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2650963002/diff/80001/ui/views/controls/textfield/textfield.cc#newcode582 ui/views/controls/textfield/textfield.cc:582: RequestFocus(); On 2017/01/25 19:23:54, msw wrote: > q: should ...
3 years, 10 months ago (2017-01-27 02:29:37 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/2650963002/100001
3 years, 10 months ago (2017-01-27 02:30:37 UTC) #20
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 04:13:49 UTC) #23
Message was sent while issue was closed.
Committed patchset #5 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/81dc16e8871f33d24d0e12b00204...

Powered by Google App Engine
This is Rietveld 408576698