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

Side by Side Diff: chrome/browser/renderer_host/gtk_im_context_wrapper.cc

Issue 179016: Fix issue 20297: Typing backspace while in a form field causes the browser to... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/gtk_im_context_wrapper.h" 5 #include "chrome/browser/renderer_host/gtk_im_context_wrapper.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 if (!NeedCommitByForwardingCharEvent()) { 280 if (!NeedCommitByForwardingCharEvent()) {
281 wke->windowsKeyCode = kCompositionEventKeyCode; 281 wke->windowsKeyCode = kCompositionEventKeyCode;
282 // keyidentifier must be updated accordingly, otherwise this key event may 282 // keyidentifier must be updated accordingly, otherwise this key event may
283 // still be processed by webkit. 283 // still be processed by webkit.
284 wke->setKeyIdentifierFromWindowsKeyCode(); 284 wke->setKeyIdentifierFromWindowsKeyCode();
285 // Prevent RenderView::UnhandledKeyboardEvent() from processing it. 285 // Prevent RenderView::UnhandledKeyboardEvent() from processing it.
286 // Otherwise unexpected result may occur. For example if it's a 286 // Otherwise unexpected result may occur. For example if it's a
287 // Backspace key event, the browser may go back to previous page. 287 // Backspace key event, the browser may go back to previous page.
288 if (wke->os_event) { 288 if (wke->os_event) {
289 wke->os_event->keyval = GDK_VoidSymbol; 289 wke->os_event->keyval = GDK_VoidSymbol;
290 wke->os_event->hardware_keycode = 0;
290 wke->os_event->state = 0; 291 wke->os_event->state = 0;
291 } 292 }
292 } 293 }
293 host_view_->GetRenderWidgetHost()->ForwardKeyboardEvent(*wke); 294 host_view_->GetRenderWidgetHost()->ForwardKeyboardEvent(*wke);
294 } 295 }
295 296
296 void GtkIMContextWrapper::ProcessUnfilteredKeyPressEvent( 297 void GtkIMContextWrapper::ProcessUnfilteredKeyPressEvent(
297 NativeWebKeyboardEvent* wke) { 298 NativeWebKeyboardEvent* wke) {
298 RenderWidgetHost* host = host_view_->GetRenderWidgetHost(); 299 RenderWidgetHost* host = host_view_->GetRenderWidgetHost();
299 300
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 510
510 void GtkIMContextWrapper::HandleHostViewRealizeThunk( 511 void GtkIMContextWrapper::HandleHostViewRealizeThunk(
511 GtkWidget* widget, GtkIMContextWrapper* self) { 512 GtkWidget* widget, GtkIMContextWrapper* self) {
512 self->HandleHostViewRealize(widget); 513 self->HandleHostViewRealize(widget);
513 } 514 }
514 515
515 void GtkIMContextWrapper::HandleHostViewUnrealizeThunk( 516 void GtkIMContextWrapper::HandleHostViewUnrealizeThunk(
516 GtkWidget* widget, GtkIMContextWrapper* self) { 517 GtkWidget* widget, GtkIMContextWrapper* self) {
517 self->HandleHostViewUnrealize(); 518 self->HandleHostViewUnrealize();
518 } 519 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698