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

Issue 923903002: MacViews: Merge single-character edits, map (and validate) undo and redo (Closed)

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

Description

MacViews: Merge single-character edits, map (and validate) undo and redo Undo and redo are mapped in a similar way to cut/copy/paste on Mac, via the mainMenu's performKeyEquivalent, and the Cocoa responder chain. This CL adds responders for undo: and redo: Single-character editing commands were not being merged into a single edit. For example, typing {'c', 'a', 't', Cmd+Z} would only undo the 't' not the entire 'cat'. This CL fixes by detecting single-character inserts in response to a keyDown event. Then, for "redo", some of the textfield unittests would send both Ctrl+Y and Ctrl+Shift+Z. Cmd+Y for undo isn't supported on Mac (it's mapped to History -> Show Full History). So a wrapper is added that just sends Cmd+Shfit+Z again. Gets the following tests passing: TextfieldTest.DragAndDrop_ToTheLeft TextfieldTest.DragAndDrop_ToTheRight TextfieldTest.UndoRedoTest BUG=454353 Committed: https://crrev.com/3d9bea97122781eb552b491ec69065802263dd40 Cr-Commit-Position: refs/heads/master@{#316992}

Patch Set 1 #

Patch Set 2 : Remove NSLog, as handy as that is.. #

Patch Set 3 : rebase for r316774 (remove "ing" from "Editing") #

Total comments: 4

Patch Set 4 : prefer Ctrl+Shift+Z #

Total comments: 4

Patch Set 5 : no boolses #

Patch Set 6 : selfnit unnecessary newlines #

Patch Set 7 : ugh. left the MAYBE_ on #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -20 lines) Patch
M ui/views/cocoa/bridged_content_view.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 5 chunks +40 lines, -1 line 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 8 chunks +41 lines, -19 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
tapted
Hi Andre, please take a look
5 years, 10 months ago (2015-02-13 08:54:35 UTC) #2
Andre
LGTM
5 years, 10 months ago (2015-02-13 18:32:03 UTC) #3
tapted
+msw for textfield_unittest.cc OWNERS - please take a look
5 years, 10 months ago (2015-02-18 08:14:16 UTC) #5
msw
lgtm with nits. https://codereview.chromium.org/923903002/diff/40001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/923903002/diff/40001/ui/views/cocoa/bridged_content_view.mm#newcode601 ui/views/cocoa/bridged_content_view.mm:601: // alternate characters (e.g. Alt+S is ...
5 years, 10 months ago (2015-02-18 19:10:42 UTC) #7
msw
https://codereview.chromium.org/923903002/diff/60001/ui/views/controls/textfield/textfield_unittest.cc File ui/views/controls/textfield/textfield_unittest.cc (right): https://codereview.chromium.org/923903002/diff/60001/ui/views/controls/textfield/textfield_unittest.cc#newcode1072 ui/views/controls/textfield/textfield_unittest.cc:1072: bool shift = false; nit: I vastly prefer inline ...
5 years, 10 months ago (2015-02-19 02:56:22 UTC) #9
tapted
Thanks! And yeah - I wasn't so sure about the bools after looking at them ...
5 years, 10 months ago (2015-02-19 03:19:10 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/923903002/120001
5 years, 10 months ago (2015-02-19 05:05:06 UTC) #12
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 10 months ago (2015-02-19 05:08:01 UTC) #13
commit-bot: I haz the power
5 years, 10 months ago (2015-02-19 05:08:31 UTC) #14
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/3d9bea97122781eb552b491ec69065802263dd40
Cr-Commit-Position: refs/heads/master@{#316992}

Powered by Google App Engine
This is Rietveld 408576698