Changeset 84318 in webkit
- Timestamp:
- Apr 19, 2011 5:00:34 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r84304 r84318 1 2011-04-19 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 UI process thinks the page is unresponsive when a plug-in is showing a context menu 6 https://bugs.webkit.org/show_bug.cgi?id=58943 7 <rdar://problem/9299901> 8 9 Change the HandleMouseEvent message to have a delayed reply and make the PluginControllerProxy 10 respond to it immediately, before even passing the event to the plug-in. Since it doesn't matter 11 for mouse events whether the plug-in handled them or not we can do this. 12 13 Another solution could have been to make handleMouseEvent an asynchronous message, but that could 14 mess up the message ordering so this seemed like the least intrusive change. 15 16 * PluginProcess/PluginControllerProxy.cpp: 17 (WebKit::PluginControllerProxy::handleMouseEvent): 18 * PluginProcess/PluginControllerProxy.h: 19 * PluginProcess/PluginControllerProxy.messages.in: 20 1 21 2011-04-19 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
r83842 r84318 437 437 } 438 438 439 void PluginControllerProxy::handleMouseEvent(const WebMouseEvent& mouseEvent, bool& handled) 440 { 441 handled = m_plugin->handleMouseEvent(mouseEvent); 439 void PluginControllerProxy::handleMouseEvent(const WebMouseEvent& mouseEvent, PassRefPtr<Messages::PluginControllerProxy::HandleMouseEvent::DelayedReply> reply) 440 { 441 // Always let the web process think that we've handled this mouse event, even before passing it along to the plug-in. 442 // This is a workaround for 443 // <rdar://problem/9299901> UI process thinks the page is unresponsive when a plug-in is showing a context menu. 444 // The web process sends a synchronous HandleMouseEvent message and the plug-in process spawns a nested 445 // run loop when showing the context menu, so eventually the unresponsiveness timer kicks in in the UI process. 446 // FIXME: We should come up with a better way to do this. 447 reply->send(true); 448 449 m_plugin->handleMouseEvent(mouseEvent); 442 450 } 443 451 -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h
r83624 r84318 32 32 #include "Plugin.h" 33 33 #include "PluginController.h" 34 #include "PluginControllerProxyMessages.h" 34 35 #include "RunLoop.h" 35 36 #include "ShareableBitmap.h" … … 116 117 void manualStreamDidFinishLoading(); 117 118 void manualStreamDidFail(bool wasCancelled); 118 void handleMouseEvent(const WebMouseEvent&, bool& handled);119 void handleMouseEvent(const WebMouseEvent&, PassRefPtr<Messages::PluginControllerProxy::HandleMouseEvent::DelayedReply>); 119 120 void handleWheelEvent(const WebWheelEvent&, bool& handled); 120 121 void handleMouseEnterEvent(const WebMouseEvent&, bool& handled); -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
r83842 r84318 61 61 62 62 # Sent when a mouse event (that isn't a mouse enter/leave event or a wheel event) should be processed. 63 HandleMouseEvent(WebKit::WebMouseEvent mouseEvent) -> (bool handled) 63 HandleMouseEvent(WebKit::WebMouseEvent mouseEvent) -> (bool handled) Delayed 64 64 65 65 # Sent when a mouse wheel event should be processed.
Note: See TracChangeset
for help on using the changeset viewer.