Changeset 74055 in webkit


Ignore:
Timestamp:
Dec 14, 2010 1:06:24 PM (13 years ago)
Author:
Adam Roben
Message:

Always record the last-set cursor, even when the UI delegate is setting the cursor for us

Prior to r63339, the last-set cursor was recorded in Widget::setCursor.
r63339 moved that code up to WebChromeClient, but failed to call it
when the UI delegate was the one setting the cursor.

Fixes <http://webkit.org/b/45692> <rdar://problem/8423464> REGRESSION
(r63339): Mouse cursor disappears when holding mouse button down on
page

Reviewed by Ada Chan.

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::setCursor): After the cursor is set, regardless of
whether the UI delegate sets it or we set it, record the cursor that
was just set. That way we'll be able to use the cursor later when
responding to the WM_SETCURSOR message.

Location:
trunk/WebKit/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/win/ChangeLog

    r74041 r74055  
     12010-12-14  Adam Roben  <aroben@apple.com>
     2
     3        Always record the last-set cursor, even when the UI delegate is
     4        setting the cursor for us
     5
     6        Prior to r63339, the last-set cursor was recorded in Widget::setCursor.
     7        r63339 moved that code up to WebChromeClient, but failed to call it
     8        when the UI delegate was the one setting the cursor.
     9
     10        Fixes <http://webkit.org/b/45692> <rdar://problem/8423464> REGRESSION
     11        (r63339): Mouse cursor disappears when holding mouse button down on
     12        page
     13
     14        Reviewed by Ada Chan.
     15
     16        * WebCoreSupport/WebChromeClient.cpp:
     17        (WebChromeClient::setCursor): After the cursor is set, regardless of
     18        whether the UI delegate sets it or we set it, record the cursor that
     19        was just set. That way we'll be able to use the cursor later when
     20        responding to the WM_SETCURSOR message.
     21
    1222010-12-13  Alexey Proskuryakov  <ap@apple.com>
    223
  • trunk/WebKit/win/WebCoreSupport/WebChromeClient.cpp

    r73163 r74055  
    798798        return;
    799799
     800    bool shouldSetCursor = true;
    800801    if (COMPtr<IWebUIDelegate> delegate = uiDelegate()) {
    801802        COMPtr<IWebUIDelegatePrivate> delegatePrivate(Query, delegate);
    802803        if (delegatePrivate) {
    803804            if (SUCCEEDED(delegatePrivate->webViewSetCursor(m_webView, reinterpret_cast<OLE_HANDLE>(platformCursor))))
    804                 return;
     805                shouldSetCursor = false;
    805806        }
    806807    }
    807808
    808     m_webView->setLastCursor(platformCursor);
    809     ::SetCursor(platformCursor);
    810     return;
     809    if (shouldSetCursor)
     810        ::SetCursor(platformCursor);
     811
     812    setLastSetCursorToCurrentCursor();
    811813}
    812814
Note: See TracChangeset for help on using the changeset viewer.