Changeset 30438 in webkit
- Timestamp:
- Feb 20, 2008 5:59:14 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r30437 r30438 1 2008-02-20 David Hyatt <hyatt@apple.com> 2 3 Fix for bug 16760, incorrect <object> MIME type handling and fallback 4 handling. 5 6 Reviewed by darin 7 8 * html/HTMLImageLoader.cpp: 9 (WebCore::HTMLImageLoader::notifyFinished): 10 If the image had an error, make sure to do <object> fallback. 11 12 * html/HTMLObjectElement.cpp: 13 (WebCore::HTMLObjectElement::renderFallbackContent): 14 Before doing fallback check if there is a MIME type mismatch between 15 an image type and a non-image type. If so, detach and re-attach after 16 storing the correct MIME type. 17 18 * loader/loader.cpp: 19 (WebCore::Loader::didReceiveData): 20 Consider it an error when a 404 is encountered on a CachedResource load. 21 1 22 2008-02-20 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/WebCore/html/HTMLImageLoader.cpp
r27465 r30438 30 30 #include "EventNames.h" 31 31 #include "HTMLNames.h" 32 #include "HTMLObjectElement.h" 32 33 #include "RenderImage.h" 33 34 … … 143 144 if (renderer->isImage()) 144 145 static_cast<RenderImage*>(renderer)->setCachedImage(m_image); 146 147 if (image->errorOccurred() && elem->hasTagName(objectTag)) 148 static_cast<HTMLObjectElement*>(elem)->renderFallbackContent(); 145 149 } 146 150 -
trunk/WebCore/html/HTMLObjectElement.cpp
r30243 r30438 287 287 return; 288 288 289 // Before we give up and use fallback content, check to see if this is a MIME type issue. 290 if (m_imageLoader && m_imageLoader->image()) { 291 m_serviceType = m_imageLoader->image()->response().mimeType(); 292 if (!isImageType()) { 293 detach(); 294 attach(); 295 return; 296 } 297 } 298 289 299 // Mark ourselves as using the fallback content. 290 300 m_useFallbackContent = true; -
trunk/WebCore/loader/loader.cpp
r30243 r30438 195 195 196 196 CachedResource* object = request->cachedResource(); 197 if (object->errorOccurred()) 198 return; 199 200 if (object->response().httpStatusCode() / 100 == 4) { 201 // Make sure the 4xx error codes result in an error. 202 object->error(); 203 return; 204 } 197 205 198 206 // Set the data.
Note: See TracChangeset
for help on using the changeset viewer.