Index: chrome/browser/tab_contents/tab_contents_view_mac.mm |
=================================================================== |
--- chrome/browser/tab_contents/tab_contents_view_mac.mm (revision 33947) |
+++ chrome/browser/tab_contents/tab_contents_view_mac.mm (working copy) |
@@ -356,18 +356,12 @@ |
} |
- (BOOL)processKeyboardEvent:(NativeWebKeyboardEvent*)wkEvent { |
- if (wkEvent->skip_in_browser) |
+ if (wkEvent->skip_in_browser || wkEvent->type == WebKit::WebInputEvent::Char) |
return NO; |
NSEvent* event = wkEvent->os_event; |
+ DCHECK(event != NULL); |
- if (!event) { |
- // Char events are synthesized and do not contain a real event. We are not |
- // interested in them anyway. |
- DCHECK(wkEvent->type == WebKit::WebInputEvent::Char); |
- return NO; |
- } |
- |
// If this tab is no longer active, its window will be |nil|. In that case, |
// best ignore the event. |
if (![self window]) |