<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>45692</bug_id>
          
          <creation_ts>2010-09-13 11:33:36 -0700</creation_ts>
          <short_desc>REGRESSION (r63339): Mouse cursor disappears when holding mouse button down on page</short_desc>
          <delta_ts>2011-01-06 14:43:52 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>278341</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-09-13 11:33:36 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>278343</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-09-13 11:35:05 -0700</bug_when>
    <thetext>&lt;rdar://problem/8423469&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279552</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-09-15 08:17:15 -0700</bug_when>
    <thetext>r63339 seems awfully suspect: &lt;http://trac.webkit.org/changeset/63339&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322052</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-12-14 11:08:13 -0800</bug_when>
    <thetext>The docs for SetCursor say &lt;http://msdn.microsoft.com/en-us/library/ms648393(v=vs.85).aspx&gt;:

&gt; If this parameter is NULL, the cursor is removed from the screen.

That seems pretty likely. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322083</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-12-14 11:51:16 -0800</bug_when>
    <thetext>I think the problem is that WebView::m_lastSetCursor isn&apos;t getting set when the UI delegate implements webViewSetCursor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322087</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-12-14 11:54:21 -0800</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322107</commentid>
    <comment_count>6</comment_count>
      <attachid>76556</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-12-14 12:20:36 -0800</bug_when>
    <thetext>Created attachment 76556
Always record the last-set cursor, even when the UI delegate is setting the cursor for us</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322116</commentid>
    <comment_count>7</comment_count>
      <attachid>76556</attachid>
    <who name="Brian Weinstein">bweinstein</who>
    <bug_when>2010-12-14 12:29:27 -0800</bug_when>
    <thetext>Comment on attachment 76556
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&amp;action=review

&gt; WebKit/win/WebCoreSupport/WebChromeClient.cpp:810
&gt; +        ::SetCursor(platformCursor);

Is it useful to assert that the cursor is non-null here?

&gt; WebKit/win/WebCoreSupport/WebChromeClient.cpp:812
&gt; +    setLastSetCursorToCurrentCursor();

Is there a reason this wasn&apos;t called before/was it called from somewhere else before this patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322127</commentid>
    <comment_count>8</comment_count>
      <attachid>76556</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-12-14 12:45:42 -0800</bug_when>
    <thetext>Comment on attachment 76556
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&amp;action=review

&gt;&gt; WebKit/win/WebCoreSupport/WebChromeClient.cpp:810
&gt;&gt; +        ::SetCursor(platformCursor);
&gt; 
&gt; Is it useful to assert that the cursor is non-null here?

I don&apos;t think so. We already null-checked platformCursor on line 797 above.

&gt;&gt; WebKit/win/WebCoreSupport/WebChromeClient.cpp:812
&gt;&gt; +    setLastSetCursorToCurrentCursor();
&gt; 
&gt; Is there a reason this wasn&apos;t called before/was it called from somewhere else before this patch?

Prior to this patch, m_webView-&gt;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322138</commentid>
    <comment_count>9</comment_count>
      <attachid>76556</attachid>
    <who name="Ada Chan">adachan</who>
    <bug_when>2010-12-14 12:58:19 -0800</bug_when>
    <thetext>Comment on attachment 76556
Always record the last-set cursor, even when the UI delegate is setting the cursor for us

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322145</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-12-14 13:08:04 -0800</bug_when>
    <thetext>Committed r74055: &lt;http://trac.webkit.org/changeset/74055&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>330438</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-01-06 14:43:52 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; 1. Add a new function breakpoint for {,,user32.dll}_NtUserSetFocus@4

That should be {,,user32.dll}_NTUserSetCursor@4</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>76556</attachid>
            <date>2010-12-14 12:20:36 -0800</date>
            <delta_ts>2010-12-14 12:58:19 -0800</delta_ts>
            <desc>Always record the last-set cursor, even when the UI delegate is setting the cursor for us</desc>
            <filename>bug-45692-20101214152034.patch</filename>
            <type>text/plain</type>
            <size>2321</size>
            <attacher name="Adam Roben (:aroben)">aroben</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdC93aW4vQ2hhbmdlTG9nIGIvV2ViS2l0L3dpbi9DaGFuZ2VMb2cK
aW5kZXggZDRjZWI2N2IyNjgwZDMyOTQzOTc3Y2U3MjM4OGI5MTY3MmFhMTJmYi4uYTBiYTdmMTRh
MjQ5YzgxOGNjZThiY2U5MDc4ODc0ZWQ2ZDUwMjU0YSAxMDA2NDQKLS0tIGEvV2ViS2l0L3dpbi9D
aGFuZ2VMb2cKKysrIGIvV2ViS2l0L3dpbi9DaGFuZ2VMb2cKQEAgLTEsMyArMSwyNCBAQAorMjAx
MC0xMi0xNCAgQWRhbSBSb2JlbiAgPGFyb2JlbkBhcHBsZS5jb20+CisKKyAgICAgICAgQWx3YXlz
IHJlY29yZCB0aGUgbGFzdC1zZXQgY3Vyc29yLCBldmVuIHdoZW4gdGhlIFVJIGRlbGVnYXRlIGlz
CisgICAgICAgIHNldHRpbmcgdGhlIGN1cnNvciBmb3IgdXMKKworICAgICAgICBQcmlvci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AgICAgcmV0dXJu
OworICAgICAgICAgICAgICAgIHNob3VsZFNldEN1cnNvciA9IGZhbHNlOwogICAgICAgICB9CiAg
ICAgfQogCi0gICAgbV93ZWJWaWV3LT5zZXRMYXN0Q3Vyc29yKHBsYXRmb3JtQ3Vyc29yKTsKLSAg
ICA6OlNldEN1cnNvcihwbGF0Zm9ybUN1cnNvcik7Ci0gICAgcmV0dXJuOworICAgIGlmIChzaG91
bGRTZXRDdXJzb3IpCisgICAgICAgIDo6U2V0Q3Vyc29yKHBsYXRmb3JtQ3Vyc29yKTsKKworICAg
IHNldExhc3RTZXRDdXJzb3JUb0N1cnJlbnRDdXJzb3IoKTsKIH0KIAogdm9pZCBXZWJDaHJvbWVD
bGllbnQ6OnNldExhc3RTZXRDdXJzb3JUb0N1cnJlbnRDdXJzb3IoKQo=
</data>
<flag name="review"
          id="67530"
          type_id="1"
          status="+"
          setter="adachan"
    />
          </attachment>
      

    </bug>

</bugzilla>