Skip to content
Permalink
Browse files
Infinite loop when processing mouse events synchronously
https://bugs.webkit.org/show_bug.cgi?id=153995

Reviewed by Darin Adler.

This happened with WTR in the GTK+ port after landing patch in bug
#153740. The thing is that WTR forces events handling IPC messages
to be synchronous. When a drag and drop operation is in progress,
the web process ignores mouse move events and replies with
DidReceiveEvent signal. The DidReceiveEvent message handler in
WebPageProxy checks if we have a m_nextMouseMoveEvent and handles
it, but when all this happens synchronously the
m_nextMouseMoveEvent is the current one because we haven't
returned yet from handleMouseEvent(). We need to invalidate the
m_nextMouseMoveEvent before calling handleMouseEvent().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):

Canonical link: https://commits.webkit.org/172091@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Feb 8, 2016
1 parent 77f4323 commit 06bcd5531946fd6728da192e9eba56bceaf8a6b0
Showing with 23 additions and 4 deletions.
  1. +21 −0 Source/WebKit2/ChangeLog
  2. +2 −4 Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1,3 +1,24 @@
2016-02-08 Carlos Garcia Campos <cgarcia@igalia.com>

Infinite loop when processing mouse events synchronously
https://bugs.webkit.org/show_bug.cgi?id=153995

Reviewed by Darin Adler.

This happened with WTR in the GTK+ port after landing patch in bug
#153740. The thing is that WTR forces events handling IPC messages
to be synchronous. When a drag and drop operation is in progress,
the web process ignores mouse move events and replies with
DidReceiveEvent signal. The DidReceiveEvent message handler in
WebPageProxy checks if we have a m_nextMouseMoveEvent and handles
it, but when all this happens synchronously the
m_nextMouseMoveEvent is the current one because we haven't
returned yet from handleMouseEvent(). We need to invalidate the
m_nextMouseMoveEvent before calling handleMouseEvent().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):

2016-02-08 Jeremy Jones <jeremyj@apple.com>

Remove __weak from WKAirPlayRoutePicker.mm to fix build warning.
@@ -4576,10 +4576,8 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
break;
case WebEvent::MouseMove:
m_processingMouseMoveEvent = false;
if (m_nextMouseMoveEvent) {
handleMouseEvent(*m_nextMouseMoveEvent);
m_nextMouseMoveEvent = nullptr;
}
if (m_nextMouseMoveEvent)
handleMouseEvent(*std::exchange(m_nextMouseMoveEvent, nullptr));
break;
case WebEvent::MouseDown:
break;

0 comments on commit 06bcd55

Please sign in to comment.