зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1330487 - Part 5: Use correct referrer policy for image loader r=heycam
MozReview-Commit-ID: JA7gkRH9cDJ Differential Revision: https://phabricator.services.mozilla.com/D1924 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4bd7f93042
Коммит
e9db7825df
|
@ -361,7 +361,9 @@ ImageLoader::ClearFrames(nsPresContext* aPresContext)
|
|||
|
||||
void
|
||||
ImageLoader::LoadImage(nsIURI* aURI, nsIPrincipal* aOriginPrincipal,
|
||||
nsIURI* aReferrer, ImageLoader::Image* aImage,
|
||||
nsIURI* aReferrer,
|
||||
mozilla::net::ReferrerPolicy aPolicy,
|
||||
ImageLoader::Image* aImage,
|
||||
CORSMode aCorsMode)
|
||||
{
|
||||
NS_ASSERTION(aImage->mRequests.Count() == 0, "Huh?");
|
||||
|
@ -378,7 +380,7 @@ ImageLoader::LoadImage(nsIURI* aURI, nsIPrincipal* aOriginPrincipal,
|
|||
RefPtr<imgRequestProxy> request;
|
||||
nsresult rv = nsContentUtils::LoadImage(aURI, mDocument, mDocument,
|
||||
aOriginPrincipal, 0, aReferrer,
|
||||
mDocument->GetReferrerPolicy(),
|
||||
aPolicy,
|
||||
nullptr, loadFlags,
|
||||
NS_LITERAL_STRING("css"),
|
||||
getter_AddRefs(request));
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "imgIRequest.h"
|
||||
#include "imgINotificationObserver.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/net/ReferrerPolicy.h"
|
||||
|
||||
class imgIContainer;
|
||||
class nsIFrame;
|
||||
|
@ -77,7 +78,8 @@ public:
|
|||
void ClearFrames(nsPresContext* aPresContext);
|
||||
|
||||
void LoadImage(nsIURI* aURI, nsIPrincipal* aPrincipal, nsIURI* aReferrer,
|
||||
Image* aCSSValue, CORSMode aCorsMode);
|
||||
mozilla::net::ReferrerPolicy aPolicy, Image* aCSSValue,
|
||||
CORSMode aCorsMode);
|
||||
|
||||
void DestroyRequest(imgIRequest* aRequest);
|
||||
|
||||
|
|
|
@ -1440,6 +1440,7 @@ css::ImageValue::Initialize(nsIDocument* aDocument)
|
|||
loadingDoc->StyleImageLoader()->LoadImage(GetURI(),
|
||||
mExtraData->GetPrincipal(),
|
||||
mExtraData->GetReferrer(),
|
||||
mExtraData->GetReferrerPolicy(),
|
||||
this,
|
||||
mCORSMode);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче