<?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>196511</bug_id>
          
          <creation_ts>2019-04-02 15:41:44 -0700</creation_ts>
          <short_desc>Cursor count badge reverts to Zero during Drag &amp; Drop of multiple items</short_desc>
          <delta_ts>2019-04-03 11:36:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=181081</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>chudesno</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>jonlee</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1523498</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-04-02 15:41:44 -0700</bug_when>
    <thetext>When you drag &amp; drop multiple files to iCloud Drive or a text field, the mouse cursor gives a Zero (0) file count, regardless of the number of files you have.

&lt;rdar://problem/34373187&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523499</commentid>
    <comment_count>1</comment_count>
      <attachid>366545</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-04-02 15:43:19 -0700</bug_when>
    <thetext>Created attachment 366545
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523582</commentid>
    <comment_count>2</comment_count>
      <attachid>366545</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2019-04-02 19:58:23 -0700</bug_when>
    <thetext>Comment on attachment 366545
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366545&amp;action=review

Bade is UI. So, likely no way to test.

&gt; Source/WebCore/page/DragController.cpp:-464
&gt; -            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;

I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. &lt;—- not cq’ing because of this</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523589</commentid>
    <comment_count>3</comment_count>
      <attachid>366545</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-04-02 20:19:57 -0700</bug_when>
    <thetext>Comment on attachment 366545
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366545&amp;action=review

&gt;&gt; Source/WebCore/page/DragController.cpp:-464
&gt;&gt; -            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
&gt; 
&gt; I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. &lt;—- not cq’ing because of this

This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out.

https://trac.webkit.org/changeset/99108/webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523595</commentid>
    <comment_count>4</comment_count>
      <attachid>366545</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-04-02 20:46:42 -0700</bug_when>
    <thetext>Comment on attachment 366545
Patch

Clearing flags on attachment: 366545

Committed r243785: &lt;https://trac.webkit.org/changeset/243785&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523596</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-04-02 20:46:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523602</commentid>
    <comment_count>6</comment_count>
      <attachid>366545</attachid>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2019-04-02 20:59:37 -0700</bug_when>
    <thetext>Comment on attachment 366545
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366545&amp;action=review

&gt;&gt;&gt; Source/WebCore/page/DragController.cpp:-464
&gt;&gt;&gt; -            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
&gt;&gt; 
&gt;&gt; I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. &lt;—- not cq’ing because of this
&gt; 
&gt; This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out.
&gt; 
&gt; https://trac.webkit.org/changeset/99108/webkit

