mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 75709d46ba3b (bug 1137037)
This commit is contained in:
parent
835eca6757
commit
2f92d267be
@ -28,6 +28,7 @@
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsINetworkPredictor.h"
|
||||
|
||||
#include "nsIApplicationCache.h"
|
||||
@ -2045,6 +2046,12 @@ nsresult imgLoader::LoadImage(nsIURI *aURI,
|
||||
timedChannel->SetInitiatorType(initiatorType);
|
||||
}
|
||||
|
||||
// Pass the inner window ID of the loading document, if possible.
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aCX);
|
||||
if (doc) {
|
||||
request->SetInnerWindowID(doc->InnerWindowID());
|
||||
}
|
||||
|
||||
// create the proxy listener
|
||||
nsCOMPtr<nsIStreamListener> pl = new ProxyListener(request.get());
|
||||
|
||||
@ -2508,8 +2515,7 @@ NS_IMPL_ISUPPORTS(imgCacheValidator, nsIStreamListener, nsIRequestObserver,
|
||||
|
||||
imgCacheValidator::imgCacheValidator(nsProgressNotificationProxy* progress,
|
||||
imgLoader* loader, imgRequest *request,
|
||||
nsISupports* aContext,
|
||||
bool forcePrincipalCheckForCacheEntry)
|
||||
void *aContext, bool forcePrincipalCheckForCacheEntry)
|
||||
: mProgressProxy(progress),
|
||||
mRequest(request),
|
||||
mContext(aContext),
|
||||
|
@ -497,8 +497,7 @@ class imgCacheValidator : public nsIStreamListener,
|
||||
{
|
||||
public:
|
||||
imgCacheValidator(nsProgressNotificationProxy* progress, imgLoader* loader,
|
||||
imgRequest* aRequest, nsISupports* aContext,
|
||||
bool forcePrincipalCheckForCacheEntry);
|
||||
imgRequest *request, void *aContext, bool forcePrincipalCheckForCacheEntry);
|
||||
|
||||
void AddProxy(imgRequestProxy *aProxy);
|
||||
|
||||
@ -524,7 +523,7 @@ private:
|
||||
nsRefPtr<imgRequest> mNewRequest;
|
||||
nsRefPtr<imgCacheEntry> mNewEntry;
|
||||
|
||||
nsCOMPtr<nsISupports> mContext;
|
||||
void *mContext;
|
||||
|
||||
imgLoader* mImgLoader;
|
||||
};
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "nsIChannel.h"
|
||||
#include "nsICachingChannel.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIThreadRetargetableRequest.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIMultiPartChannel.h"
|
||||
@ -96,7 +95,7 @@ nsresult imgRequest::Init(nsIURI *aURI,
|
||||
nsIRequest *aRequest,
|
||||
nsIChannel *aChannel,
|
||||
imgCacheEntry *aCacheEntry,
|
||||
nsISupports* aCX,
|
||||
void *aLoadId,
|
||||
nsIPrincipal* aLoadingPrincipal,
|
||||
int32_t aCORSMode,
|
||||
ReferrerPolicy aReferrerPolicy)
|
||||
@ -133,13 +132,7 @@ nsresult imgRequest::Init(nsIURI *aURI,
|
||||
|
||||
mCacheEntry = aCacheEntry;
|
||||
|
||||
SetLoadId(aCX);
|
||||
|
||||
// Grab the inner window ID of the loading document, if possible.
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aCX);
|
||||
if (doc) {
|
||||
mInnerWindowId = doc->InnerWindowID();
|
||||
}
|
||||
SetLoadId(aLoadId);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
nsIRequest *aRequest,
|
||||
nsIChannel *aChannel,
|
||||
imgCacheEntry *aCacheEntry,
|
||||
nsISupports* aCX,
|
||||
void *aLoadId,
|
||||
nsIPrincipal* aLoadingPrincipal,
|
||||
int32_t aCORSMode,
|
||||
ReferrerPolicy aReferrerPolicy);
|
||||
@ -91,6 +91,10 @@ public:
|
||||
// Request that we start decoding the image as soon as data becomes available.
|
||||
void RequestDecode() { mDecodeRequested = true; }
|
||||
|
||||
inline void SetInnerWindowID(uint64_t aInnerWindowId) {
|
||||
mInnerWindowId = aInnerWindowId;
|
||||
}
|
||||
|
||||
inline uint64_t InnerWindowID() const {
|
||||
return mInnerWindowId;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user