Changeset 225494 in webkit


Ignore:
Timestamp:
Dec 4, 2017 2:47:04 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Cursor is not visible after exiting full screen video
https://bugs.webkit.org/show_bug.cgi?id=180247
<rdar://problem/33885922>

Patch by Antoine Quint <Antoine Quint> on 2017-12-04
Reviewed by Dean Jackson.

Source/WebCore:

There is a dedicated NSCursor method to temporarily hide the mouse cursor while the mouse is idle,
so we use this platform functionality, already exposed through the page chrome, instead which
implements the expected behavior. Now, the mouse cursor is hidden while the mouse is stationary
when a <video> is fullscreen, as before, but as soon as the user exits fullscreen, the mouse cursor
reappears.

No test provided as I don't believe this platform behavior can be tested, there is no API to query
whether the cursor is visible.

  • page/EventHandler.cpp:

(WebCore::EventHandler::cancelAutoHideCursorTimer):
(WebCore::EventHandler::autoHideCursorTimerFired):

LayoutTests:

Remove the existing test which would query a cursor state that is no longer relevant.

  • fullscreen/video-cursor-auto-hide-expected.txt: Removed.
  • fullscreen/video-cursor-auto-hide.html: Removed.
  • platform/gtk/TestExpectations:
Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r225489 r225494  
     12017-12-04  Antoine Quint  <graouts@apple.com>
     2
     3        Cursor is not visible after exiting full screen video
     4        https://bugs.webkit.org/show_bug.cgi?id=180247
     5        <rdar://problem/33885922>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Remove the existing test which would query a cursor state that is no longer relevant.
     10
     11        * fullscreen/video-cursor-auto-hide-expected.txt: Removed.
     12        * fullscreen/video-cursor-auto-hide.html: Removed.
     13        * platform/gtk/TestExpectations:
     14
    1152017-12-04  Michael Catanzaro  <mcatanzaro@igalia.com>
    216
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r225489 r225494  
    904904webkit.org/b/85958 fast/forms/file/file-input-capture.html [ Failure ]
    905905
    906 # CURSOR_VISIBILITY is not enabled in gtk
    907 webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
    908 
    909906webkit.org/b/146718 accessibility/aria-hidden-false-works-in-subtrees.html [ Failure ]
    910907
  • trunk/Source/WebCore/ChangeLog

    r225491 r225494  
     12017-12-04  Antoine Quint  <graouts@apple.com>
     2
     3        Cursor is not visible after exiting full screen video
     4        https://bugs.webkit.org/show_bug.cgi?id=180247
     5        <rdar://problem/33885922>
     6
     7        Reviewed by Dean Jackson.
     8
     9        There is a dedicated NSCursor method to temporarily hide the mouse cursor while the mouse is idle,
     10        so we use this platform functionality, already exposed through the page chrome, instead which
     11        implements the expected behavior. Now, the mouse cursor is hidden while the mouse is stationary
     12        when a <video> is fullscreen, as before, but as soon as the user exits fullscreen, the mouse cursor
     13        reappears.
     14
     15        No test provided as I don't believe this platform behavior can be tested, there is no API to query
     16        whether the cursor is visible.
     17
     18        * page/EventHandler.cpp:
     19        (WebCore::EventHandler::cancelAutoHideCursorTimer):
     20        (WebCore::EventHandler::autoHideCursorTimerFired):
     21
    1222017-12-04  Chris Dumez  <cdumez@apple.com>
    223
  • trunk/Source/WebCore/page/EventHandler.cpp

    r224740 r225494  
    15901590    if (m_autoHideCursorTimer.isActive())
    15911591        m_autoHideCursorTimer.stop();
     1592
     1593    if (auto page = m_frame.page())
     1594        page->chrome().setCursorHiddenUntilMouseMoves(false);
    15921595}
    15931596
    15941597void EventHandler::autoHideCursorTimerFired()
    15951598{
    1596     m_currentMouseCursor = noneCursor();
    15971599    FrameView* view = m_frame.view();
    1598     if (view && view->isActive())
    1599         view->setCursor(m_currentMouseCursor);
     1600    if (!view || !view->isActive())
     1601        return;
     1602
     1603    if (auto page = m_frame.page())
     1604        page->chrome().setCursorHiddenUntilMouseMoves(true);
    16001605}
    16011606#endif
Note: See TracChangeset for help on using the changeset viewer.