зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1431774 part 2. Make all attributes and methods on nsIImageLoadingContent noscript, since they're not used from JS. r=mystor
MozReview-Commit-ID: 5LqkMJP32J8
This commit is contained in:
Родитель
9ee8c16efe
Коммит
bd29cf763a
|
@ -40,6 +40,9 @@ native Visibility(mozilla::Visibility);
|
|||
* interface to mirror this interface when changing it.
|
||||
*/
|
||||
|
||||
// We can't make this interface noscript yet, because there is JS code doing
|
||||
// "instanceof Ci.nsIImageLoadingContent" and using the nsIImageLoadingContent
|
||||
// constants.
|
||||
[scriptable, builtinclass, uuid(0357123d-9224-4d12-a47e-868c32689777)]
|
||||
interface nsIImageLoadingContent : imgINotificationObserver
|
||||
{
|
||||
|
@ -60,7 +63,7 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
* situations where loading images is unwanted. Note that enabling
|
||||
* loading will *not* automatically trigger an image load.
|
||||
*/
|
||||
attribute boolean loadingEnabled;
|
||||
[noscript] attribute boolean loadingEnabled;
|
||||
|
||||
/**
|
||||
* Returns the image blocking status (@see nsIContentPolicy). This
|
||||
|
@ -68,7 +71,7 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
* the image was blocked. This status always refers to the
|
||||
* CURRENT_REQUEST load.
|
||||
*/
|
||||
readonly attribute short imageBlockingStatus;
|
||||
[noscript] readonly attribute short imageBlockingStatus;
|
||||
|
||||
/**
|
||||
* Used to register an image decoder observer. Typically, this will
|
||||
|
@ -94,14 +97,14 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
* Same as addNativeObserver but intended for scripted observers or observers
|
||||
* from another or without a document.
|
||||
*/
|
||||
void addObserver(in imgINotificationObserver aObserver);
|
||||
[noscript] void addObserver(in imgINotificationObserver aObserver);
|
||||
|
||||
/**
|
||||
* Same as removeNativeObserver but intended for scripted observers or
|
||||
* observers from another or without a document.
|
||||
*/
|
||||
void removeObserver(in imgINotificationObserver aObserver);
|
||||
|
||||
[noscript] void removeObserver(in imgINotificationObserver aObserver);
|
||||
|
||||
/**
|
||||
* Accessor to get the image requests
|
||||
*
|
||||
|
@ -113,7 +116,7 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
* @throws NS_ERROR_UNEXPECTED if the request type requested is not
|
||||
* known
|
||||
*/
|
||||
imgIRequest getRequest(in long aRequestType);
|
||||
[noscript] imgIRequest getRequest(in long aRequestType);
|
||||
|
||||
/**
|
||||
* Call this function when the request was blocked by any of the
|
||||
|
@ -122,7 +125,7 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
* @param aContentDecision the decision returned from nsIContentPolicy
|
||||
* (any of the types REJECT_*)
|
||||
*/
|
||||
void setBlockedRequest(in int16_t aContentDecision);
|
||||
[noscript] void setBlockedRequest(in int16_t aContentDecision);
|
||||
|
||||
/**
|
||||
* @return true if the current request's size is available.
|
||||
|
@ -152,14 +155,14 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
*
|
||||
* @throws NS_ERROR_UNEXPECTED if aRequest is not known
|
||||
*/
|
||||
long getRequestType(in imgIRequest aRequest);
|
||||
[noscript] long getRequestType(in imgIRequest aRequest);
|
||||
|
||||
/**
|
||||
* Gets the URI of the current request, if available.
|
||||
* Otherwise, returns the last URI that this content tried to load, or
|
||||
* null if there haven't been any such attempts.
|
||||
*/
|
||||
readonly attribute nsIURI currentURI;
|
||||
[noscript] readonly attribute nsIURI currentURI;
|
||||
|
||||
/**
|
||||
* loadImageWithChannel allows data from an existing channel to be
|
||||
|
@ -173,7 +176,7 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
*
|
||||
* @throws NS_ERROR_NULL_POINTER if aChannel is null
|
||||
*/
|
||||
nsIStreamListener loadImageWithChannel(in nsIChannel aChannel);
|
||||
[noscript] nsIStreamListener loadImageWithChannel(in nsIChannel aChannel);
|
||||
|
||||
/**
|
||||
* forceReload forces reloading of the image pointed to by currentURI
|
||||
|
@ -181,21 +184,21 @@ interface nsIImageLoadingContent : imgINotificationObserver
|
|||
* @param aNotify [optional] request should notify, defaults to true
|
||||
* @throws NS_ERROR_NOT_AVAILABLE if there is no current URI to reload
|
||||
*/
|
||||
[optional_argc] void forceReload([optional] in boolean aNotify /* = true */);
|
||||
[noscript, optional_argc] void forceReload([optional] in boolean aNotify /* = true */);
|
||||
|
||||
/**
|
||||
* Enables/disables image state forcing. When |aForce| is PR_TRUE, we force
|
||||
* nsImageLoadingContent::ImageState() to return |aState|. Call again with |aForce|
|
||||
* as PR_FALSE to revert ImageState() to its original behaviour.
|
||||
*/
|
||||
void forceImageState(in boolean aForce, in unsigned long long aState);
|
||||
[noscript] void forceImageState(in boolean aForce, in unsigned long long aState);
|
||||
|
||||
/**
|
||||
* The intrinsic size and width of this content. May differ from actual image
|
||||
* size due to things like responsive image density.
|
||||
*/
|
||||
readonly attribute unsigned long naturalWidth;
|
||||
readonly attribute unsigned long naturalHeight;
|
||||
[noscript] readonly attribute unsigned long naturalWidth;
|
||||
[noscript] readonly attribute unsigned long naturalHeight;
|
||||
|
||||
/**
|
||||
* Called by layout to announce when the frame associated with this content
|
||||
|
|
Загрузка…
Ссылка в новой задаче