Changeset 236286 in webkit


Ignore:
Timestamp:
Sep 20, 2018 3:05:49 PM (6 years ago)
Author:
sihui_liu@apple.com
Message:

REGRESSION(r196265): WKWebView fires mouseover, mouseenter, and mouseleave events even when it's in a background window
https://bugs.webkit.org/show_bug.cgi?id=187545
<rdar://problem/42401575>

Reviewed by Ryosuke Niwa.

Source/WebCore:

When the window is not active, we should only update the scrollbar for mouse events. GTK
apps have different expectation on this behavior.

Test: fast/events/inactive-window-no-mouse-event.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::shouldSendMouseEventsToInactiveWindows const):

  • page/EventHandler.h:

LayoutTests:

  • TestExpectations:
  • fast/events/inactive-window-no-mouse-event-expected.txt: Added.
  • fast/events/inactive-window-no-mouse-event.html: Added.
  • platform/mac-wk2/TestExpectations:
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r236285 r236286  
     12018-09-20  Sihui Liu  <sihui_liu@apple.com>
     2
     3        REGRESSION(r196265): WKWebView fires mouseover, mouseenter, and mouseleave events even when it's in a background window
     4        https://bugs.webkit.org/show_bug.cgi?id=187545
     5        <rdar://problem/42401575>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        * TestExpectations:
     10        * fast/events/inactive-window-no-mouse-event-expected.txt: Added.
     11        * fast/events/inactive-window-no-mouse-event.html: Added.
     12        * platform/mac-wk2/TestExpectations:
     13
    1142018-09-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
    215
  • trunk/LayoutTests/TestExpectations

    r236277 r236286  
    404404
    405405fast/misc/valid-primary-screen-displayID.html [ Skip ]
     406
     407# This test currently only works for mac-wk2
     408fast/events/inactive-window-no-mouse-event.html [ Skip ]
    406409
    407410#//////////////////////////////////////////////////////////////////////////////////////////
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r236282 r236286  
    6262webkit.org/b/184569 storage/indexeddb/modern/transactions-stop-on-navigation.html [ Pass Failure ]
    6363
     64
     65fast/events/inactive-window-no-mouse-event.html [ Pass ]
    6466
    6567#//////////////////////////////////////////////////////////////////////////////////////////
  • trunk/Source/WebCore/ChangeLog

    r236284 r236286  
     12018-09-20  Sihui Liu  <sihui_liu@apple.com>
     2
     3        REGRESSION(r196265): WKWebView fires mouseover, mouseenter, and mouseleave events even when it's in a background window
     4        https://bugs.webkit.org/show_bug.cgi?id=187545
     5        <rdar://problem/42401575>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        When the window is not active, we should only update the scrollbar for mouse events. GTK
     10        apps have different expectation on this behavior.
     11
     12        Test: fast/events/inactive-window-no-mouse-event.html
     13
     14        * page/EventHandler.cpp:
     15        (WebCore::EventHandler::handleMouseMoveEvent):
     16        (WebCore::EventHandler::shouldSendMouseEventsToInactiveWindows const):
     17        * page/EventHandler.h:
     18
    1192018-09-20  Alex Christensen  <achristensen@webkit.org>
    220
  • trunk/Source/WebCore/page/EventHandler.cpp

    r235865 r236286  
    19661966#endif
    19671967        if (onlyUpdateScrollbars) {
    1968             updateMouseEventTargetNode(mouseEvent.targetNode(), platformMouseEvent, true);
     1968            if (shouldSendMouseEventsToInactiveWindows())
     1969                updateMouseEventTargetNode(mouseEvent.targetNode(), platformMouseEvent, true);
     1970
    19691971            return true;
    19701972        }
     
    20072009
    20082010    return swallowEvent;
     2011}
     2012
     2013bool EventHandler::shouldSendMouseEventsToInactiveWindows() const
     2014{
     2015#if PLATFORM(GTK)
     2016    return true;
     2017#endif
     2018    return false;
    20092019}
    20102020
  • trunk/Source/WebCore/page/EventHandler.h

    r234930 r236286  
    494494    void clearLatchedState();
    495495
     496    bool shouldSendMouseEventsToInactiveWindows() const;
     497
    496498    Frame& m_frame;
    497499
Note: See TracChangeset for help on using the changeset viewer.