Changeset 182026 in webkit


Ignore:
Timestamp:
Mar 26, 2015 2:43:21 PM (9 years ago)
Author:
rniwa@webkit.org
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):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r181906 r182026  
     12015-03-26  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Cursor doesn't change back to pointer when leaving Mail
     4        https://bugs.webkit.org/show_bug.cgi?id=132038
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
     9        AppKit will reset the cursor as it leaves the WebView.
     10
     11        We use nil cursor here since we manually update the cursor by calling [NSCursor set].
     12
     13        * WebView/WebHTMLView.mm:
     14        (-[WebHTMLView setDataSource:]): Use NSTrackingCursorUpdate option in creating the primary tracking area.
     15
    1162015-03-24  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebKit/mac/WebView/WebHTMLView.mm

    r181760 r182026  
    42274227#if !PLATFORM(IOS)
    42284228    if (!_private->installedTrackingArea) {
    4229         NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
     4229        NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
    42304230        if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy
    42314231#if ENABLE(DASHBOARD_SUPPORT)
  • trunk/Source/WebKit2/ChangeLog

    r182021 r182026  
     12015-03-26  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Cursor doesn't change back to pointer when leaving Mail
     4        https://bugs.webkit.org/show_bug.cgi?id=132038
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
     9        AppKit will reset the cursor as it leaves the WebView.
     10
     11        We use nil cursor here since we manually update the cursor by calling [NSCursor set].
     12
     13        * UIProcess/API/mac/WKView.mm:
     14        (-[WKView initWithFrame:processPool:configuration:webView:]):
     15        * UIProcess/mac/PageClientImpl.mm:
     16        (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
     17
    1182015-03-26  Michael Catanzaro  <mcatanzaro@igalia.com>
    219
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r181985 r182026  
    37243724
    37253725    // Legacy style scrollbars have design details that rely on tracking the mouse all the time.
    3726     NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
     3726    NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
    37273727    if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy)
    37283728        options |= NSTrackingActiveAlways;
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm

    r181777 r182026  
    628628{
    629629    // Now re-create a tracking area with the appropriate options given the new scrollbar style
    630     NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
     630    NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
    631631    if (newStyle == ScrollbarStyle::AlwaysVisible)
    632632        options |= NSTrackingActiveAlways;
Note: See TracChangeset for help on using the changeset viewer.