Reviewed by Oliver.
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2007 19:46:14 +0000 (19:46 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2007 19:46:14 +0000 (19:46 +0000)
        <rdar://problem/5234139>
        <object> with PNG src rendered as image document.

        Complete the URL before passing it to the frame loader client.

        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::isImageType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23857 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/html/HTMLObjectElement.cpp

index 32008b3..7896e30 100644 (file)
@@ -1,3 +1,15 @@
+2007-06-28  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Oliver.
+
+        <rdar://problem/5234139>
+        <object> with PNG src rendered as image document.
+        
+        Complete the URL before passing it to the frame loader client.
+        
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::isImageType):
+
 2007-06-28  Rob Buis  <buis@kde.org>
 
         Reviewed by Maciej.
index d4f7ffe..64d4d02 100644 (file)
@@ -286,8 +286,10 @@ bool HTMLObjectElement::isImageType()
                 m_serviceType = "text/plain"; // Data URLs with no MIME type are considered text/plain.
         }
     }
-    if (document()->frame())
-        return document()->frame()->loader()->client()->objectContentType(KURL(m_url.deprecatedString()), m_serviceType) == ObjectContentImage;
+    if (Frame* frame = document()->frame()) {
+        KURL completedURL(frame->loader()->completeURL(m_url));
+        return frame->loader()->client()->objectContentType(completedURL, m_serviceType) == ObjectContentImage;
+    }
 
     return Image::supportsType(m_serviceType);
 }