Don't create ALT attribute for standalone image that was found in the cache. b=177747 r=bzbarsky sr=neil

This commit is contained in:
mats.palmgren%bredband.net 2006-06-29 02:42:27 +00:00
parent e777d1734a
commit 7bcf5f44f6

View File

@ -67,6 +67,7 @@
#include "nsIDOMElement.h"
#include "nsIDOMNSHTMLElement.h"
#include "nsContentErrors.h"
#include "ImageErrors.h"
#define AUTOMATIC_IMAGE_RESIZING_PREF "browser.enable_automatic_image_resizing"
@ -221,6 +222,11 @@ ImageListener::OnStopRequest(nsIRequest* request, nsISupports *ctxt,
imageLoader->RemoveObserver(imgDoc);
}
// |status| is NS_IMAGELIB_ERROR_LOAD_ABORTED if the image was found in
// the cache (bug 177747 comment 51).
if (status == NS_IMAGELIB_ERROR_LOAD_ABORTED) {
status = NS_OK;
}
// mImageContent can be null if the document is already destroyed
if (NS_FAILED(status) && imgDoc->mStringBundle && imgDoc->mImageContent) {