<?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>19385</bug_id>
          
          <creation_ts>2008-06-03 20:04:25 -0700</creation_ts>
          <short_desc>[Qt] Dragging and dropping an image in edit mode does not work</short_desc>
          <delta_ts>2011-04-08 13:36:44 -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>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathon Jongsma (jonner)">jonathon</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82266</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathon Jongsma (jonner)">jonathon</who>
    <bug_when>2008-06-03 20:04:25 -0700</bug_when>
    <thetext>Steps to reproduce:
- make page editable
- click on and drag an image
- drop the image in a different spot on the page (e.g. in the middle of a paragraph somewhere)

results:
- the image is deleted from its original position, but it is not inserted into the document at the new position

expected behavior:
- the image should be moved from the old position to the new drop position</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82267</commentid>
    <comment_count>1</comment_count>
      <attachid>21489</attachid>
    <who name="Jonathon Jongsma (jonner)">jonathon</who>
    <bug_when>2008-06-03 20:06:41 -0700</bug_when>
    <thetext>Created attachment 21489
Possible fix to insert the image into the editable document at the drop location

Basically, when dragging an image it was saving the image data to the clipboard, but to move it within an editable html document, we want to save the html fragment in the clipboard and paste that into the new location.  This patch just adds the html fragment as an additional format in the drag clipboard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82270</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-06-03 20:34:18 -0700</bug_when>
    <thetext>This already behaves correctly on the Mac, which suggests to me that the fix should not be in core cross-platform code but in GTK-specific client classes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86884</commentid>
    <comment_count>3</comment_count>
      <attachid>21489</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-07-24 11:43:52 -0700</bug_when>
    <thetext>Comment on attachment 21489
Possible fix to insert the image into the editable document at the drop location

I just tested:

1.  open &quot;about:blank&quot;
2.  type &quot;javascript:document.designMode=&quot;on&quot;&quot;
3.  Drag the google.com logo from google.com onto the now-editable about:blank document.

it worked for me on the Mac.  Suggesting that this is a gtk-only issue?  Please provide a test case so we can verify if your fix affects other platforms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87149</commentid>
    <comment_count>4</comment_count>
      <attachid>22520</attachid>
    <who name="Jonathon Jongsma (jonner)">jonathon</who>
    <bug_when>2008-07-28 07:12:51 -0700</bug_when>
    <thetext>Created attachment 22520
A simple test case

Thanks for looking at this Eric.  I think your test case might be a slightly different situation than the bug I am seeing, so I&apos;m attaching a simple test case to illustrate the problem I&apos;m seeing (sorry for not attaching this initially).  

By the way, I&apos;m seeing this issue in Qt, and it&apos;s possible that it only affects the Qt port, but from my reading of the source code, this seems unlikely to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>331076</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-01-07 15:49:15 -0800</bug_when>
    <thetext>If I understand what this bug is about, the attached test case also works fine in Safari 5 on Mac OS X. The image is successfully moved, and all attributes (like ALT) are preserved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>380387</commentid>
    <comment_count>6</comment_count>
      <attachid>88427</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-04-06 08:17:36 -0700</bug_when>
    <thetext>Created attachment 88427
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>382400</commentid>
    <comment_count>7</comment_count>
      <attachid>88427</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2011-04-08 11:23:50 -0700</bug_when>
    <thetext>Comment on attachment 88427
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>382513</commentid>
    <comment_count>8</comment_count>
      <attachid>88427</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-04-08 13:36:39 -0700</bug_when>
    <thetext>Comment on attachment 88427
Patch

Clearing flags on attachment: 88427

Committed r83338: &lt;http://trac.webkit.org/changeset/83338&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>382514</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-04-08 13:36:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>21489</attachid>
            <date>2008-06-03 20:06:41 -0700</date>
            <delta_ts>2010-06-10 15:49:38 -0700</delta_ts>
            <desc>Possible fix to insert the image into the editable document at the drop location</desc>
            <filename>0001-Write-the-range-to-the-clipboard-when-dragging-an-im.patch</filename>
            <type>text/plain</type>
            <size>2079</size>
            <attacher name="Jonathon Jongsma (jonner)">jonathon</attacher>
            
              <data encoding="base64">RnJvbSBhODk0MTU0YTMzMWFmYmFmMmRiZTQwZDYxNTZiMDM1MTJmZjcwNjI0IE1vbiBTZXAg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EVsZW1lCiAgICAgQVNT
