X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=WebKit%2Fmac%2FPlugins%2FWebNetscapePluginEventHandlerCocoa.mm;h=f952f6b59198422bad158427ec988be5922534e0;hp=47c5b4068cd0db9154a6d2c2e4f774eddba81e71;hb=0f8ecf1ef91ff02c1aaa2bfb79074c322b593d29;hpb=6fe5aac0fca5473cd506521e930c560dbb960c8c diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm index 47c5b40..f952f6b 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm @@ -109,7 +109,11 @@ bool WebNetscapePluginEventHandlerCocoa::sendMouseEvent(NSEvent *nsEvent, NPCoco void WebNetscapePluginEventHandlerCocoa::keyDown(NSEvent *event) { - sendKeyEvent(event, NPCocoaEventKeyDown); + bool retval = sendKeyEvent(event, NPCocoaEventKeyDown); + + // If the plug-in did not handle the event, pass it on to the Input Manager. + if (!retval) + [m_pluginView interpretKeyEvents:[NSArray arrayWithObject:event]]; } void WebNetscapePluginEventHandlerCocoa::keyUp(NSEvent *event) @@ -131,7 +135,7 @@ void WebNetscapePluginEventHandlerCocoa::flagsChanged(NSEvent *nsEvent) sendEvent(&event); } -void WebNetscapePluginEventHandlerCocoa::sendKeyEvent(NSEvent* nsEvent, NPCocoaEventType type) +bool WebNetscapePluginEventHandlerCocoa::sendKeyEvent(NSEvent* nsEvent, NPCocoaEventType type) { NPCocoaEvent event; @@ -142,7 +146,7 @@ void WebNetscapePluginEventHandlerCocoa::sendKeyEvent(NSEvent* nsEvent, NPCocoaE event.event.key.characters = (NPNSString *)[nsEvent characters]; event.event.key.charactersIgnoringModifiers = (NPNSString *)[nsEvent charactersIgnoringModifiers]; - sendEvent(&event); + return sendEvent(&event); } void WebNetscapePluginEventHandlerCocoa::windowFocusChanged(bool hasFocus)