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

Issue 956133002: [IME] Differentiate s_suppressNextKeypressEvent in WebViewImpl. (Closed)

Created:
5 years, 10 months ago by huangs
Modified:
5 years, 8 months ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[IME] Differentiate s_suppressNextKeypressEvent in WebViewImpl. There are different reasons why s_suppressNextKeyEvent is set to true: 1. The key event is cancelled. 2. The keydown event is taken (e.g., for backspace), so the keypress event is not needed. The old code assumes they're both the same. On Android this causes compositions to be canclled when backspace is pressed. An alternative fix proposed by suzhe@ is here: https://codereview.chromium.org/970743002/ BUG=453499

Patch Set 1 #

Patch Set 2 : Fix comments. #

Patch Set 3 : Add unit tests; breaking fix on purpose for testing. #

Total comments: 1

Patch Set 4 : Fixing test, reducing non-essential deltas. #

Total comments: 4

Patch Set 5 : Sync. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -12 lines) Patch
M Source/web/WebViewImpl.h View 1 2 3 4 1 chunk +8 lines, -2 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 6 chunks +9 lines, -10 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download
A Source/web/tests/data/composition_not_cancelled_by_backspace.html View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (4 generated)
huangs
PTAL. This is an urgent CL to fix m40 Android Chrome Release blocker. The CL ...
5 years, 10 months ago (2015-02-26 00:43:03 UTC) #2
huangs
5 years, 10 months ago (2015-02-26 00:45:49 UTC) #4
Ken Russell (switch to Gerrit)
I'm not sure who is the best reviewer for this change but think others than ...
5 years, 10 months ago (2015-02-26 02:11:22 UTC) #6
huangs
Added unit tests while breaking my fix on purpose to ensure test is meaningful. Probably ...
5 years, 10 months ago (2015-02-26 05:33:25 UTC) #7
James Su
https://codereview.chromium.org/956133002/diff/40001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/956133002/diff/40001/Source/web/WebViewImpl.cpp#newcode2273 Source/web/WebViewImpl.cpp:2273: if (text.isEmpty() || m_suppressNextKeypressEvent == Suppress_KeyEventCancelled) { 1. Looks ...
5 years, 10 months ago (2015-02-26 09:16:59 UTC) #9
huangs
Thanks for the comments. The fix does solve the problem, but right now I'm dealing ...
5 years, 10 months ago (2015-02-26 09:25:07 UTC) #10
huangs
Uploaded and fixed test (verified that it's useful). PTAL.
5 years, 10 months ago (2015-02-26 12:20:07 UTC) #11
James Su
On 2015/02/26 12:20:07, huangs wrote: > Uploaded and fixed test (verified that it's useful). PTAL. ...
5 years, 10 months ago (2015-02-26 14:05:49 UTC) #12
huangs
Indeed it would be cleaner to just remove the line and keep m_suppressNextKeyPressEvent as bool. ...
5 years, 10 months ago (2015-02-26 16:21:17 UTC) #13
huangs
Ping reviewers. Please note that I'll be on an offsite from this afternoon to tomorrow ...
5 years, 10 months ago (2015-02-26 19:57:53 UTC) #14
James Su
https://codereview.chromium.org/956133002/diff/60001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/956133002/diff/60001/Source/web/WebViewImpl.cpp#newcode1009 Source/web/WebViewImpl.cpp:1009: m_suppressNextKeypressEvent = Suppress_KeyEventCanceled; Why it's Canceled rather than Handled? ...
5 years, 9 months ago (2015-02-27 01:46:18 UTC) #15
huangs
Despite urgency, no reviewers other than suzhe@ has replied. I'll defer to suzhe@'s expertise and ...
5 years, 9 months ago (2015-02-27 03:43:58 UTC) #16
huangs
Also also see b/19363073 internally for discussions and status on the Stable blocker.
5 years, 9 months ago (2015-02-27 04:15:06 UTC) #17
James Su
Sorry that, I'm currently travelling in Tokyo, thus not possible to work on it, though ...
5 years, 9 months ago (2015-02-27 06:34:43 UTC) #18
aelias_OOO_until_Jul13
I chatted with Bo about the best course of action for this and we agreed ...
5 years, 9 months ago (2015-02-27 21:15:11 UTC) #19
huangs
suzhe@: I tried your method. I needed to change "return text.isEmpty();" to "return !text.isEmpty();" then ...
5 years, 9 months ago (2015-03-01 00:59:53 UTC) #20
huangs
On 2015/03/01 00:59:53, huangs wrote: > suzhe@: I tried your method. I needed to change ...
5 years, 9 months ago (2015-03-01 01:00:56 UTC) #21
huangs
suzhe@: I dug into your solution a bit more by apply the new unittest from ...
5 years, 9 months ago (2015-03-01 23:55:38 UTC) #22
huangs
A symptom of the above phenomenon is that when Backspace is pressed (with autocomplete="off"), the ...
5 years, 9 months ago (2015-03-02 00:04:03 UTC) #23
James Su
On 2015/03/01 00:59:53, huangs wrote: > suzhe@: I tried your method. I needed to change ...
5 years, 9 months ago (2015-03-02 02:19:14 UTC) #24
James Su
On 2015/03/01 23:55:38, huangs wrote: > suzhe@: I dug into your solution a bit more ...
5 years, 9 months ago (2015-03-02 02:24:56 UTC) #25
huangs
That's because I made a mistake (missed "!"). Let me test again.
5 years, 9 months ago (2015-03-02 02:37:11 UTC) #26
huangs
Okay looks like the UI works and the test passes. :) Going to create new ...
5 years, 9 months ago (2015-03-02 02:52:51 UTC) #27
huangs
5 years, 9 months ago (2015-03-02 03:15:28 UTC) #28
Created new CL for your fix:

https://codereview.chromium.org/970743002/

Please see if the comments are accurate, and check the tests.  Thanks!

Powered by Google App Engine
This is Rietveld 408576698