- Revision
- 187114
- Author
- commit-qu...@webkit.org
- Date
- 2015-07-21 12:52:29 -0700 (Tue, 21 Jul 2015)
Log Message
Make PluginProxy::handleMouseEvent() asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=146142
Patch by Sungmann Cho <sungmann....@navercorp.com> on 2015-07-21
Reviewed by Anders Carlsson.
PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
using a synchronous message, but the recipient always reply immediately with the same value("true")
even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
OK to process its messages asynchronously.
Source/WebKit2:
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::handleMouseEvent):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::handleMouseEvent):
LayoutTests:
platform/mac-wk2/plugins/mouse-events-expected.txt was introduced by webkit.org/b/116665 to avoid
flakey tests, but from now on we can share the common expectations.
* platform/mac-wk2/plugins/mouse-events-expected.txt: Removed.
Modified Paths
Removed Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (187113 => 187114)
--- trunk/LayoutTests/ChangeLog 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/LayoutTests/ChangeLog 2015-07-21 19:52:29 UTC (rev 187114)
@@ -1,3 +1,20 @@
+2015-07-21 Sungmann Cho <sungmann....@navercorp.com>
+
+ Make PluginProxy::handleMouseEvent() asynchronous.
+ https://bugs.webkit.org/show_bug.cgi?id=146142
+
+ Reviewed by Anders Carlsson.
+
+ PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
+ using a synchronous message, but the recipient always reply immediately with the same value("true")
+ even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
+ OK to process its messages asynchronously.
+
+ platform/mac-wk2/plugins/mouse-events-expected.txt was introduced by webkit.org/b/116665 to avoid
+ flakey tests, but from now on we can share the common expectations.
+
+ * platform/mac-wk2/plugins/mouse-events-expected.txt: Removed.
+
2015-07-21 David Hyatt <hy...@apple.com>
Need a way to ignore text-zoom in a Web page.
Deleted: trunk/LayoutTests/platform/mac-wk2/plugins/mouse-events-expected.txt (187113 => 187114)
--- trunk/LayoutTests/platform/mac-wk2/plugins/mouse-events-expected.txt 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/LayoutTests/platform/mac-wk2/plugins/mouse-events-expected.txt 2015-07-21 19:52:29 UTC (rev 187114)
@@ -1,12 +0,0 @@
-
-Test for bug 11517: Flash clicks/interactivity not working properly.
-
-PLUGIN: mouseDown at (12, 12)
-PLUGIN: mouseUp at (12, 12)
-PLUGIN: mouseDown at (22, 22)
-PLUGIN: mouseUp at (32, 22)
-PLUGIN: getFocusEvent
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Modified: trunk/Source/WebKit2/ChangeLog (187113 => 187114)
--- trunk/Source/WebKit2/ChangeLog 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/Source/WebKit2/ChangeLog 2015-07-21 19:52:29 UTC (rev 187114)
@@ -1,3 +1,22 @@
+2015-07-21 Sungmann Cho <sungmann....@navercorp.com>
+
+ Make PluginProxy::handleMouseEvent() asynchronous.
+ https://bugs.webkit.org/show_bug.cgi?id=146142
+
+ Reviewed by Anders Carlsson.
+
+ PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
+ using a synchronous message, but the recipient always reply immediately with the same value("true")
+ even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
+ OK to process its messages asynchronously.
+
+ * PluginProcess/PluginControllerProxy.cpp:
+ (WebKit::PluginControllerProxy::handleMouseEvent):
+ * PluginProcess/PluginControllerProxy.h:
+ * PluginProcess/PluginControllerProxy.messages.in:
+ * WebProcess/Plugins/PluginProxy.cpp:
+ (WebKit::PluginProxy::handleMouseEvent):
+
2015-07-20 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Add API to be notified about editor state changes
Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp (187113 => 187114)
--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp 2015-07-21 19:52:29 UTC (rev 187114)
@@ -514,17 +514,9 @@
m_plugin->manualStreamDidFail(wasCancelled);
}
-
-void PluginControllerProxy::handleMouseEvent(const WebMouseEvent& mouseEvent, PassRefPtr<Messages::PluginControllerProxy::HandleMouseEvent::DelayedReply> reply)
-{
- // Always let the web process think that we've handled this mouse event, even before passing it along to the plug-in.
- // This is a workaround for
- // <rdar://problem/9299901> UI process thinks the page is unresponsive when a plug-in is showing a context menu.
- // The web process sends a synchronous HandleMouseEvent message and the plug-in process spawns a nested
- // run loop when showing the context menu, so eventually the unresponsiveness timer kicks in in the UI process.
- // FIXME: We should come up with a better way to do this.
- reply->send(true);
+void PluginControllerProxy::handleMouseEvent(const WebMouseEvent& mouseEvent)
+{
m_plugin->handleMouseEvent(mouseEvent);
}
Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h (187113 => 187114)
--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h 2015-07-21 19:52:29 UTC (rev 187114)
@@ -134,7 +134,7 @@
void manualStreamDidReceiveData(const IPC::DataReference& data);
void manualStreamDidFinishLoading();
void manualStreamDidFail(bool wasCancelled);
- void handleMouseEvent(const WebMouseEvent&, PassRefPtr<Messages::PluginControllerProxy::HandleMouseEvent::DelayedReply>);
+ void handleMouseEvent(const WebMouseEvent&);
void handleWheelEvent(const WebWheelEvent&, bool& handled);
void handleMouseEnterEvent(const WebMouseEvent&, bool& handled);
void handleMouseLeaveEvent(const WebMouseEvent&, bool& handled);
Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in (187113 => 187114)
--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in 2015-07-21 19:52:29 UTC (rev 187114)
@@ -63,7 +63,7 @@
ManualStreamDidFail(bool wasCancelled)
# Sent when a mouse event (that isn't a mouse enter/leave event or a wheel event) should be processed.
- HandleMouseEvent(WebKit::WebMouseEvent mouseEvent) -> (bool handled) Delayed
+ HandleMouseEvent(WebKit::WebMouseEvent mouseEvent)
# Sent when a mouse wheel event should be processed.
HandleWheelEvent(WebKit::WebWheelEvent wheelEvent) -> (bool handled)
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp (187113 => 187114)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp 2015-07-21 19:33:12 UTC (rev 187113)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp 2015-07-21 19:52:29 UTC (rev 187114)
@@ -366,11 +366,8 @@
if (m_waitingOnAsynchronousInitialization)
return false;
- bool handled = false;
- if (!m_connection->connection()->sendSync(Messages::PluginControllerProxy::HandleMouseEvent(mouseEvent), Messages::PluginControllerProxy::HandleMouseEvent::Reply(handled), m_pluginInstanceID))
- return false;
-
- return handled;
+ m_connection->connection()->send(Messages::PluginControllerProxy::HandleMouseEvent(mouseEvent), m_pluginInstanceID);
+ return true;
}
bool PluginProxy::handleWheelEvent(const WebWheelEvent& wheelEvent)