Bug 1431774 part 3. de-COM the image loading content loadingEnabled API. r=mystor

MozReview-Commit-ID: 3JpN3ZZVNg3
This commit is contained in:
Boris Zbarsky 2018-01-19 14:19:39 -05:00
Родитель bd29cf763a
Коммит 985bac7189
2 изменённых файлов: 3 добавлений и 11 удалений

Просмотреть файл

@ -59,11 +59,11 @@ interface nsIImageLoadingContent : imgINotificationObserver
const long PENDING_REQUEST = 1; const long PENDING_REQUEST = 1;
/** /**
* loadingEnabled is used to enable and disable loading in * setLoadingEnabled is used to enable and disable loading in
* situations where loading images is unwanted. Note that enabling * situations where loading images is unwanted. Note that enabling
* loading will *not* automatically trigger an image load. * loading will *not* automatically trigger an image load.
*/ */
[noscript] attribute boolean loadingEnabled; [notxpcom, nostdcall] void setLoadingEnabled(in boolean aEnabled);
/** /**
* Returns the image blocking status (@see nsIContentPolicy). This * Returns the image blocking status (@see nsIContentPolicy). This

Просмотреть файл

@ -331,20 +331,12 @@ nsImageLoadingContent::OnImageIsAnimated(imgIRequest *aRequest)
* nsIImageLoadingContent impl * nsIImageLoadingContent impl
*/ */
NS_IMETHODIMP void
nsImageLoadingContent::GetLoadingEnabled(bool *aLoadingEnabled)
{
*aLoadingEnabled = mLoadingEnabled;
return NS_OK;
}
NS_IMETHODIMP
nsImageLoadingContent::SetLoadingEnabled(bool aLoadingEnabled) nsImageLoadingContent::SetLoadingEnabled(bool aLoadingEnabled)
{ {
if (nsContentUtils::GetImgLoaderForChannel(nullptr, nullptr)) { if (nsContentUtils::GetImgLoaderForChannel(nullptr, nullptr)) {
mLoadingEnabled = aLoadingEnabled; mLoadingEnabled = aLoadingEnabled;
} }
return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP