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

Issue 73403002: Views Textfield: copy-on-select and paste-on-middle-click. (Closed)

Created:
7 years, 1 month ago by msw
Modified:
6 years, 11 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, James Su, Markus (顧孟勤), Peter Kasting, sky
Visibility:
Public.

Description

Views Textfield: copy-on-select and paste-on-middle-click. Add Textfield::PasteSelectionClipboard helper function. (used to paste on middle click, update cursor/selection) Add file-local UpdateSelectionClipboard helper function. (used to write non-empty text to the selection clipboard) Call UpdateAfterChange consistently after changes. (not just OnCaretBoundsChanged, SchedulePaint, etc.) Cleanup ExecuteCommand, OnMousePressed/Dragged, etc. Add TextfieldTest.SelectionClipboard unit tests. Make Get/SetClipboardText helpers file-local. BUG=319011 R=erg@chromium.org,oshima@chromium.org TEST=Copy-on-select and paste-on-middle-click work for Linux Aura omnibox and browser textfields (find-in-page, bookmark bubble). NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246478

Patch Set 1 #

Patch Set 2 : Views Textfield: copy-on-select and middle-click-paste. #

Patch Set 3 : Refine some nuanced behavior. #

Patch Set 4 : Fix middle clicking in the active selection. #

Patch Set 5 : Adding selection clipboard unit test. #

Patch Set 6 : Only select on mouse release. #

Patch Set 7 : Add UpdateSelectionClipboard; expand unit test; cleanup ExecuteCommand. #

Total comments: 8

Patch Set 8 : Make UpdateSelectionClipboard a Textfield member. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -136 lines) Patch
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -8 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 18 chunks +96 lines, -76 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 18 chunks +148 lines, -52 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Markus (顧孟勤)
We also need the inverse, don't we. I.e. any time text is selected anywhere, we ...
7 years, 1 month ago (2013-11-15 22:05:25 UTC) #1
msw
On 2013/11/15 22:05:25, Markus (顧孟勤) wrote: > We also need the inverse, don't we. I.e. ...
7 years, 1 month ago (2013-11-15 22:15:51 UTC) #2
msw
Okay! This is finally ready for review! Oshima and Elliot, please take a look; thanks!
6 years, 11 months ago (2014-01-22 02:13:18 UTC) #3
Elliot Glaysher
I've read through this patch twice. Functionally, it lgtm, but I'm not enough of an ...
6 years, 11 months ago (2014-01-22 20:07:46 UTC) #4
oshima
https://codereview.chromium.org/73403002/diff/320001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/73403002/diff/320001/ui/views/controls/textfield/textfield.cc#newcode57 ui/views/controls/textfield/textfield.cc:57: void UpdateSelectionClipboard(const base::string16& text) { do you need to ...
6 years, 11 months ago (2014-01-22 21:40:55 UTC) #5
msw
Comments addressed, please take another look at your earliest convenience. https://codereview.chromium.org/73403002/diff/320001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/73403002/diff/320001/ui/views/controls/textfield/textfield.cc#newcode57 ...
6 years, 11 months ago (2014-01-22 23:15:35 UTC) #6
oshima
lgtm
6 years, 11 months ago (2014-01-22 23:21:52 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/73403002/420001
6 years, 11 months ago (2014-01-22 23:22:24 UTC) #8
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 11 months ago (2014-01-23 01:35:52 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/73403002/420001
6 years, 11 months ago (2014-01-23 01:36:57 UTC) #10
commit-bot: I haz the power
6 years, 11 months ago (2014-01-23 01:40:44 UTC) #11
Message was sent while issue was closed.
Change committed as 246478

Powered by Google App Engine
This is Rietveld 408576698