<?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>26281</bug_id>
          
          <creation_ts>2009-06-09 14:38:42 -0700</creation_ts>
          <short_desc>REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable region loses images</short_desc>
          <delta_ts>2009-06-13 22:07:17 -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>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Justin Garcia">justin.garcia</reporter>
          <assigned_to name="Adam Barth">abarth</assigned_to>
          <cc>abarth</cc>
    
    <cc>dwood</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>125011</commentid>
    <comment_count>0</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2009-06-09 14:38:42 -0700</bug_when>
    <thetext>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&apos;ll</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125014</commentid>
    <comment_count>1</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2009-06-09 14:42:34 -0700</bug_when>
    <thetext>This is because WebKit&apos;s _documentFragmentFromPasteboard prefers RTF over RTFD.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125091</commentid>
    <comment_count>2</comment_count>
      <attachid>31124</attachid>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2009-06-09 21:51:37 -0700</bug_when>
    <thetext>Created attachment 31124
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125095</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2009-06-09 22:48:19 -0700</bug_when>
    <thetext>Is it possible to make an automated test for this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125104</commentid>
    <comment_count>4</comment_count>
      <attachid>31124</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-06-10 00:41:29 -0700</bug_when>
    <thetext>Comment on attachment 31124
patch

r=me.  Can we please please fix all that copy/paste code in that function in a follow-up patch?  It&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125720</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-06-13 20:38:19 -0700</bug_when>
    <thetext>Will land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125734</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-06-13 22:07:17 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31124</attachid>
            <date>2009-06-09 21:51:37 -0700</date>
            <delta_ts>2009-06-10 00:41:29 -0700</delta_ts>
            <desc>patch</desc>
            <filename>26281.txt</filename>
            <type>text/plain</type>
            <size>2083</size>
            <attacher name="Justin Garcia">justin.garcia</attacher>
            
              <data encoding="base64">SW5kZXg6IG1hYy9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbWFjL0NoYW5nZUxvZwkocmV2aXNp
b24gNDQ1NTMpCisrKyBtYWMvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMDktMDYtMDkgIEp1c3RpbiBHYXJjaWEgIDxqdXN0aW4uZ2FyY2lhQGFwcGxlLmNvbT4K
KworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKyAgICAgICAgCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yNjI4MQorICAgICAgICBS
RUdSRVNTSU9OOiBDb3B5aW5nIGZyb20gVGV4dEVkaXQvT21uaUdyYWZmbGUgYW5kIHBhc3Rpbmcg
aW50byBlZGl0YWJsZSByZWdpb24gbG9zZXMgaW1hZ2VzCisgICAgICAgIAorICAgICAgICBQcmVm
ZXIgUlRGRCAoUlRGIHdpdGggaW5saW5lIGltYWdlcykgb3ZlciBSVEYuICBJbiBodHRwOi8vdHJh
Yy53ZWJraXQub3JnL2NoYW5nZXNldC8xOTc0NSBJIAorICAgICAgICBhY2NpZGVudGx5IHJldmVy
c2VkIHRoZWlyIG9yZGVyLgorCisgICAgICAgICogV2ViVmlldy9XZWJIVE1MVmlldy5tbToKKyAg
ICAgICAgKC1bV2ViSFRNTFZpZXcgX2RvY3VtZW50RnJhZ21lbnRGcm9tUGFzdGVib2FyZDppbkNv
bnRleHQ6YWxsb3dQbGFpblRleHQ6XSk6IAorCiAyMDA5LTA2LTA4ICBEYW4gQmVybnN0ZWluICA8
bWl0ekBhcHBsZS5jb20+CiAKICAgICAgICAgUnViYmVyLXN0YW1wZWQgYnkgTWFyayBSb3dlLgpJ
bmRleDogbWFjL1dlYlZpZXcvV2ViSFRNTFZpZXcubW0KPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbWFjL1dlYlZp
ZXcvV2ViSFRNTFZpZXcubW0JKHJldmlzaW9uIDQzNzQyKQorKysgbWFjL1dlYlZpZXcvV2ViSFRN
TFZpZXcubW0JKHdvcmtpbmcgY29weSkKQEAgLTcyMCwxNiArNzIwLDE2IEBACiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJyZXNvdXJjZXM6MF0pKQogICAg
ICAgICByZXR1cm4gZnJhZ21lbnQ7CiAgICAgCi0gICAgaWYgKFt0eXBlcyBjb250YWluc09iamVj
dDpOU1JURlBib2FyZFR5cGVdICYmCisgICAgaWYgKFt0eXBlcyBjb250YWluc09iamVjdDpOU1JU
RkRQYm9hcmRUeXBlXSAmJgogICAgICAgICAoZnJhZ21lbnQgPSBbc2VsZiBfZG9jdW1lbnRGcmFn
bWVudEZyb21QYXN0ZWJvYXJkOnBhc3RlYm9hcmQgCi0gICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIGZvclR5cGU6TlNSVEZQYm9hcmRUeXBlCisgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvclR5cGU6TlNSVEZE
UGJvYXJkVHlwZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgaW5Db250ZXh0OmNvbnRleHQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIHN1YnJlc291cmNlczowXSkpCiAgICAgICAgIHJldHVybiBmcmFnbWVudDsKLQot
ICAgIGlmIChbdHlwZXMgY29udGFpbnNPYmplY3Q6TlNSVEZEUGJvYXJkVHlwZV0gJiYKKyAgICAK
KyAgICBpZiAoW3R5cGVzIGNvbnRhaW5zT2JqZWN0Ok5TUlRGUGJvYXJkVHlwZV0gJiYKICAgICAg
ICAgKGZyYWdtZW50ID0gW3NlbGYgX2RvY3VtZW50RnJhZ21lbnRGcm9tUGFzdGVib2FyZDpwYXN0
ZWJvYXJkIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBmb3JUeXBlOk5TUlRGRFBib2FyZFR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgZm9yVHlwZTpOU1JURlBib2FyZFR5cGUKICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluQ29udGV4dDpjb250ZXh0CiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJyZXNvdXJjZXM6
MF0pKQogICAgICAgICByZXR1cm4gZnJhZ21lbnQ7Cg==
</data>
<flag name="review"
          id="15861"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>