Make sure that non-image inputs don't claim to have a useful image via
nsIImageLoadingContent. Bug 301635, r=biesi, sr=jst, a=cbeard git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@178266 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -375,6 +375,9 @@ nsImageLoadingContent::LoadImageWithChannel(nsIChannel* aChannel,
|
||||
// Don't bother
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Null out our mCurrentURI, in case we have no image requests right now.
|
||||
mCurrentURI = nsnull;
|
||||
|
||||
CancelImageRequests(NS_ERROR_IMAGE_SRC_CHANGED, PR_FALSE,
|
||||
nsIContentPolicy::ACCEPT);
|
||||
@@ -520,6 +523,14 @@ nsImageLoadingContent::ImageURIChanged(const nsAString& aNewURI,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsImageLoadingContent::CancelImageRequests()
|
||||
{
|
||||
// Make sure to null out mCurrentURI here, so we no longer look like an image
|
||||
mCurrentURI = nsnull;
|
||||
CancelImageRequests(NS_BINDING_ABORTED, PR_TRUE, nsIContentPolicy::ACCEPT);
|
||||
}
|
||||
|
||||
void
|
||||
nsImageLoadingContent::CancelImageRequests(nsresult aReason,
|
||||
PRBool aEvenIfSizeAvailable,
|
||||
|
||||
Reference in New Issue
Block a user