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

Issue 126118: Integrating GtkIMContext into the RenderWidgetHostViewGtk class.... (Closed)

Created:
11 years, 6 months ago by Hironori Bono
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Integrating GtkIMContext into the RenderWidgetHostViewGtk class.This change implements signal handers of the GtkIMContext object to support IMEs and dead-keys. Also, to improve compatibility with Windows Chrome, this change emulates IPC messages sent on Windows when we input characters and fixes Issue 13604 as well as Issue 10953 and 11226. Even though I notice we need more work for fixing edge cases (e.g. disabling IMEs on a password input) on Linux, I think this is the good starting point. (Supporting edge-cases requires complicated code and it makes hard to review.) BUG=10953 "IME support" BUG=11226 "Dead keys and accents input not working" BUG=13604 "Hotkeys not working in non-us keyboard layout" TEST=Open a web page which contains an <input> form (e.g. <http://www.google.com/>), type a '[{' key and an 'A' key on a Canadian-French keyboard, and see a Latin character "U+00E2" is displayed in the <input> form. TEST=Open a web page which contains an <input> form (e.g. <http://www.google.com/>), enable an Chinese Pinyin IME, type a 'W' key, type an 'O' key, and see a Chinese character is displayed in the <input> form. TEST=Change the keyboard layout to Hebrew (or Russian), open a web page which contains an <input> form, input some characters in the <input> form, type control+a, and see the text in the <input> form is selected. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19009

Patch Set 1 #

Total comments: 20

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 7

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 4

Patch Set 10 : '' #

Total comments: 4

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -7 lines) Patch
M chrome/browser/renderer_host/render_widget_host.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +117 lines, -2 lines 0 comments Download
M chrome/common/native_web_keyboard_event.h View 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/native_web_keyboard_event_linux.cc View 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M webkit/api/public/gtk/WebInputEventFactory.h View 7 8 9 10 3 chunks +4 lines, -3 lines 0 comments Download
M webkit/api/src/gtk/WebInputEventFactory.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +114 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Hironori Bono
11 years, 6 months ago (2009-06-15 10:36:02 UTC) #1
Evan Martin
+estade and dean, who have looked at input stuff At first glance this looks really ...
11 years, 6 months ago (2009-06-15 16:31:51 UTC) #2
Evan Martin
I think we need Darin to look at the webkit api changes. http://codereview.chromium.org/126118/diff/1/6 File chrome/browser/renderer_host/render_widget_host.h ...
11 years, 6 months ago (2009-06-15 17:53:43 UTC) #3
Evan Stade
http://codereview.chromium.org/126118/diff/1/3 File chrome/browser/renderer_host/render_widget_host_view_gtk.cc (right): http://codereview.chromium.org/126118/diff/1/3#newcode71 Line 71: // Create an GtkIMContext instance and attach its ...
11 years, 6 months ago (2009-06-15 18:32:32 UTC) #4
Hironori Bono
Thank you for your comments. Even though I added (and updated) comments in this change, ...
11 years, 6 months ago (2009-06-16 07:47:09 UTC) #5
Evan Stade
lgtm http://codereview.chromium.org/126118/diff/37/1037 File chrome/browser/renderer_host/render_widget_host_view_gtk.cc (right): http://codereview.chromium.org/126118/diff/37/1037#newcode485 Line 485: if (im_context_) { in the interest of ...
11 years, 6 months ago (2009-06-16 19:17:30 UTC) #6
Hironori Bono
Thank you for your comment. Even though I prefer your option, I would like to ...
11 years, 6 months ago (2009-06-17 02:04:26 UTC) #7
Evan Stade
http://codereview.chromium.org/126118/diff/37/1036 File webkit/api/src/gtk/WebInputEventFactory.cpp (right): http://codereview.chromium.org/126118/diff/37/1036#newcode178 Line 178: // that we can create a WebKeyboardEvent instance ...
11 years, 6 months ago (2009-06-17 02:09:24 UTC) #8
darin (slow to review)
http://codereview.chromium.org/126118/diff/37/1036 File webkit/api/src/gtk/WebInputEventFactory.cpp (right): http://codereview.chromium.org/126118/diff/37/1036#newcode76 Line 76: static const unsigned int kHardwareCodeToGdkKeyval[] = { nit: ...
11 years, 6 months ago (2009-06-17 04:40:53 UTC) #9
Hironori Bono
Thank you for your comments. I have added a WebInputEventFactory::keyboardEvent(wchar_t, double) for a Char event, ...
11 years, 6 months ago (2009-06-17 09:55:08 UTC) #10
Evan Martin
(should I be reviewing this? or darin? or who?)
11 years, 6 months ago (2009-06-18 00:41:10 UTC) #11
Hironori Bono
On 2009/06/18 00:41:10, Evan Martin wrote: > (should I be reviewing this? or darin? or ...
11 years, 6 months ago (2009-06-18 04:11:54 UTC) #12
darin (slow to review)
http://codereview.chromium.org/126118/diff/58/1080 File chrome/common/native_web_keyboard_event.h (right): http://codereview.chromium.org/126118/diff/58/1080#newcode34 Line 34: void SetWebKeyboardEvent(const WebKit::WebKeyboardEvent& event); why not just have ...
11 years, 6 months ago (2009-06-18 06:34:05 UTC) #13
Hironori Bono
Thank you for your comments. They are definitely helpful for me. http://codereview.chromium.org/126118/diff/58/1080 File chrome/common/native_web_keyboard_event.h (right): ...
11 years, 6 months ago (2009-06-18 09:05:03 UTC) #14
darin (slow to review)
LGTM My review of render_widget_host_view_gtk.{h,cc} was fairly superficial, so you probably want to get someone ...
11 years, 6 months ago (2009-06-22 16:06:51 UTC) #15
Evan Martin
_gtk.* LGTM as well
11 years, 6 months ago (2009-06-22 21:56:30 UTC) #16
Hironori Bono
11 years, 6 months ago (2009-06-23 15:00:51 UTC) #17
Thank you for your comments.
Even though I have committed (and reverted) this change, I would like to reply a
comment of yours.

On 2009/06/22 16:06:51, darin wrote:
> nit: we should use string16 instead of wstring in new code.  if it is not
convenient to change to string16 now, then it can be postponed to a follow-up
CL.

Thank you for noticing this.
I'm refactoring our IME back-end (and front-ends) to use string16 instead of
std::wstring. I'm going to send a review request as soon as possible.

Powered by Google App Engine
This is Rietveld 408576698