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
Created attachment 21489 [details] 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.
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.
Comment on attachment 21489 [details] Possible fix to insert the image into the editable document at the drop location I just tested: 1. open "about:blank" 2. type "javascript:document.designMode="on"" 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.
Created attachment 22520 [details] 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'm attaching a simple test case to illustrate the problem I'm seeing (sorry for not attaching this initially). By the way, I'm seeing this issue in Qt, and it's possible that it only affects the Qt port, but from my reading of the source code, this seems unlikely to me.
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.
Created attachment 88427 [details] Patch
Comment on attachment 88427 [details] Patch r=me
Comment on attachment 88427 [details] Patch Clearing flags on attachment: 88427 Committed r83338: <http://trac.webkit.org/changeset/83338>
All reviewed patches have been landed. Closing bug.