<?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>5029</bug_id>
          
          <creation_ts>2005-09-17 15:03:53 -0700</creation_ts>
          <short_desc>Assertion failure in -[NSPasteboard(WebExtras) _web_writeImage:URL:title:archive:types:] when trying to drag an image from a site with no favicon</short_desc>
          <delta_ts>2005-10-14 14:52:04 -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>WebKit Misc.</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://forever.dreamers.com/hp/cos/gargamel.gif</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>mitz</reporter>
          <assigned_to name="Vicki Murley">vicki</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19810</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-09-17 15:03:53 -0700</bug_when>
    <thetext>Development build of WebKit crashes with the message
ASSERTION FAILED: [[[WebImageRendererFactory sharedFactory] supportedMIMETypes] containsObject:
[resource MIMEType]] (WebKit/Misc.subproj/WebNSPasteboardExtras.m:245 -[NSPasteboard(WebExtras) 
_web_writeImage:URL:title:archive:types:])
when opening the image in the URL in Safari and then trying to drag it out of the window.

This happens whenever the site hosting the image has sent text/html content (e.g. a 404 page) as its /
favicon.ico.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19839</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2005-09-18 01:58:51 -0700</bug_when>
    <thetext>I cannot reproduce the assertion with ToT.

However, I have seen this assertion previously with a site that used 302 Found redirection and lied about 
content type. Perhaps, one needs to navigate to this picture through the site in order to reproduce the 
problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19861</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-09-18 08:06:06 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Perhaps, one needs to navigate to this picture through the site in order to reproduce the 
&gt; problem?

My experience is that you can go straight to the picture as well. You should not drag immediately, though, 
but rather wait a couple of seconds to let WebKit fetch the favicon (you can use tcpdump or something to 
see when it&apos;s done so).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21890</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-10-12 05:28:57 -0700</bug_when>
    <thetext>It&apos;s not just the assert that fails, you end up with the wrong resource if you&apos;re dragging into a TextEdit 
document. Instead of the image, you get a Safari HTML file icon.
The root cause is that the favicon is added as a subresource to the image if it happens not to be loaded by 
the image (i.e. if it is not already in the cache), so the situation with valid favicons is no different. Even 
though the assertion doesn&apos;t fail, if you drag such an image from Safari into a TextEdit document, you end 
up with the favicon instead of the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21891</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-10-12 05:31:17 -0700</bug_when>
    <thetext>s/happens not/happens</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21895</commentid>
    <comment_count>5</comment_count>
      <attachid>4324</attachid>
    <who name="">mitz</who>
    <bug_when>2005-10-12 06:25:44 -0700</bug_when>
    <thetext>Created attachment 4324
Prefer the main resource if it is an image

This is an ugly fix that doesn&apos;t address the root cause, which is that the icon
loader adds the favicon as a subresource. However, I see no easy way to change
that behavior or to reject it in addSubResource.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22058</commentid>
    <comment_count>6</comment_count>
      <attachid>4324</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-10-14 00:30:35 -0700</bug_when>
    <thetext>Comment on attachment 4324
Prefer the main resource if it is an image

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22101</commentid>
    <comment_count>7</comment_count>
    <who name="Vicki Murley">vicki</who>
    <bug_when>2005-10-14 13:28:05 -0700</bug_when>
    <thetext>I committed this change.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4324</attachid>
            <date>2005-10-12 06:25:44 -0700</date>
            <delta_ts>2005-10-14 00:30:35 -0700</delta_ts>
            <desc>Prefer the main resource if it is an image</desc>
            <filename>5029_r1.patch</filename>
            <type>text/plain</type>
            <size>1613</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IE1pc2Muc3VicHJvai9XZWJOU1Bhc3RlYm9hcmRFeHRyYXMubQo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJD
UyBmaWxlOiAvY3ZzL3Jvb3QvV2ViS2l0L01pc2Muc3VicHJvai9XZWJOU1Bhc3RlYm9hcmRFeHRy
YXMubSx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS40OApkaWZmIC1wIC11IC1yMS40OCBXZWJOU1Bh
c3RlYm9hcmRFeHRyYXMubQotLS0gTWlzYy5zdWJwcm9qL1dlYk5TUGFzdGVib2FyZEV4dHJhcy5t
CTE2IEF1ZyAyMDA1IDE5OjAzOjI5IC0wMDAwCTEuNDgKKysrIE1pc2Muc3VicHJvai9XZWJOU1Bh
c3RlYm9hcmRFeHRyYXMubQkxMiBPY3QgMjAwNSAxMzowMzo0OCAtMDAwMApAQCAtMjM4LDExICsy
MzgsMTMgQEAgc3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TU0VSVChyZXNvdXJjZSAhPSBuaWwpOwogICAgICAgICAgICAg
Ci0gICAgICAgICAgICBBU1NFUlQoW1tbV2ViSW1hZ2VSZW5kZXJlckZhY3Rvcnkgc2hhcmVkRmFj
dG9yeV0gc3VwcG9ydGVkTUlNRVR5cGVzXSBjb250YWluc09iamVjdDpbcmVzb3VyY2UgTUlNRVR5
cGVdXSk7CisgICAgICAgICAgICBBU1NFUlQoW2ltYWdlVHlwZXMgY29udGFpbnNPYmplY3Q6W3Jl
c291cmNlIE1JTUVUeXBlXV0pOwogICAgICAgICAgICAgW3NlbGYgX3dlYl93cml0ZUZpbGVXcmFw
cGVyQXNSVEZEQXR0YWNobWVudDpbcmVzb3VyY2UgX2ZpbGVXcmFwcGVyUmVwcmVzZW50YXRpb25d
XTsKICAgICAgICAgfQogICAgICAgICBpZiAoW3R5cGVzIGNvbnRhaW5zT2JqZWN0OldlYkFyY2hp
dmVQYm9hcmRUeXBlXSkgewo=
</data>
<flag name="review"
          id="735"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>