зеркало из https://github.com/mozilla/pjs.git
Bug 540642 - Call CanLoadImage before preloading images too. r=bzbarsky sr=dbaron
--HG-- extra : rebase_source : 1f62ba60b054b3afd49abfa8d36292c667c0d1b1
This commit is contained in:
Родитель
6f0a5b721e
Коммит
ba2a2329c5
|
@ -7724,7 +7724,10 @@ nsDocument::MaybePreLoadImage(nsIURI* uri)
|
|||
// Early exit if the img is already present in the img-cache
|
||||
// which indicates that the "real" load has already started and
|
||||
// that we shouldn't preload it.
|
||||
if (nsContentUtils::IsImageInCache(uri)) {
|
||||
PRInt16 blockingStatus;
|
||||
if (nsContentUtils::IsImageInCache(uri) ||
|
||||
!nsContentUtils::CanLoadImage(uri, static_cast<nsIDocument *>(this),
|
||||
this, NodePrincipal(), &blockingStatus)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7746,6 +7749,7 @@ nsDocument::MaybePreLoadImage(nsIURI* uri)
|
|||
mPreloadingImages.AppendObject(request);
|
||||
}
|
||||
}
|
||||
|
||||
class nsDelayedEventDispatcher : public nsRunnable
|
||||
{
|
||||
public:
|
||||
|
|
Загрузка…
Ссылка в новой задаче