Index: Source/core/html/HTMLPlugInElement.cpp |
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp |
index 688309251a162a93159237e4467e164621e3e717..1c451efc8b26036d8b0862eb894a5f297b311440 100644 |
--- a/Source/core/html/HTMLPlugInElement.cpp |
+++ b/Source/core/html/HTMLPlugInElement.cpp |
@@ -278,16 +278,18 @@ void HTMLPlugInElement::collectStyleForPresentationAttribute(const QualifiedName |
} |
} |
-void HTMLPlugInElement::handleLocalEvents(Event* event) |
+void HTMLPlugInElement::defaultEventHandler(Event* event) |
{ |
- HTMLFrameOwnerElement::handleLocalEvents(event); |
- |
// Firefox seems to use a fake event listener to dispatch events to plug-in |
// (tested with mouse events only). This is observable via different order |
// of events - in Firefox, event listeners specified in HTML attributes |
// fires first, then an event gets dispatched to plug-in, and only then |
// other event listeners fire. Hopefully, this difference does not matter in |
// practice. |
+ |
+ // FIXME: Mouse down and scroll events are passed down to plug-in via custom |
+ // code in EventHandler; these code paths should be united. |
+ |
RenderObject* r = renderer(); |
if (!r || !r->isWidget()) |
return; |
@@ -301,6 +303,9 @@ void HTMLPlugInElement::handleLocalEvents(Event* event) |
if (!widget) |
return; |
widget->handleEvent(event); |
+ if (event->defaultHandled()) |
+ return; |
+ HTMLFrameOwnerElement::defaultEventHandler(event); |
} |
RenderWidget* HTMLPlugInElement::renderWidgetForJSBindings() const |