RVJUKGVjID09IDApOwogICAgIHNyYy0+c2VsZWN0aW9uQ29udHJvbGxlcigpLT5zZXRTZWxlY3Rp
b24oU2VsZWN0aW9uKHJhbmdlLmdldCgpLCBET1dOU1RSRUFNKSk7ICAgICAgICAgICAKICAgICBj
bGlwYm9hcmQtPmRlY2xhcmVBbmRXcml0ZURyYWdJbWFnZShub2RlLCAhbGlua1VSTC5pc0VtcHR5
KCkgPyBsaW5rVVJMIDogaW1hZ2VVUkwsIGxhYmVsLCBzcmMpOworICAgIGNsaXBib2FyZC0+d3Jp
dGVSYW5nZShyYW5nZS5nZXQoKSwgc3JjKTsKIH0KICAgICAKIHN0YXRpYyBJbnRQb2ludCBkcmFn
TG9jRm9yREhUTUxEcmFnKGNvbnN0IEludFBvaW50JiBtb3VzZURyYWdnZWRQb2ludCwgY29uc3Qg
SW50UG9pbnQmIGRyYWdPcmlnaW4sIGNvbnN0IEludFBvaW50JiBkcmFnSW1hZ2VPZmZzZXQsIGJv
b2wgaXNMaW5rSW1hZ2UpCi0tIAoxLjUuNQoK
</data>
<flag name="review"
          id="9408"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>22520</attachid>
            <date>2008-07-28 07:12:51 -0700</date>
            <delta_ts>2008-07-28 07:12:51 -0700</delta_ts>
            <desc>A simple test case</desc>
            <filename>image-drag.html</filename>
            <type>text/html</type>
            <size>925</size>
            <attacher name="Jonathon Jongsma (jonner)">jonathon</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgICA8aGVhZD4KICAgICAgICA8dGl0bGU+QnVnIDE5Mzg1PC90aXRsZT4KICAgIDwv
aGVhZD4KICAgIDxib2R5PgogICAgICAgIDxwPiBUaGlzIGlzIGEgdGVzdCBvZiBpbWFnZSBkcmFn
Z2luZy4gVGhpcyBwYXJhZ3JhcGggaGFzIGFtIGVtYmVkZGVkIGltYWdlIDxpbWcgc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ment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>88427</attachid>
            <date>2011-04-06 08:17:36 -0700</date>
            <delta_ts>2011-04-08 13:36:39 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>19385.diff</filename>
            <type>text/plain</type>
            <size>1521</size>
            <attacher name="Benjamin Poulain">benjamin</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBlMTQ2Y2QxLi4yMDcwNDY3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTkg
QEAKKzIwMTEtMDQtMDYgIEJlbmphbWluIFBvdWxhaW4gIDxiZW5qYW1pbi5wb3VsYWluQG5va2lh
LmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBb
UXRdIERyYWdnaW5nIGFuZCBkcm9wcGluZyBhbiBpbWFnZSBpbiBlZGl0IG1vZGUgZG9lcyBub3Qg
d29yaworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTkz
ODUKKworICAgICAgICBXaGVuIGFkZGluZyBhbiBpbWFnZSB0byB0aGUgY2xpcGJvYXJkLCB3ZSBz
aG91bGQgYWxzbyBpbmNsdWRlIHRoZSBIVE1MIGNvZGUgb2YgdGhhdCBpbWFnZSBzbworICAgICAg
ICBpdCBjYW4gYmUgdXNlZCBmb3IgaW50ZXJuYWwgZHJhZyBhbmQgZHJvcC4KKworICAgICAgICBU
aGlzIEhUTUwgaXMgZXhwZWN0ZWQgYnkgYWxsIGNsaWVudHMgb2YgZHJvcCBldmVudHMgc28gYSBm
cmFnbWVudCBjYW4gYmUgbW92ZWQg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