Changeset 196631 in webkit


Ignore:
Timestamp:
Feb 16, 2016 1:45:41 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

Mouse cursor doesn't change when entering scrollbars
https://bugs.webkit.org/show_bug.cgi?id=154243

Reviewed by Simon Fraser.

If the scrollbar is over or very close to text or a link, when
entering the scrollbar the cursor is not changed, keeping the beam
or hand cursor when using the scrollbar. Same happens for image
documents where the magnifier cursor is used and it remains when
entering the scrollbars. We should use pointer cursor always for
scrollbars.

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateCursor): Request also to include
frame scrollbars in hit test result.
(WebCore::EventHandler::selectCursor): Use always pointer cursor
for scrollbars.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r196629 r196631  
     12016-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Mouse cursor doesn't change when entering scrollbars
     4        https://bugs.webkit.org/show_bug.cgi?id=154243
     5
     6        Reviewed by Simon Fraser.
     7
     8        If the scrollbar is over or very close to text or a link, when
     9        entering the scrollbar the cursor is not changed, keeping the beam
     10        or hand cursor when using the scrollbar. Same happens for image
     11        documents where the magnifier cursor is used and it remains when
     12        entering the scrollbars. We should use pointer cursor always for
     13        scrollbars.
     14
     15        * page/EventHandler.cpp:
     16        (WebCore::EventHandler::updateCursor): Request also to include
     17        frame scrollbars in hit test result.
     18        (WebCore::EventHandler::selectCursor): Use always pointer cursor
     19        for scrollbars.
     20
    1212016-02-15  Antti Koivisto  <antti@apple.com>
    222
  • trunk/Source/WebCore/page/EventHandler.cpp

    r196520 r196631  
    13391339    PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey, altKey, metaKey);
    13401340
    1341     HitTestRequest request(HitTestRequest::ReadOnly);
     1341    HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::AllowFrameScrollbars);
    13421342    HitTestResult result(view->windowToContents(m_lastKnownMousePosition));
    13431343    renderView->hitTest(request, result);
     
    13621362        return NoCursorChange;
    13631363#endif
     1364
     1365    // Use always pointer cursor for scrollbars.
     1366    if (result.scrollbar()) {
     1367#if ENABLE(CURSOR_VISIBILITY)
     1368        cancelAutoHideCursorTimer();
     1369#endif
     1370        return pointerCursor();
     1371    }
    13641372
    13651373    Node* node = result.targetNode();
Note: See TracChangeset for help on using the changeset viewer.