Skip to content
  • jhoneycutt@apple.com's avatar
    Caret may fail to blink if a focus handler brings up a modal dialog · c902204b
    jhoneycutt@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=38372
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    * manual-tests/onfocus-alert-blinking-caret.html: Added.
    
    * page/EventHandler.cpp:
    (WebCore::EventHandler::handleMousePressEvent):
    Moved the call to setCaretBlinkingSuspended() from here...
    (WebCore::EventHandler::handleMousePressEvent):
    ... to here. This makes us suspend caret blinking before dispatching the
    mouse down event. If dispatching the mouse down event allows the message
    loop to run, we want mouse up events received in that message loop to be
    able to resume caret blinking.
    (WebCore::EventHandler::lostMouseCapture):
    We've lost mouse capture and won't be notified of mouse up events;
    resume caret blinking.
    
    * page/EventHandler.h:
    Declare lostMouseCapture().
    
    WebKit/win:
    
    * WebView.cpp:
    (WebView::handleMouseEvent):
    If the message is WM_CANCELMODE, which indicates that we our capturing
    of mouse events has been cancelled, tell the EventHandler.
    It's possible to re-enter this function if handling a mouse event allows
    the message loop to run; moved up the call to setMouseActivated(), so
    that if we do re-enter this function, the later mouse event will not be
    considered as activating the window.
    (WebView::WebViewWndProc):
    Handle WM_CANCELMODE by calling handleMouseEvent().
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c902204b