Changeset 196264 in webkit


Ignore:
Timestamp:
Feb 8, 2016 11:41:09 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r196260 r196264  
     12016-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Infinite loop when processing mouse events synchronously
     4        https://bugs.webkit.org/show_bug.cgi?id=153995
     5
     6        Reviewed by Darin Adler.
     7
     8        This happened with WTR in the GTK+ port after landing patch in bug
     9        #153740. The thing is that WTR forces events handling IPC messages
     10        to be synchronous. When a drag and drop operation is in progress,
     11        the web process ignores mouse move events and replies with
     12        DidReceiveEvent signal. The DidReceiveEvent message handler in
     13        WebPageProxy checks if we have a m_nextMouseMoveEvent and handles
     14        it, but when all this happens synchronously the
     15        m_nextMouseMoveEvent is the current one because we haven't
     16        returned yet from handleMouseEvent(). We need to invalidate the
     17        m_nextMouseMoveEvent before calling handleMouseEvent().
     18
     19        * UIProcess/WebPageProxy.cpp:
     20        (WebKit::WebPageProxy::didReceiveEvent):
     21
    1222016-02-08  Jeremy Jones  <jeremyj@apple.com>
    223
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r196223 r196264  
    45774577    case WebEvent::MouseMove:
    45784578        m_processingMouseMoveEvent = false;
    4579         if (m_nextMouseMoveEvent) {
    4580             handleMouseEvent(*m_nextMouseMoveEvent);
    4581             m_nextMouseMoveEvent = nullptr;
    4582         }
     4579        if (m_nextMouseMoveEvent)
     4580            handleMouseEvent(*std::exchange(m_nextMouseMoveEvent, nullptr));
    45834581        break;
    45844582    case WebEvent::MouseDown:
Note: See TracChangeset for help on using the changeset viewer.