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

Unified Diff: chrome/browser/cocoa/chrome_event_processing_window.mm

Issue 235039: Fix conflicts between accelerator keys and HTML DOM accesskeys.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/chrome_event_processing_window.mm
===================================================================
--- chrome/browser/cocoa/chrome_event_processing_window.mm (revision 29767)
+++ chrome/browser/cocoa/chrome_event_processing_window.mm (working copy)
@@ -87,17 +87,25 @@
return [super performKeyEquivalent:event];
}
-- (void)redispatchEvent:(NSEvent*)event {
+- (BOOL)redispatchEvent:(NSEvent*)event {
DCHECK(event);
DCHECK([event window] == self);
+ eventHandled_ = YES;
redispatchingEvent_ = YES;
[NSApp sendEvent:event];
redispatchingEvent_ = NO;
+
+ // If the event was not handled by [NSApp sendEvent:], the sendEvent:
+ // method below will be called, and because |redispatchingEvent_| is YES,
+ // |eventHandled_| will be set to NO.
+ return eventHandled_;
}
- (void)sendEvent:(NSEvent*)event {
if (!redispatchingEvent_)
[super sendEvent:event];
+ else
+ eventHandled_ = NO;
}
@end // ChromeEventProcessingWindow

Powered by Google App Engine
This is Rietveld 408576698