WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45692
REGRESSION (
r63339
): Mouse cursor disappears when holding mouse button down on page
https://bugs.webkit.org/show_bug.cgi?id=45692
Summary
REGRESSION (r63339): Mouse cursor disappears when holding mouse button down o...
Adam Roben (:aroben)
Reported
2010-09-13 11:33:36 PDT
To reproduce: 1. Hold the left mouse button down on any web page The mouse cursor disappears. This makes it hard to drag to select text or drag the scrollbar thumb.
Attachments
Always record the last-set cursor, even when the UI delegate is setting the cursor for us
(2.27 KB, patch)
2010-12-14 12:20 PST
,
Adam Roben (:aroben)
adachan
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2010-09-13 11:35:05 PDT
<
rdar://problem/8423469
>
Adam Roben (:aroben)
Comment 2
2010-09-15 08:17:15 PDT
r63339
seems awfully suspect: <
http://trac.webkit.org/changeset/63339
>
Adam Roben (:aroben)
Comment 3
2010-12-14 11:08:13 PST
The docs for SetCursor say <
http://msdn.microsoft.com/en-us/library/ms648393(v=vs.85).aspx
>:
> If this parameter is NULL, the cursor is removed from the screen.
That seems pretty likely. :-)
Adam Roben (:aroben)
Comment 4
2010-12-14 11:51:16 PST
I think the problem is that WebView::m_lastSetCursor isn't getting set when the UI delegate implements webViewSetCursor.
Adam Roben (:aroben)
Comment 5
2010-12-14 11:54:21 PST
For posterity: If you want to set a breakpoint when someone calls SetCusor(0), you can do it like this: 1. Add a new function breakpoint for {,,user32.dll}_NtUserSetFocus@4 2. Set the condition on the breakpoint to be: *(int*)(esp+4) == 0
Adam Roben (:aroben)
Comment 6
2010-12-14 12:20:36 PST
Created
attachment 76556
[details]
Always record the last-set cursor, even when the UI delegate is setting the cursor for us
Brian Weinstein
Comment 7
2010-12-14 12:29:27 PST
Comment on
attachment 76556
[details]
Always record the last-set cursor, even when the UI delegate is setting the cursor for us View in context:
https://bugs.webkit.org/attachment.cgi?id=76556&action=review
> WebKit/win/WebCoreSupport/WebChromeClient.cpp:810 > + ::SetCursor(platformCursor);
Is it useful to assert that the cursor is non-null here?
> WebKit/win/WebCoreSupport/WebChromeClient.cpp:812 > + setLastSetCursorToCurrentCursor();
Is there a reason this wasn't called before/was it called from somewhere else before this patch?
Adam Roben (:aroben)
Comment 8
2010-12-14 12:45:42 PST
Comment on
attachment 76556
[details]
Always record the last-set cursor, even when the UI delegate is setting the cursor for us View in context:
https://bugs.webkit.org/attachment.cgi?id=76556&action=review
>> WebKit/win/WebCoreSupport/WebChromeClient.cpp:810 >> + ::SetCursor(platformCursor); > > Is it useful to assert that the cursor is non-null here?
I don't think so. We already null-checked platformCursor on line 797 above.
>> WebKit/win/WebCoreSupport/WebChromeClient.cpp:812 >> + setLastSetCursorToCurrentCursor(); > > Is there a reason this wasn't called before/was it called from somewhere else before this patch?
Prior to this patch, m_webView->setLastCursor was called. setLastSetCursorToCurrentCursor() calls that same function, but passes it the result of ::GetCursor(), which should now return the cursor we (or the UI delegate) just passed to ::SetCursor.
Ada Chan
Comment 9
2010-12-14 12:58:19 PST
Comment on
attachment 76556
[details]
Always record the last-set cursor, even when the UI delegate is setting the cursor for us r=me
Adam Roben (:aroben)
Comment 10
2010-12-14 13:08:04 PST
Committed
r74055
: <
http://trac.webkit.org/changeset/74055
>
Adam Roben (:aroben)
Comment 11
2011-01-06 14:43:52 PST
(In reply to
comment #5
)
> 1. Add a new function breakpoint for {,,user32.dll}_NtUserSetFocus@4
That should be {,,user32.dll}_NTUserSetCursor@4
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug