Title: [182026] trunk/Source
Revision
182026
Author
[email protected]
Date
2015-03-26 14:43:21 -0700 (Thu, 26 Mar 2015)

Log Message

Cursor doesn't change back to pointer when leaving Mail
https://bugs.webkit.org/show_bug.cgi?id=132038

Reviewed by Anders Carlsson.

Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
AppKit will reset the cursor as it leaves the WebView.

We use nil cursor here since we manually update the cursor by calling [NSCursor set].

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView setDataSource:]): Use NSTrackingCursorUpdate option in creating the primary tracking area.

Source/WebKit2:

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (182025 => 182026)


--- trunk/Source/WebKit/mac/ChangeLog	2015-03-26 21:30:16 UTC (rev 182025)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-03-26 21:43:21 UTC (rev 182026)
@@ -1,3 +1,18 @@
+2015-03-26  Ryosuke Niwa  <[email protected]>
+
+        Cursor doesn't change back to pointer when leaving Mail
+        https://bugs.webkit.org/show_bug.cgi?id=132038
+
+        Reviewed by Anders Carlsson.
+
+        Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
+        AppKit will reset the cursor as it leaves the WebView.
+
+        We use nil cursor here since we manually update the cursor by calling [NSCursor set].
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView setDataSource:]): Use NSTrackingCursorUpdate option in creating the primary tracking area.
+
 2015-03-24  Anders Carlsson  <[email protected]>
 
         Fix designated initializer violations

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (182025 => 182026)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-03-26 21:30:16 UTC (rev 182025)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-03-26 21:43:21 UTC (rev 182026)
@@ -4226,7 +4226,7 @@
 
 #if !PLATFORM(IOS)
     if (!_private->installedTrackingArea) {
-        NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
+        NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
         if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy
 #if ENABLE(DASHBOARD_SUPPORT)
             || [[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows]

Modified: trunk/Source/WebKit2/ChangeLog (182025 => 182026)


--- trunk/Source/WebKit2/ChangeLog	2015-03-26 21:30:16 UTC (rev 182025)
+++ trunk/Source/WebKit2/ChangeLog	2015-03-26 21:43:21 UTC (rev 182026)
@@ -1,3 +1,20 @@
+2015-03-26  Ryosuke Niwa  <[email protected]>
+
+        Cursor doesn't change back to pointer when leaving Mail
+        https://bugs.webkit.org/show_bug.cgi?id=132038
+
+        Reviewed by Anders Carlsson.
+
+        Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
+        AppKit will reset the cursor as it leaves the WebView.
+
+        We use nil cursor here since we manually update the cursor by calling [NSCursor set].
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView initWithFrame:processPool:configuration:webView:]):
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
+
 2015-03-26  Michael Catanzaro  <[email protected]>
 
         [Linux] SeccompFilters: improve the port-agnostic whitelist

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (182025 => 182026)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2015-03-26 21:30:16 UTC (rev 182025)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2015-03-26 21:43:21 UTC (rev 182026)
@@ -3723,7 +3723,7 @@
     InitializeWebKit2();
 
     // Legacy style scrollbars have design details that rely on tracking the mouse all the time.
-    NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
+    NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
     if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy)
         options |= NSTrackingActiveAlways;
     else

Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (182025 => 182026)


--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm	2015-03-26 21:30:16 UTC (rev 182025)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm	2015-03-26 21:43:21 UTC (rev 182026)
@@ -627,7 +627,7 @@
 void PageClientImpl::recommendedScrollbarStyleDidChange(ScrollbarStyle newStyle)
 {
     // Now re-create a tracking area with the appropriate options given the new scrollbar style
-    NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
+    NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
     if (newStyle == ScrollbarStyle::AlwaysVisible)
         options |= NSTrackingActiveAlways;
     else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to