Bug 26281 - REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable region loses images
Summary: REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable regio...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-09 14:38 PDT by Justin Garcia
Modified: 2009-06-13 22:07 PDT (History)
3 users (show)

See Also:


Attachments
patch (2.03 KB, patch)
2009-06-09 21:51 PDT, Justin Garcia
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Garcia 2009-06-09 14:38:42 PDT
Create a new TextEdit document
Add some text and images
Copy everything
Paste into a content editable region (Blot should be OK)

Images are missing.

This is because I'll
Comment 1 Justin Garcia 2009-06-09 14:42:34 PDT
This is because WebKit's _documentFragmentFromPasteboard prefers RTF over RTFD.
Comment 2 Justin Garcia 2009-06-09 21:51:37 PDT
Created attachment 31124 [details]
patch
Comment 3 mitz 2009-06-09 22:48:19 PDT
Is it possible to make an automated test for this bug?
Comment 4 Eric Seidel (no email) 2009-06-10 00:41:29 PDT
Comment on attachment 31124 [details]
patch

r=me.  Can we please please fix all that copy/paste code in that function in a follow-up patch?  It's so disgusting!  A single static function which took a PboardType and returned a fragment would get rid of *all* those stupid lines!

Heck, we could even make it just an Array of Pboard types so that the preferred order was much easier to read and this kind of bug wouldn't happen again. ;)

Oh, and it should be possible to make a test for this...  Admittedly, kinda hard, but I would expect event.dataTransfer.setData() to be able to test this.
Comment 5 Adam Barth 2009-06-13 20:38:19 PDT
Will land.
Comment 6 Adam Barth 2009-06-13 22:07:17 PDT
Sending        WebKit/mac/ChangeLog
Sending        WebKit/mac/WebView/WebHTMLView.mm
Transmitting file data ..
Committed revision 44668.

Next time, please base your patches in the root directory so we can use the awesome-sauce WebKitTools.