<?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>174831</bug_id>
          
          <creation_ts>2017-07-25 13:33:54 -0700</creation_ts>
          <short_desc>Dragged links are blurry on 1x displays.</short_desc>
          <delta_ts>2017-07-25 15:49:01 -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 Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1332059</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-07-25 13:33:54 -0700</bug_when>
    <thetext>When I drag a link from a 2x display to a 1x display, the text in the drag image is blurry.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332060</commentid>
    <comment_count>1</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-07-25 13:34:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/33519698&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332065</commentid>
    <comment_count>2</comment_count>
      <attachid>316388</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-07-25 13:41:38 -0700</bug_when>
    <thetext>Created attachment 316388
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332071</commentid>
    <comment_count>3</comment_count>
      <attachid>316388</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-25 13:47:31 -0700</bug_when>
    <thetext>Comment on attachment 316388
Patch

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

&gt; Source/WebCore/platform/mac/DragImageMac.mm:293
&gt; +    // To work around blurry drag images on 1x displays, make the width and height a multiple of 2.
&gt; +    // FIXME: remove this workaround when &lt;rdar://problem/33059739&gt; is fixed.
&gt; +    boundingRect.setWidth((static_cast&lt;int&gt;(boundingRect.width()) / 2) * 2);
&gt; +    boundingRect.setHeight((static_cast&lt;int&gt;(boundingRect.height() / 2) * 2));

Is this a user-visible change, or does it just add transparent pixels? Does it affect alignment of the image with the pointer?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332084</commentid>
    <comment_count>4</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-07-25 14:06:07 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #3)
&gt; Comment on attachment 316388 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=316388&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/mac/DragImageMac.mm:293
&gt; &gt; +    // To work around blurry drag images on 1x displays, make the width and height a multiple of 2.
&gt; &gt; +    // FIXME: remove this workaround when &lt;rdar://problem/33059739&gt; is fixed.
&gt; &gt; +    boundingRect.setWidth((static_cast&lt;int&gt;(boundingRect.width()) / 2) * 2);
&gt; &gt; +    boundingRect.setHeight((static_cast&lt;int&gt;(boundingRect.height() / 2) * 2));
&gt; 
&gt; Is this a user-visible change, or does it just add transparent pixels? Does
&gt; it affect alignment of the image with the pointer?

Do you mean if this changes the alignment of the memory address of the image data?

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332085</commentid>
    <comment_count>5</comment_count>
      <attachid>316388</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-25 14:07:39 -0700</bug_when>
    <thetext>Comment on attachment 316388
Patch

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

&gt;&gt;&gt; Source/WebCore/platform/mac/DragImageMac.mm:293
&gt;&gt;&gt; +    boundingRect.setHeight((static_cast&lt;int&gt;(boundingRect.height() / 2) * 2));
&gt;&gt; 
&gt;&gt; Is this a user-visible change, or does it just add transparent pixels? Does it affect alignment of the image with the pointer?
&gt; 
&gt; Do you mean if this changes the alignment of the memory address of the image data?
&gt; 
&gt; Thanks for reviewing!

No, i mean the position of the drag image relative to the mouse pointer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332101</commentid>
    <comment_count>6</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-07-25 14:28:38 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #5)
&gt; Comment on attachment 316388 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=316388&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/WebCore/platform/mac/DragImageMac.mm:293
&gt; &gt;&gt;&gt; +    boundingRect.setHeight((static_cast&lt;int&gt;(boundingRect.height() / 2) * 2));
&gt; &gt;&gt; 
&gt; &gt;&gt; Is this a user-visible change, or does it just add transparent pixels? Does it affect alignment of the image with the pointer?
&gt; &gt; 
&gt; &gt; Do you mean if this changes the alignment of the memory address of the image data?
&gt; &gt; 
&gt; &gt; Thanks for reviewing!
&gt; 
&gt; No, i mean the position of the drag image relative to the mouse pointer.

Ah, yes, I believe it does affect the alignment with the pointer, since the image size is used in this calculation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332109</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-07-25 14:58:32 -0700</bug_when>
    <thetext>That&apos;s bad, then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332117</commentid>
    <comment_count>8</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-07-25 15:21:07 -0700</bug_when>
    <thetext>Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332126</commentid>
    <comment_count>9</comment_count>
      <attachid>316388</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-07-25 15:49:00 -0700</bug_when>
    <thetext>Comment on attachment 316388
Patch

Clearing flags on attachment: 316388

Committed r219891: &lt;http://trac.webkit.org/changeset/219891&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1332127</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-07-25 15:49:01 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>316388</attachid>
            <date>2017-07-25 13:41:38 -0700</date>
            <delta_ts>2017-07-25 15:49:00 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-174831-20170725134147.patch</filename>
            <type>text/plain</type>
            <size>1923</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIxOTg3OSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZw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