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

Issue 2180873002: MacViews: Change insertTextInternal to correctly handle IME character input. (Closed)

Created:
4 years, 5 months ago by karandeepb
Modified:
4 years, 4 months ago
Reviewers:
tapted
CC:
chromium-reviews, tfarina, 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

MacViews: Change insertTextInternal to correctly handle IME character input. This CL fixes a regression caused in r400918 which modified the insertText handlers to use the current key down event instead of the passed |text| argument for character text insertion. While this works correctly for regular text, this is not correct for text inserted using an IME. This is because when the current composition text is confirmed, say by pressing the Return key, |keyDownEvent_| will correspond to the return key press event. Hence [keyDownEvent_ characters] will not contain the text to be inserted. This CL corrects the insertTextInternal function to use |text| instead of |keyDownEvent_| to generate the synthetic ui::KeyEvent for character insertion, hence fixing the bug. BUG=630980 Committed: https://crrev.com/f955be13bc49601dc963dcc7e2182ef792b600f9 Cr-Commit-Position: refs/heads/master@{#408374}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Update comment and add test. #

Patch Set 3 : Fix compile. #

Total comments: 1

Patch Set 4 : Fix compile. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -5 lines) Patch
M ui/views/cocoa/bridged_content_view.mm View 1 1 chunk +15 lines, -4 lines 1 comment Download
M ui/views/cocoa/bridged_native_widget_unittest.mm View 1 2 3 6 chunks +24 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 36 (27 generated)
karandeepb
PTAL Trent. Thanks.
4 years, 5 months ago (2016-07-26 03:40:10 UTC) #7
tapted
description nit: we typically cite revisions like r400918 rather than crrev.com/2033433006 Also.. WDYT about about ...
4 years, 5 months ago (2016-07-26 06:04:17 UTC) #8
karandeepb
PTAL Trent. Have added to a test, which required accessing the private keyDownEvent_ field on ...
4 years, 4 months ago (2016-07-27 04:47:33 UTC) #21
karandeepb
It seems trybot is still failing compilation. Please hold off the review.
4 years, 4 months ago (2016-07-27 05:19:06 UTC) #24
karandeepb
PTAL Trent. Thanks.
4 years, 4 months ago (2016-07-27 07:11:31 UTC) #29
tapted
nice work! lgtm https://codereview.chromium.org/2180873002/diff/80001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/2180873002/diff/80001/ui/views/cocoa/bridged_content_view.mm#newcode443 ui/views/cocoa/bridged_content_view.mm:443: // modifier since |text| already accounts ...
4 years, 4 months ago (2016-07-28 02:01:06 UTC) #30
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/2180873002/80001
4 years, 4 months ago (2016-07-28 11:16:31 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 4 months ago (2016-07-28 11:50:59 UTC) #34
commit-bot: I haz the power
4 years, 4 months ago (2016-07-28 11:52:47 UTC) #36
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f955be13bc49601dc963dcc7e2182ef792b600f9
Cr-Commit-Position: refs/heads/master@{#408374}

Powered by Google App Engine
This is Rietveld 408576698