We should ensure that dragging multiple files over a regular input type=file does not cause the drop to occur.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523603</commentid>
    <comment_count>7</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2019-04-02 21:00:12 -0700</bug_when>
    <thetext>(In reply to Wenson Hsieh from comment #6)
&gt; Comment on attachment 366545 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=366545&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WebCore/page/DragController.cpp:-464
&gt; &gt;&gt;&gt; -            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
&gt; &gt;&gt; 
&gt; &gt;&gt; I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. &lt;—- not cq’ing because of this
&gt; &gt; 
&gt; &gt; This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out.
&gt; &gt; 
&gt; &gt; https://trac.webkit.org/changeset/99108/webkit
&gt; 
&gt; We should ensure that dragging multiple files over a regular input type=file
&gt; does not cause the drop to occur.

(Regular file input, as opposed to an &lt;input type=file multiple&gt;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523604</commentid>
    <comment_count>8</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2019-04-02 21:10:57 -0700</bug_when>
    <thetext>(In reply to Wenson Hsieh from comment #7)
&gt; (In reply to Wenson Hsieh from comment #6)
&gt; &gt; Comment on attachment 366545 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; https://bugs.webkit.org/attachment.cgi?id=366545&amp;action=review
&gt; &gt; 
&gt; &gt; &gt;&gt;&gt; Source/WebCore/page/DragController.cpp:-464
&gt; &gt; &gt;&gt;&gt; -            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
&gt; &gt; &gt;&gt; 
&gt; &gt; &gt;&gt; I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. &lt;—- not cq’ing because of this
&gt; &gt; &gt; 
&gt; &gt; &gt; This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out.
&gt; &gt; &gt; 
&gt; &gt; &gt; https://trac.webkit.org/changeset/99108/webkit
&gt; &gt; 
&gt; &gt; We should ensure that dragging multiple files over a regular input type=file
&gt; &gt; does not cause the drop to occur.
&gt; 
&gt; (Regular file input, as opposed to an &lt;input type=file multiple&gt;)

Oh sorry, I misread the branch. The change looks right — I can&apos;t think of any reason why we wouldn&apos;t want to update m_numberOfItemsToBeAccepted when dragging a single file, when we&apos;re not dropping over a file input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523609</commentid>
    <comment_count>9</comment_count>
      <attachid>366545</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-04-02 21:25:04 -0700</bug_when>
    <thetext>Comment on attachment 366545
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366545&amp;action=review

&gt;&gt;&gt;&gt;&gt;&gt; Source/WebCore/page/DragController.cpp:-464
&gt;&gt;&gt;&gt;&gt;&gt; -            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
&gt;&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt;&gt; I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. &lt;—- not cq’ing because of this
&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt; This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out.
&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt; https://trac.webkit.org/changeset/99108/webkit
&gt;&gt;&gt; 
&gt;&gt;&gt; We should ensure that dragging multiple files over a regular input type=file does not cause the drop to occur.
&gt;&gt; 
&gt;&gt; (Regular file input, as opposed to an &lt;input type=file multiple&gt;)
&gt; 
&gt; Oh sorry, I misread the branch. The change looks right — I can&apos;t think of any reason why we wouldn&apos;t want to update m_numberOfItemsToBeAccepted when dragging a single file, when we&apos;re not dropping over a file input.

Yep, the if (m_fileInputElementUnderMouse) block handles that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523775</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-04-03 10:24:51 -0700</bug_when>
    <thetext>Is this the same as bug 181081?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523810</commentid>
    <comment_count>11</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-04-03 11:32:01 -0700</bug_when>
    <thetext>*** Bug 181081 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1523814</commentid>
    <comment_count>12</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2019-04-03 11:36:04 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #10)
&gt; Is this the same as bug 181081?

Yes.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>366545</attachid>
            <date>2019-04-02 15:43:19 -0700</date>
            <delta_ts>2019-04-02 20:46:42 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-196511-20190402154315.patch</filename>
            <type>text/plain</type>
            <size>2356</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQzNzQ2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZWZiMmM4ODZkZDQ5ODNj
N2NlOWUyZjQxNTFhZWEyZjhiYmViZWY2My4uN2NiYmFlNDk5YTkzODY4NDM3YWMwOTI5MGY5YWUy
N2FjZDgzMzQ1NCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE0IEBACisyMDE5LTA0LTAyICBUaW1v
dGh5IEhhdGNoZXIgIDx0aW1vdGh5QGFwcGxlLmNvbT4KKworICAgICAgICBDdXJzb3IgY291bnQg
YmFkZ2UgcmV2ZXJ0cyB0byBaZXJvIGR1cmluZyBEcmFnICYgRHJ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lZCBpdGVtcyBpcyAxLgotICAgICAgICAgICAgbV9udW1iZXJP
Zkl0ZW1zVG9CZUFjY2VwdGVkID0gbnVtYmVyT2ZGaWxlcyAhPSAxID8gMCA6IDE7CisgICAgICAg
ICAgICAvLyBXZSBhcmUgbm90IG92ZXIgYSBmaWxlIGlucHV0IGVsZW1lbnQuIFRoZSBkcmFnZ2Vk
IGl0ZW0ocykgd2lsbCBsb2FkZWQgaW50byB0aGUgdmlldywKKyAgICAgICAgICAgIC8vIGRyb3Bw
ZWQgYXMgdGV4dCBwYXRocyBvbiBvdGhlciBpbnB1dCBlbGVtZW50cywgb3IgaGFuZGxlZCBieSBz
Y3JpcHQgb24gdGhlIHBhZ2UuCisgICAgICAgICAgICBtX251bWJlck9mSXRlbXNUb0JlQWNjZXB0
ZWQgPSBudW1iZXJPZkZpbGVzOwogICAgICAgICB9CiAKICAgICAgICAgaWYgKG1fZmlsZUlucHV0
RWxlbWVudFVuZGVyTW91c2UpCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>