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

Issue 2077783002: Make limitations for input.ime.sendKeyEvents API. (Closed)

Created:
4 years, 6 months ago by Azure Wei
Modified:
4 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make limitations for input.ime.sendKeyEvents API. 1) The API works only on text fields 2) ENTER et al. works only on http:, https: etc. 3) onKeyEvent no work in password field. BUG=517773 TEST=Verified on local build. Committed: https://crrev.com/06cf902e7ac4cc27399399219ad6d37042719752 Cr-Commit-Position: refs/heads/master@{#403250}

Patch Set 1 #

Patch Set 2 : Make limitations for input.ime.sendKeyEvents API. #

Total comments: 13

Patch Set 3 #

Patch Set 4 : Blacklist extension window. #

Total comments: 17

Patch Set 5 : Fix testing memory leak. #

Patch Set 6 : Check lastError of sendKeyEvents. #

Total comments: 20

Patch Set 7 : Addressed Devlin's comments. #

Total comments: 15

Patch Set 8 : Addressed comments. #

Patch Set 9 #

Total comments: 6

Patch Set 10 #

Patch Set 11 #

Patch Set 12 : onKeyEvent should not work in password. #

Total comments: 2

Patch Set 13 : Use find than count. #

Patch Set 14 #

Patch Set 15 : Fix chromeos error. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -34 lines) Patch
M chrome/browser/ui/input_method/input_method_engine.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/input_method/input_method_engine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +79 lines, -0 lines 0 comments Download
M chrome/browser/ui/input_method/input_method_engine_base.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/ime/input_ime_apitest_nonchromeos.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +98 lines, -8 lines 0 comments Download
M chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +66 lines, -25 lines 0 comments Download
M ui/base/ime/chromeos/mock_ime_input_context_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M ui/base/ime/chromeos/mock_ime_input_context_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
M ui/base/ime/dummy_input_method.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M ui/base/ime/dummy_input_method.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -0 lines 0 comments Download
M ui/base/ime/ime_input_context_handler_interface.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M ui/base/ime/input_method.h View 1 2 3 4 5 6 7 3 chunks +17 lines, -0 lines 0 comments Download
M ui/base/ime/input_method_base.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -0 lines 0 comments Download
M ui/base/ime/input_method_base.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M ui/base/ime/mock_input_method.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M ui/base/ime/mock_input_method.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (18 generated)
Azure Wei
Please review this cl. Thanks!
4 years, 6 months ago (2016-06-17 04:45:10 UTC) #3
Azure Wei
R: +rdevlin.cronin@. Devlin, can you help review this cl? Thanks!
4 years, 6 months ago (2016-06-17 05:30:56 UTC) #5
Devlin
Note that I don't own ui/input_method, so you'll probably still want Shu to review this. ...
4 years, 6 months ago (2016-06-17 16:22:44 UTC) #6
meacer
https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc#newcode226 chrome/browser/ui/input_method/input_method_engine.cc:226: pages.push_back(std::string("chrome://")); On 2016/06/17 16:22:43, Devlin wrote: > use the ...
4 years, 6 months ago (2016-06-21 01:06:37 UTC) #8
meacer
https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc#newcode231 chrome/browser/ui/input_method/input_method_engine.cc:231: keycodes.push_back(ui::VKEY_RETURN); I suggested these keys in the thread but ...
4 years, 6 months ago (2016-06-21 01:13:10 UTC) #9
Azure Wei
On 2016/06/21 01:06:37, Mustafa Emre Acer wrote: > https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc > File chrome/browser/ui/input_method/input_method_engine.cc (right): > > ...
4 years, 6 months ago (2016-06-21 01:32:58 UTC) #10
Azure Wei
On 2016/06/21 01:13:10, Mustafa Emre Acer wrote: > https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc > File chrome/browser/ui/input_method/input_method_engine.cc (right): > > ...
4 years, 6 months ago (2016-06-21 01:44:38 UTC) #11
meacer
> Except for Http/Https schemes, the key events should be able to work under some ...
4 years, 6 months ago (2016-06-21 04:44:07 UTC) #12
Azure Wei
On 2016/06/21 04:44:07, Mustafa Emre Acer wrote: > > Except for Http/Https schemes, the key ...
4 years, 6 months ago (2016-06-21 08:07:47 UTC) #13
Azure Wei
https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/20001/chrome/browser/ui/input_method/input_method_engine.cc#newcode203 chrome/browser/ui/input_method/input_method_engine.cc:203: Browser* browser = chrome::FindLastActive(); On 2016/06/17 16:22:43, Devlin wrote: ...
4 years, 6 months ago (2016-06-21 10:04:58 UTC) #14
meacer
On 2016/06/21 08:07:47, Azure Wei wrote: > On 2016/06/21 04:44:07, Mustafa Emre Acer wrote: > ...
4 years, 6 months ago (2016-06-21 22:29:46 UTC) #15
Azure Wei
On 2016/06/21 22:29:46, Mustafa Emre Acer wrote: > On 2016/06/21 08:07:47, Azure Wei wrote: > ...
4 years, 6 months ago (2016-06-22 02:07:17 UTC) #16
Devlin
https://codereview.chromium.org/2077783002/diff/60001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/60001/chrome/browser/ui/input_method/input_method_engine.cc#newcode237 chrome/browser/ui/input_method/input_method_engine.cc:237: whitelist_schemes.push_back(url::kFtpScheme); Let's use c++11 initialization syntax here. https://codereview.chromium.org/2077783002/diff/60001/chrome/browser/ui/input_method/input_method_engine.cc#newcode240 chrome/browser/ui/input_method/input_method_engine.cc:240: ...
4 years, 6 months ago (2016-06-22 16:33:12 UTC) #17
Azure Wei
https://codereview.chromium.org/2077783002/diff/60001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/60001/chrome/browser/ui/input_method/input_method_engine.cc#newcode237 chrome/browser/ui/input_method/input_method_engine.cc:237: whitelist_schemes.push_back(url::kFtpScheme); On 2016/06/22 16:33:12, Devlin wrote: > Let's use ...
4 years, 6 months ago (2016-06-23 02:45:23 UTC) #18
Devlin
https://codereview.chromium.org/2077783002/diff/100001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/100001/chrome/browser/ui/input_method/input_method_engine.cc#newcode219 chrome/browser/ui/input_method/input_method_engine.cc:219: // If |input_context->GetInputMethod() != input_method|, treats |url| as Should ...
4 years, 6 months ago (2016-06-23 18:43:22 UTC) #19
Azure Wei
https://codereview.chromium.org/2077783002/diff/100001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/100001/chrome/browser/ui/input_method/input_method_engine.cc#newcode219 chrome/browser/ui/input_method/input_method_engine.cc:219: // If |input_context->GetInputMethod() != input_method|, treats |url| as On ...
4 years, 6 months ago (2016-06-24 06:38:19 UTC) #20
meacer
Thanks for adding the whitelisting. I'm happy with the security restrictions, but I'll defer the ...
4 years, 6 months ago (2016-06-24 17:21:05 UTC) #21
Azure Wei
On 2016/06/24 17:21:05, Mustafa Emre Acer wrote: > Thanks for adding the whitelisting. I'm happy ...
4 years, 6 months ago (2016-06-25 08:46:59 UTC) #24
meacer
On 2016/06/25 08:46:59, Azure Wei wrote: > On 2016/06/24 17:21:05, Mustafa Emre Acer wrote: > ...
4 years, 5 months ago (2016-06-27 18:02:16 UTC) #25
Shu Chen
Pinging... Devlin, does the latest patch set look good to you? Thank.
4 years, 5 months ago (2016-06-28 16:12:49 UTC) #26
Devlin
https://codereview.chromium.org/2077783002/diff/120001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/120001/chrome/browser/ui/input_method/input_method_engine.cc#newcode230 chrome/browser/ui/input_method/input_method_engine.cc:230: bool url_trustable, The more I look at the "url_trustable" ...
4 years, 5 months ago (2016-06-28 20:56:44 UTC) #27
Shu Chen
Pinging... Devlin, does the latest patch set look good to you? Thank.
4 years, 5 months ago (2016-06-29 00:33:42 UTC) #28
Shu Chen
On 2016/06/29 00:33:42, Shu Chen wrote: > Pinging... > > Devlin, does the latest patch ...
4 years, 5 months ago (2016-06-29 00:34:36 UTC) #29
Azure Wei
https://codereview.chromium.org/2077783002/diff/120001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/120001/chrome/browser/ui/input_method/input_method_engine.cc#newcode230 chrome/browser/ui/input_method/input_method_engine.cc:230: bool url_trustable, On 2016/06/28 20:56:44, Devlin wrote: > The ...
4 years, 5 months ago (2016-06-29 02:53:46 UTC) #30
Shu Chen
https://codereview.chromium.org/2077783002/diff/160001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/160001/chrome/browser/ui/input_method/input_method_engine.cc#newcode210 chrome/browser/ui/input_method/input_method_engine.cc:210: Browser* browser = chrome::FindLastActive(); IMO, IsValidKeyForSpecialPage() may run faster ...
4 years, 5 months ago (2016-06-29 13:18:19 UTC) #31
Devlin
lgtm with one last nit and once Shu signs off. https://codereview.chromium.org/2077783002/diff/120001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/120001/chrome/browser/ui/input_method/input_method_engine.cc#newcode230 ...
4 years, 5 months ago (2016-06-29 16:07:23 UTC) #32
Azure Wei
https://codereview.chromium.org/2077783002/diff/160001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/160001/chrome/browser/ui/input_method/input_method_engine.cc#newcode210 chrome/browser/ui/input_method/input_method_engine.cc:210: Browser* browser = chrome::FindLastActive(); On 2016/06/29 13:18:19, Shu Chen ...
4 years, 5 months ago (2016-06-30 07:46:20 UTC) #33
Devlin
(slgtm) https://codereview.chromium.org/2077783002/diff/220001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/220001/chrome/browser/ui/input_method/input_method_engine.cc#newcode267 chrome/browser/ui/input_method/input_method_engine.cc:267: return std::count(invalid_character_keycodes.begin(), nitty nit: prefer find() for vectors ...
4 years, 5 months ago (2016-06-30 14:35:46 UTC) #35
Shu Chen
lgtm
4 years, 5 months ago (2016-06-30 14:48:09 UTC) #36
Azure Wei
https://codereview.chromium.org/2077783002/diff/220001/chrome/browser/ui/input_method/input_method_engine.cc File chrome/browser/ui/input_method/input_method_engine.cc (right): https://codereview.chromium.org/2077783002/diff/220001/chrome/browser/ui/input_method/input_method_engine.cc#newcode267 chrome/browser/ui/input_method/input_method_engine.cc:267: return std::count(invalid_character_keycodes.begin(), On 2016/06/30 14:35:46, Devlin wrote: > nitty ...
4 years, 5 months ago (2016-06-30 14:58:46 UTC) #37
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/2077783002/240001
4 years, 5 months ago (2016-06-30 14:59:37 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/161493) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-06-30 15:12:55 UTC) #42
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/2077783002/260001
4 years, 5 months ago (2016-06-30 15:30:20 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/194839)
4 years, 5 months ago (2016-06-30 15:48:10 UTC) #47
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/2077783002/280001
4 years, 5 months ago (2016-06-30 18:21:57 UTC) #50
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 5 months ago (2016-06-30 19:29:48 UTC) #52
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-30 19:30:02 UTC) #53
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/06cf902e7ac4cc27399399219ad6d37042719752 Cr-Commit-Position: refs/heads/master@{#403250}
4 years, 5 months ago (2016-06-30 19:32:26 UTC) #55
Charlie Reis
4 years, 5 months ago (2016-06-30 22:31:05 UTC) #57
Message was sent while issue was closed.
This CL broke the Site Isolation Linux FYI bot.  See https://crbug.com/624958. 
Can you take a look?

Powered by Google App Engine
This is Rietveld 408576698