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

Unified Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 212893005: Revert "Change event handling order in HTMLPlugInElement." (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698