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

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

Issue 28186: Reverting key change (again); this breaks every keyboard layout test there is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/render_widget_host_view_gtk.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #include <cairo/cairo.h> 9 #include <cairo/cairo.h>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 RenderWidgetHostViewGtk* host_view) { 72 RenderWidgetHostViewGtk* host_view) {
73 const gfx::Rect damage_rect(expose->area); 73 const gfx::Rect damage_rect(expose->area);
74 host_view->Paint(damage_rect); 74 host_view->Paint(damage_rect);
75 return FALSE; 75 return FALSE;
76 } 76 }
77 77
78 static gboolean KeyPressReleaseEvent(GtkWidget* widget, GdkEventKey* event, 78 static gboolean KeyPressReleaseEvent(GtkWidget* widget, GdkEventKey* event,
79 RenderWidgetHostViewGtk* host_view) { 79 RenderWidgetHostViewGtk* host_view) {
80 WebKeyboardEvent wke(event); 80 WebKeyboardEvent wke(event);
81 host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke); 81 host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke);
82
83 // See note in webwidget_host_gtk.cc::HandleKeyPress().
84 if (event->type == GDK_KEY_PRESS) {
85 wke.type = WebKeyboardEvent::CHAR;
86 host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke);
87 }
88
82 return FALSE; 89 return FALSE;
83 } 90 }
84 91
85 static gboolean Focus(GtkWidget* widget, GtkDirectionType focus, 92 static gboolean Focus(GtkWidget* widget, GtkDirectionType focus,
86 RenderWidgetHostViewGtk* host_view) { 93 RenderWidgetHostViewGtk* host_view) {
87 // We override this so that pressing tab navigates within the web contents 94 // We override this so that pressing tab navigates within the web contents
88 // rather than tabbing out of it. However, we do want to be able to tab 95 // rather than tabbing out of it. However, we do want to be able to tab
89 // out of it at the appropriate points. TODO(port): study how this works 96 // out of it at the appropriate points. TODO(port): study how this works
90 // on Windows and implement it. 97 // on Windows and implement it.
91 NOTIMPLEMENTED(); 98 NOTIMPLEMENTED();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 GdkWindow* window = view_->window; 305 GdkWindow* window = view_->window;
299 if (window) { 306 if (window) {
300 backing_store->ShowRect( 307 backing_store->ShowRect(
301 damage_rect, x11_util::GetX11WindowFromGtkWidget(view_)); 308 damage_rect, x11_util::GetX11WindowFromGtkWidget(view_));
302 } 309 }
303 } else { 310 } else {
304 NOTIMPLEMENTED(); 311 NOTIMPLEMENTED();
305 } 312 }
306 } 313 }
307 314
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/browser/tab_contents/web_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698