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

Issue 2119813002: views::Textfield: Implement yank editing command. (Closed)

Created:
4 years, 5 months ago by karandeepb
Modified:
4 years, 4 months ago
Reviewers:
tapted, sky, msw
CC:
chromium-reviews, extensions-reviews_chromium.org, yusukes+watch_chromium.org, tfarina, shuchen+watch_chromium.org, nona+watch_chromium.org, chromium-apps-reviews_chromium.org, James Su, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views::Textfield: Implement yank editing command. Like Emacs, textfields in Cocoa have a notion of a kill buffer. Certain deletion commands (delete to beginning/end of line/paragraph) add the deleted text to the kill buffer. All textfields in an application share the same kill buffer. This is distinct from the system clipboard. Executing yank pastes the text in the kill buffer at the insertion point or selection. This CL implements the yank editing command for views::Textfield. It only has a key binding defined on MacViews. BUG=586985 TEST=Enable MacViews. Give focus to a MacViews textfield. Enter some text. Press Ctrl+K to delete to end of paragraph. Verify pressing Ctrl+Y pastes the deleted text. Committed: https://crrev.com/7fff7c5c481c9a85495cef39be0b475dbde91da0 Cr-Commit-Position: refs/heads/master@{#407722}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add a comment. #

Total comments: 1

Patch Set 3 : Rebase. #

Patch Set 4 #

Total comments: 12

Patch Set 5 : Rebase. #

Patch Set 6 : Address review comments. #

Total comments: 12

Patch Set 7 : Rebase. #

Patch Set 8 : Address review. #

Total comments: 3

Patch Set 9 : Address review comments. #

Total comments: 20

Patch Set 10 : Address review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -31 lines) Patch
M ui/base/ime/linux/text_edit_command_auralinux.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M ui/base/ime/text_edit_commands.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget_unittest.mm View 1 2 3 4 5 6 7 8 9 9 chunks +41 lines, -1 line 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 4 chunks +26 lines, -18 lines 0 comments Download
M ui/views/controls/textfield/textfield_model.h View 1 2 3 4 5 6 7 8 9 5 chunks +20 lines, -4 lines 0 comments Download
M ui/views/controls/textfield/textfield_model.cc View 1 2 3 4 5 6 7 8 9 6 chunks +49 lines, -6 lines 0 comments Download
M ui/views/controls/textfield/textfield_model_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +56 lines, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +56 lines, -2 lines 0 comments Download

Messages

