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

Issue 147011: Integrating GtkIMContext into the RenderWidgetHostViewGtk class (Take 2).... (Closed)

Created:
11 years, 6 months ago by Hironori Bono
Modified:
9 years, 7 months ago
Reviewers:
Evan Martin, Evan Stade
CC:
chromium-reviews_googlegroups.com, darin (slow to review), Ben Goodger (Google)
Visibility:
Public.

Description

Integrating GtkIMContext into the RenderWidgetHostViewGtk class (Take 2). This change is an updated version of <http://codereview.chromium.org/126118>; that I reverted because of issue 15024 <http://crbug.com/15024>;. This issue 15024 is caused by my bonehead mistake that I forgot handling the case that gtk_im_context_filter_keypress() returns false. (The GtkIMContext usually returns false when we type control keys, such as return, page up, page down, etc.) To handle this case, this change added code that manually creates a Char event and send it to the renderer in RenderWidgetHostViewGtkWidget::KeyPressReleaseEvent(). Except this code, it is exactly the same as <http://codereview.chromium.org/126118>;. Unfortunately, this change still uses std::wstring, I'm going to send another change which replace std::wstring with string16. (The following message is copied from <http://codereview.chromium.org/126118>.) This change implements signal handers of the GtkIMContext object to support IMEs anddead-keys. Also, to improve compatibility with Windows Chrome, this changeemulates IPC messages sent on Windows when we input characters and fixes Issue13604 as well as Issue 10953 and 11226. Even though I notice we need more workfor fixing edge cases (e.g. disabling IMEs on a password input) on Linux, Ithink this is the good starting point. (Supporting edge-cases requirescomplicated 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" BUG=13711 "Alt-D does not work when in editbox" TEST=Open a web page which contains an <input> form, 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, 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. TEST=Open a web page which contains a <textarea> form, type a return key, and see a new line is inserted. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19238

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

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

Messages

Total messages: 7 (0 generated)
Hironori Bono
I'm very sorry for bothering you with my stupid changes. I confirmed this updated change ...
11 years, 6 months ago (2009-06-23 15:18:03 UTC) #1
Evan Martin
On 2009/06/23 15:18:03, hbono wrote: > I'm very sorry for bothering you with my stupid ...
11 years, 6 months ago (2009-06-23 15:20:27 UTC) #2
Evan Martin
oh, i see, you added to the review desc. looking...
11 years, 6 months ago (2009-06-23 15:22:32 UTC) #3
Evan Martin
LGTM Can you verify that page up / page down as well as some hotkeys ...
11 years, 6 months ago (2009-06-23 15:23:51 UTC) #4
Evan Stade
I agree, don't go so hard on yourself. Regressions certainly aren't desirable but they are ...
11 years, 6 months ago (2009-06-23 19:53:50 UTC) #5
Hironori Bono
Thank you for your reviews and encouraging comments. After I sent my previous message, I ...
11 years, 6 months ago (2009-06-24 11:17:45 UTC) #6
Evan Stade
11 years, 6 months ago (2009-06-24 18:53:49 UTC) #7
lg once more :)

http://codereview.chromium.org/147011/diff/1009/31
File chrome/browser/tab_contents/tab_contents_view_gtk.cc (right):

http://codereview.chromium.org/147011/diff/1009/31#newcode316
Line 316: if (event.type == WebKit::WebInputEvent::Char)
it seems like it would be more direct if you made this check for event.os_event,
but it's not a big deal

Powered by Google App Engine
This is Rietveld 408576698