Title: [196631] trunk/Source/WebCore
Revision
196631
Author
[email protected]
Date
2016-02-16 01:45:41 -0800 (Tue, 16 Feb 2016)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (196630 => 196631)


--- trunk/Source/WebCore/ChangeLog	2016-02-16 09:33:27 UTC (rev 196630)
+++ trunk/Source/WebCore/ChangeLog	2016-02-16 09:45:41 UTC (rev 196631)
@@ -1,3 +1,23 @@
+2016-02-16  Carlos Garcia Campos  <[email protected]>
+
+        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.
+
 2016-02-15  Antti Koivisto  <[email protected]>
 
         Optimize style invalidations for attribute selectors

Modified: trunk/Source/WebCore/page/EventHandler.cpp (196630 => 196631)


--- trunk/Source/WebCore/page/EventHandler.cpp	2016-02-16 09:33:27 UTC (rev 196630)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2016-02-16 09:45:41 UTC (rev 196631)
@@ -1338,7 +1338,7 @@
     bool metaKey;
     PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey, altKey, metaKey);
 
-    HitTestRequest request(HitTestRequest::ReadOnly);
+    HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::AllowFrameScrollbars);
     HitTestResult result(view->windowToContents(m_lastKnownMousePosition));
     renderView->hitTest(request, result);
 
@@ -1362,6 +1362,14 @@
         return NoCursorChange;
 #endif
 
+    // Use always pointer cursor for scrollbars.
+    if (result.scrollbar()) {
+#if ENABLE(CURSOR_VISIBILITY)
+        cancelAutoHideCursorTimer();
+#endif
+        return pointerCursor();
+    }
+
     Node* node = result.targetNode();
     if (!node)
         return NoCursorChange;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to