| Index: webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
|
| diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
|
| index 00eb86b91e4c295ef871aeebc1b7293c940b011e..23f5373e6ce3505c7a8f19d1b7ae462156f13e29 100644
|
| --- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
|
| +++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
|
| @@ -520,6 +520,17 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
|
| }
|
| #endif
|
|
|
| + // WebKit sometimes sends spurious mouse move events when the window doesn't
|
| + // have focus; Cocoa event model plugins don't expect to receive mouse move
|
| + // events when they are in a background window, so drop those events.
|
| + if (!containing_window_has_focus_ &&
|
| + instance()->event_model() == NPEventModelCocoa &&
|
| + (event.type == WebInputEvent::MouseMove ||
|
| + event.type == WebInputEvent::MouseEnter ||
|
| + event.type == WebInputEvent::MouseLeave)) {
|
| + return false;
|
| + }
|
| +
|
| if (WebInputEvent::isMouseEventType(event.type) ||
|
| event.type == WebInputEvent::MouseWheel) {
|
| // Check our plugin location before we send the event to the plugin, just
|
|
|