Total messages: 48 (28 generated)
karandeepb
PTAL Trent. https://codereview.chromium.org/2119813002/diff/20001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/2119813002/diff/20001/ui/views/cocoa/bridged_content_view.mm#newcode1034 ui/views/cocoa/bridged_content_view.mm:1034: keyCode:ui::VKEY_Y Again is it ok to give ...
4 years, 5 months ago (2016-07-01 05:49:16 UTC) #4
tapted
https://codereview.chromium.org/2119813002/diff/100001/ui/views/cocoa/bridged_native_widget_unittest.mm File ui/views/cocoa/bridged_native_widget_unittest.mm (right): https://codereview.chromium.org/2119813002/diff/100001/ui/views/cocoa/bridged_native_widget_unittest.mm#newcode914 ui/views/cocoa/bridged_native_widget_unittest.mm:914: EXPECT_NSEQ_3(nil, GetExpectedText(), GetActualText()); I think this will be flaky ...
4 years, 5 months ago (2016-07-06 01:46:38 UTC) #6
karandeepb
PTAL Trent. Thanks. https://codereview.chromium.org/2119813002/diff/100001/ui/views/cocoa/bridged_native_widget_unittest.mm File ui/views/cocoa/bridged_native_widget_unittest.mm (right): https://codereview.chromium.org/2119813002/diff/100001/ui/views/cocoa/bridged_native_widget_unittest.mm#newcode914 ui/views/cocoa/bridged_native_widget_unittest.mm:914: EXPECT_NSEQ_3(nil, GetExpectedText(), GetActualText()); On 2016/07/06 01:46:37, ...
4 years, 5 months ago (2016-07-19 07:04:40 UTC) #11
tapted
lgtm % nits https://codereview.chromium.org/2119813002/diff/170001/ui/views/controls/textfield/textfield_model.cc File ui/views/controls/textfield/textfield_model.cc (right): https://codereview.chromium.org/2119813002/diff/170001/ui/views/controls/textfield/textfield_model.cc#newcode274 ui/views/controls/textfield/textfield_model.cc:274: if(ViewsDelegate::GetInstance()) nit: space after `if` https://codereview.chromium.org/2119813002/diff/170001/ui/views/controls/textfield/textfield_model.cc#newcode582 ...
4 years, 5 months ago (2016-07-20 06:32:22 UTC) #12
karandeepb
https://codereview.chromium.org/2119813002/diff/170001/ui/views/controls/textfield/textfield_model.cc File ui/views/controls/textfield/textfield_model.cc (right): https://codereview.chromium.org/2119813002/diff/170001/ui/views/controls/textfield/textfield_model.cc#newcode274 ui/views/controls/textfield/textfield_model.cc:274: if(ViewsDelegate::GetInstance()) On 2016/07/20 06:32:21, tapted wrote: > nit: space ...
4 years, 5 months ago (2016-07-20 07:51:30 UTC) #14
karandeepb
+msw for ui/views/controls/textfield review. +sky for ui/views/views_delegate.h and ui/base review.
4 years, 5 months ago (2016-07-20 07:55:59 UTC) #18
sky
https://codereview.chromium.org/2119813002/diff/230001/ui/views/views_delegate.h File ui/views/views_delegate.h (right): https://codereview.chromium.org/2119813002/diff/230001/ui/views/views_delegate.h#newcode106 ui/views/views_delegate.h:106: void set_kill_buffer(const base::string16& kill_buffer) { Is there a reason ...
4 years, 5 months ago (2016-07-20 15:45:57 UTC) #21
karandeepb
PTAL sky@. https://codereview.chromium.org/2119813002/diff/230001/ui/views/views_delegate.h File ui/views/views_delegate.h (right): https://codereview.chromium.org/2119813002/diff/230001/ui/views/views_delegate.h#newcode106 ui/views/views_delegate.h:106: void set_kill_buffer(const base::string16& kill_buffer) { On 2016/07/20 ...
4 years, 5 months ago (2016-07-21 00:44:58 UTC) #22
tapted
https://codereview.chromium.org/2119813002/diff/230001/ui/views/views_delegate.h File ui/views/views_delegate.h (right): https://codereview.chromium.org/2119813002/diff/230001/ui/views/views_delegate.h#newcode106 ui/views/views_delegate.h:106: void set_kill_buffer(const base::string16& kill_buffer) { On 2016/07/21 00:44:58, karandeepb ...
4 years, 5 months ago (2016-07-21 01:08:23 UTC) #23
sky
On Wed, Jul 20, 2016 at 5:44 PM, <karandeepb@chromium.org> wrote: > PTAL sky@. > > ...
4 years, 5 months ago (2016-07-21 15:16:42 UTC) #24
karandeepb
> Views isn't really thread safe at the moment, so the static is fine, > ...
4 years, 5 months ago (2016-07-22 09:53:49 UTC) #31
sky
https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.cc File ui/views/controls/textfield/textfield_model.cc (right): https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.cc#newcode273 ui/views/controls/textfield/textfield_model.cc:273: base::string16& GetKillBuffer() { return a pointer (references are generally ...
4 years, 5 months ago (2016-07-22 15:22:49 UTC) #32
msw
https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield.cc#newcode1557 ui/views/controls/textfield/textfield.cc:1557: add_to_kill_buffer = true; Should this still be true if ...
4 years, 5 months ago (2016-07-22 17:44:03 UTC) #33
karandeepb
PTAL msw@ and sky@. Thanks. https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield.cc#newcode1557 ui/views/controls/textfield/textfield.cc:1557: add_to_kill_buffer = true; On ...
4 years, 5 months ago (2016-07-25 06:38:11 UTC) #38
sky
LGTM https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.h File ui/views/controls/textfield/textfield_model.h (right): https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.h#newcode233 ui/views/controls/textfield/textfield_model.h:233: static void ClearKillBufferForTesting(); On 2016/07/25 06:38:11, karandeepb wrote: ...
4 years, 4 months ago (2016-07-25 15:26:28 UTC) #39
msw
lgtm https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.cc File ui/views/controls/textfield/textfield_model.cc (right): https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.cc#newcode590 ui/views/controls/textfield/textfield_model.cc:590: if (!kill_buffer.empty() || HasSelection()) { On 2016/07/25 06:38:11, ...
4 years, 4 months ago (2016-07-25 18:35:49 UTC) #40
karandeepb
https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.cc File ui/views/controls/textfield/textfield_model.cc (right): https://codereview.chromium.org/2119813002/diff/290001/ui/views/controls/textfield/textfield_model.cc#newcode590 ui/views/controls/textfield/textfield_model.cc:590: if (!kill_buffer.empty() || HasSelection()) { On 2016/07/25 18:35:49, msw ...
4 years, 4 months ago (2016-07-26 03:45:41 UTC) #41
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/2119813002/310001
4 years, 4 months ago (2016-07-26 03:46:07 UTC) #44
commit-bot: I haz the power
Committed patchset #10 (id:310001)
4 years, 4 months ago (2016-07-26 06:20:55 UTC) #46
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 06:22:08 UTC) #48
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/7fff7c5c481c9a85495cef39be0b475dbde91da0
Cr-Commit-Position: refs/heads/master@{#407722}

Powered by Google App Engine
This is Rietveld 408576698