Backed out changeset 395b95afd795 (bug 1487964) for mochitest failures on test_resource_timing_nocors.
This commit is contained in:
@@ -764,7 +764,6 @@ nsDocShell::LoadURI(nsDocShellLoadState* aLoadState)
|
|||||||
resultPrincipalURI,
|
resultPrincipalURI,
|
||||||
aLoadState->KeepResultPrincipalURIIfSet(),
|
aLoadState->KeepResultPrincipalURIIfSet(),
|
||||||
aLoadState->LoadReplace(),
|
aLoadState->LoadReplace(),
|
||||||
aLoadState->GetIsFromProcessingFrameAttributes(),
|
|
||||||
aLoadState->Referrer(),
|
aLoadState->Referrer(),
|
||||||
aLoadState->ReferrerPolicy(),
|
aLoadState->ReferrerPolicy(),
|
||||||
aLoadState->TriggeringPrincipal(),
|
aLoadState->TriggeringPrincipal(),
|
||||||
@@ -4815,8 +4814,7 @@ nsDocShell::LoadErrorPage(nsIURI* aErrorURI, nsIURI* aFailedURI, nsIChannel* aFa
|
|||||||
mLSHE->AbandonBFCacheEntry();
|
mLSHE->AbandonBFCacheEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
return InternalLoad(aErrorURI, nullptr, Nothing(), false, false,
|
return InternalLoad(aErrorURI, nullptr, Nothing(), false, false, nullptr, RP_Unset,
|
||||||
false, nullptr, RP_Unset,
|
|
||||||
nsContentUtils::GetSystemPrincipal(), nullptr,
|
nsContentUtils::GetSystemPrincipal(), nullptr,
|
||||||
INTERNAL_LOAD_FLAGS_NONE, EmptyString(),
|
INTERNAL_LOAD_FLAGS_NONE, EmptyString(),
|
||||||
VoidCString(), VoidString(), nullptr, nullptr,
|
VoidCString(), VoidString(), nullptr, nullptr,
|
||||||
@@ -4916,7 +4914,6 @@ nsDocShell::Reload(uint32_t aReloadFlags)
|
|||||||
emplacedResultPrincipalURI,
|
emplacedResultPrincipalURI,
|
||||||
false,
|
false,
|
||||||
loadReplace,
|
loadReplace,
|
||||||
false, // IsFromProcessingFrameAttributes
|
|
||||||
referrerURI,
|
referrerURI,
|
||||||
referrerPolicy,
|
referrerPolicy,
|
||||||
triggeringPrincipal,
|
triggeringPrincipal,
|
||||||
@@ -9005,7 +9002,6 @@ public:
|
|||||||
Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
||||||
bool aKeepResultPrincipalURIIfSet,
|
bool aKeepResultPrincipalURIIfSet,
|
||||||
bool aLoadReplace,
|
bool aLoadReplace,
|
||||||
bool aIsFromProcessingFrameAttributes,
|
|
||||||
nsIURI* aReferrer, uint32_t aReferrerPolicy,
|
nsIURI* aReferrer, uint32_t aReferrerPolicy,
|
||||||
nsIPrincipal* aTriggeringPrincipal,
|
nsIPrincipal* aTriggeringPrincipal,
|
||||||
nsIPrincipal* aPrincipalToInherit,
|
nsIPrincipal* aPrincipalToInherit,
|
||||||
@@ -9028,7 +9024,6 @@ public:
|
|||||||
, mResultPrincipalURI(aResultPrincipalURI)
|
, mResultPrincipalURI(aResultPrincipalURI)
|
||||||
, mKeepResultPrincipalURIIfSet(aKeepResultPrincipalURIIfSet)
|
, mKeepResultPrincipalURIIfSet(aKeepResultPrincipalURIIfSet)
|
||||||
, mLoadReplace(aLoadReplace)
|
, mLoadReplace(aLoadReplace)
|
||||||
, mIsFromProcessingFrameAttributes(aIsFromProcessingFrameAttributes)
|
|
||||||
, mReferrer(aReferrer)
|
, mReferrer(aReferrer)
|
||||||
, mReferrerPolicy(aReferrerPolicy)
|
, mReferrerPolicy(aReferrerPolicy)
|
||||||
, mTriggeringPrincipal(aTriggeringPrincipal)
|
, mTriggeringPrincipal(aTriggeringPrincipal)
|
||||||
@@ -9053,7 +9048,6 @@ public:
|
|||||||
return mDocShell->InternalLoad(mURI, mOriginalURI, mResultPrincipalURI,
|
return mDocShell->InternalLoad(mURI, mOriginalURI, mResultPrincipalURI,
|
||||||
mKeepResultPrincipalURIIfSet,
|
mKeepResultPrincipalURIIfSet,
|
||||||
mLoadReplace,
|
mLoadReplace,
|
||||||
mIsFromProcessingFrameAttributes,
|
|
||||||
mReferrer,
|
mReferrer,
|
||||||
mReferrerPolicy,
|
mReferrerPolicy,
|
||||||
mTriggeringPrincipal, mPrincipalToInherit,
|
mTriggeringPrincipal, mPrincipalToInherit,
|
||||||
@@ -9076,7 +9070,6 @@ private:
|
|||||||
Maybe<nsCOMPtr<nsIURI>> mResultPrincipalURI;
|
Maybe<nsCOMPtr<nsIURI>> mResultPrincipalURI;
|
||||||
bool mKeepResultPrincipalURIIfSet;
|
bool mKeepResultPrincipalURIIfSet;
|
||||||
bool mLoadReplace;
|
bool mLoadReplace;
|
||||||
bool mIsFromProcessingFrameAttributes;
|
|
||||||
nsCOMPtr<nsIURI> mReferrer;
|
nsCOMPtr<nsIURI> mReferrer;
|
||||||
uint32_t mReferrerPolicy;
|
uint32_t mReferrerPolicy;
|
||||||
nsCOMPtr<nsIPrincipal> mTriggeringPrincipal;
|
nsCOMPtr<nsIPrincipal> mTriggeringPrincipal;
|
||||||
@@ -9113,7 +9106,6 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
|||||||
Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
||||||
bool aKeepResultPrincipalURIIfSet,
|
bool aKeepResultPrincipalURIIfSet,
|
||||||
bool aLoadReplace,
|
bool aLoadReplace,
|
||||||
bool aIsFromProcessingFrameAttributes,
|
|
||||||
nsIURI* aReferrer,
|
nsIURI* aReferrer,
|
||||||
uint32_t aReferrerPolicy,
|
uint32_t aReferrerPolicy,
|
||||||
nsIPrincipal* aTriggeringPrincipal,
|
nsIPrincipal* aTriggeringPrincipal,
|
||||||
@@ -9466,7 +9458,6 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
|||||||
aResultPrincipalURI,
|
aResultPrincipalURI,
|
||||||
aKeepResultPrincipalURIIfSet,
|
aKeepResultPrincipalURIIfSet,
|
||||||
aLoadReplace,
|
aLoadReplace,
|
||||||
aIsFromProcessingFrameAttributes,
|
|
||||||
aReferrer,
|
aReferrer,
|
||||||
aReferrerPolicy,
|
aReferrerPolicy,
|
||||||
aTriggeringPrincipal,
|
aTriggeringPrincipal,
|
||||||
@@ -9565,8 +9556,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
|||||||
nsCOMPtr<nsIRunnable> ev =
|
nsCOMPtr<nsIRunnable> ev =
|
||||||
new InternalLoadEvent(this, aURI, aOriginalURI, aResultPrincipalURI,
|
new InternalLoadEvent(this, aURI, aOriginalURI, aResultPrincipalURI,
|
||||||
aKeepResultPrincipalURIIfSet,
|
aKeepResultPrincipalURIIfSet,
|
||||||
aLoadReplace, aIsFromProcessingFrameAttributes,
|
aLoadReplace, aReferrer, aReferrerPolicy,
|
||||||
aReferrer, aReferrerPolicy,
|
|
||||||
aTriggeringPrincipal, principalToInherit,
|
aTriggeringPrincipal, principalToInherit,
|
||||||
aFlags, aTypeHint, aPostData,
|
aFlags, aTypeHint, aPostData,
|
||||||
aHeadersData, aLoadType, aSHEntry, aFirstParty,
|
aHeadersData, aLoadType, aSHEntry, aFirstParty,
|
||||||
@@ -10080,7 +10070,6 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
|||||||
nsCOMPtr<nsIRequest> req;
|
nsCOMPtr<nsIRequest> req;
|
||||||
rv = DoURILoad(aURI, aOriginalURI, aResultPrincipalURI,
|
rv = DoURILoad(aURI, aOriginalURI, aResultPrincipalURI,
|
||||||
aKeepResultPrincipalURIIfSet, aLoadReplace,
|
aKeepResultPrincipalURIIfSet, aLoadReplace,
|
||||||
aIsFromProcessingFrameAttributes,
|
|
||||||
loadFromExternal,
|
loadFromExternal,
|
||||||
(aFlags & INTERNAL_LOAD_FLAGS_FORCE_ALLOW_DATA_URI),
|
(aFlags & INTERNAL_LOAD_FLAGS_FORCE_ALLOW_DATA_URI),
|
||||||
(aFlags & INTERNAL_LOAD_FLAGS_ORIGINAL_FRAME_SRC),
|
(aFlags & INTERNAL_LOAD_FLAGS_ORIGINAL_FRAME_SRC),
|
||||||
@@ -10229,7 +10218,6 @@ nsDocShell::DoURILoad(nsIURI* aURI,
|
|||||||
Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
||||||
bool aKeepResultPrincipalURIIfSet,
|
bool aKeepResultPrincipalURIIfSet,
|
||||||
bool aLoadReplace,
|
bool aLoadReplace,
|
||||||
bool aIsFromProcessingFrameAttributes,
|
|
||||||
bool aLoadFromExternal,
|
bool aLoadFromExternal,
|
||||||
bool aForceAllowDataURI,
|
bool aForceAllowDataURI,
|
||||||
bool aOriginalFrameSrc,
|
bool aOriginalFrameSrc,
|
||||||
@@ -10405,7 +10393,7 @@ nsDocShell::DoURILoad(nsIURI* aURI,
|
|||||||
securityFlags |= nsILoadInfo::SEC_SANDBOXED;
|
securityFlags |= nsILoadInfo::SEC_SANDBOXED;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<LoadInfo> loadInfo =
|
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||||
(aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT) ?
|
(aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT) ?
|
||||||
new LoadInfo(loadingWindow, aTriggeringPrincipal, topLevelLoadingContext,
|
new LoadInfo(loadingWindow, aTriggeringPrincipal, topLevelLoadingContext,
|
||||||
securityFlags) :
|
securityFlags) :
|
||||||
@@ -10451,10 +10439,6 @@ nsDocShell::DoURILoad(nsIURI* aURI,
|
|||||||
rv = loadInfo->SetIsDocshellReload(mLoadType & LOAD_CMD_RELOAD);
|
rv = loadInfo->SetIsDocshellReload(mLoadType & LOAD_CMD_RELOAD);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (aIsFromProcessingFrameAttributes) {
|
|
||||||
loadInfo->SetIsFromProcessingFrameAttributes();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isSrcdoc) {
|
if (!isSrcdoc) {
|
||||||
rv = NS_NewChannelInternal(getter_AddRefs(channel),
|
rv = NS_NewChannelInternal(getter_AddRefs(channel),
|
||||||
aURI,
|
aURI,
|
||||||
@@ -12165,7 +12149,6 @@ nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry, uint32_t aLoadType)
|
|||||||
emplacedResultPrincipalURI,
|
emplacedResultPrincipalURI,
|
||||||
false,
|
false,
|
||||||
loadReplace,
|
loadReplace,
|
||||||
false, // IsFromProcessingFrameAttributes
|
|
||||||
referrerURI,
|
referrerURI,
|
||||||
referrerPolicy,
|
referrerPolicy,
|
||||||
triggeringPrincipal,
|
triggeringPrincipal,
|
||||||
@@ -13358,7 +13341,6 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent,
|
|||||||
Nothing(), // Let the protocol handler assign it
|
Nothing(), // Let the protocol handler assign it
|
||||||
false,
|
false,
|
||||||
false, // LoadReplace
|
false, // LoadReplace
|
||||||
false, // IsFromProcessingFrameAttributes
|
|
||||||
referer, // Referer URI
|
referer, // Referer URI
|
||||||
refererPolicy, // Referer policy
|
refererPolicy, // Referer policy
|
||||||
triggeringPrincipal,
|
triggeringPrincipal,
|
||||||
|
|||||||
@@ -532,7 +532,6 @@ private: // member functions
|
|||||||
mozilla::Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
mozilla::Maybe<nsCOMPtr<nsIURI>> const& aResultPrincipalURI,
|
||||||
bool aKeepResultPrincipalURIIfSet,
|
bool aKeepResultPrincipalURIIfSet,
|
||||||
bool aLoadReplace,
|
bool aLoadReplace,
|
||||||
bool aIsFromProcessingFrameAttributes,
|
|
||||||
bool aLoadFromExternal,
|
bool aLoadFromExternal,
|
||||||
bool aForceAllowDataURI,
|
bool aForceAllowDataURI,
|
||||||
bool aOriginalFrameSrc,
|
bool aOriginalFrameSrc,
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ nsDocShellLoadState::nsDocShellLoadState()
|
|||||||
, mTypeHint(VoidCString())
|
, mTypeHint(VoidCString())
|
||||||
, mFileName(VoidString())
|
, mFileName(VoidString())
|
||||||
, mDocShellInternalLoadFlags(0)
|
, mDocShellInternalLoadFlags(0)
|
||||||
, mIsFromProcessingFrameAttributes(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,9 +165,6 @@ public:
|
|||||||
// information and origin attributes.
|
// information and origin attributes.
|
||||||
nsresult SetupTriggeringPrincipal(const mozilla::OriginAttributes& aOriginAttributes);
|
nsresult SetupTriggeringPrincipal(const mozilla::OriginAttributes& aOriginAttributes);
|
||||||
|
|
||||||
void SetIsFromProcessingFrameAttributes() { mIsFromProcessingFrameAttributes = true; }
|
|
||||||
bool GetIsFromProcessingFrameAttributes() { return mIsFromProcessingFrameAttributes; }
|
|
||||||
|
|
||||||
// When loading a document through nsDocShell::LoadURI(), a special set of
|
// When loading a document through nsDocShell::LoadURI(), a special set of
|
||||||
// flags needs to be set based on other values in nsDocShellLoadState. This
|
// flags needs to be set based on other values in nsDocShellLoadState. This
|
||||||
// function calculates those flags, before the LoadState is passed to
|
// function calculates those flags, before the LoadState is passed to
|
||||||
@@ -291,10 +288,6 @@ protected:
|
|||||||
// nsDocShell::InternalLoad, taken from the INTERNAL_LOAD consts in
|
// nsDocShell::InternalLoad, taken from the INTERNAL_LOAD consts in
|
||||||
// nsIDocShell.idl
|
// nsIDocShell.idl
|
||||||
uint32_t mDocShellInternalLoadFlags;
|
uint32_t mDocShellInternalLoadFlags;
|
||||||
|
|
||||||
// This will be true if this load is triggered by attribute changes.
|
|
||||||
// See nsILoadInfo.isFromProcessingFrameAttributes
|
|
||||||
bool mIsFromProcessingFrameAttributes;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsDocShellLoadState_h__ */
|
#endif /* nsDocShellLoadState_h__ */
|
||||||
|
|||||||
@@ -137,9 +137,6 @@ interface nsIDocShell : nsIDocShellTreeItem
|
|||||||
* @param aLoadReplace - If set LOAD_REPLACE flag will be set on the
|
* @param aLoadReplace - If set LOAD_REPLACE flag will be set on the
|
||||||
* channel. aOriginalURI is null, this argument is
|
* channel. aOriginalURI is null, this argument is
|
||||||
* ignored.
|
* ignored.
|
||||||
* @param aIsFromProcessingFrameAttributes
|
|
||||||
* - If this is a load triggered by changing frame attributes.
|
|
||||||
* See nsILoadInfo.isFromProcessingFrameAttributes
|
|
||||||
* @param aReferrer - Referring URI
|
* @param aReferrer - Referring URI
|
||||||
* @param aReferrerPolicy - Referrer policy
|
* @param aReferrerPolicy - Referrer policy
|
||||||
* @param aTriggeringPrincipal - A non-null principal that initiated that load.
|
* @param aTriggeringPrincipal - A non-null principal that initiated that load.
|
||||||
@@ -187,7 +184,6 @@ interface nsIDocShell : nsIDocShellTreeItem
|
|||||||
[const] in MaybeURI aResultPrincipalURI,
|
[const] in MaybeURI aResultPrincipalURI,
|
||||||
in bool aKeepResultPrincipalURIIfSet,
|
in bool aKeepResultPrincipalURIIfSet,
|
||||||
in boolean aLoadReplace,
|
in boolean aLoadReplace,
|
||||||
in boolean aIsFromProcessingFrameAttributes,
|
|
||||||
in nsIURI aReferrer,
|
in nsIURI aReferrer,
|
||||||
in unsigned long aReferrerPolicy,
|
in unsigned long aReferrerPolicy,
|
||||||
in nsIPrincipal aTriggeringPrincipal,
|
in nsIPrincipal aTriggeringPrincipal,
|
||||||
|
|||||||
@@ -464,8 +464,6 @@ nsFrameLoader::ReallyStartLoadingInternal()
|
|||||||
nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
|
nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadState->SetIsFromProcessingFrameAttributes();
|
|
||||||
|
|
||||||
// Kick off the load...
|
// Kick off the load...
|
||||||
bool tmpState = mNeedsAsyncDestroy;
|
bool tmpState = mNeedsAsyncDestroy;
|
||||||
mNeedsAsyncDestroy = true;
|
mNeedsAsyncDestroy = true;
|
||||||
|
|||||||
@@ -453,8 +453,7 @@ LoadInfoToLoadInfoArgs(nsILoadInfo *aLoadInfo,
|
|||||||
aLoadInfo->GetLoadTriggeredFromExternal(),
|
aLoadInfo->GetLoadTriggeredFromExternal(),
|
||||||
aLoadInfo->GetServiceWorkerTaintingSynthesized(),
|
aLoadInfo->GetServiceWorkerTaintingSynthesized(),
|
||||||
aLoadInfo->GetDocumentHasUserInteracted(),
|
aLoadInfo->GetDocumentHasUserInteracted(),
|
||||||
aLoadInfo->GetDocumentHasLoaded(),
|
aLoadInfo->GetDocumentHasLoaded()
|
||||||
aLoadInfo->GetIsFromProcessingFrameAttributes()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@@ -572,7 +571,7 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
|
|||||||
loadInfoArgs.controller().get_IPCServiceWorkerDescriptor()));
|
loadInfoArgs.controller().get_IPCServiceWorkerDescriptor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<mozilla::LoadInfo> loadInfo =
|
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||||
new mozilla::LoadInfo(loadingPrincipal,
|
new mozilla::LoadInfo(loadingPrincipal,
|
||||||
triggeringPrincipal,
|
triggeringPrincipal,
|
||||||
principalToInherit,
|
principalToInherit,
|
||||||
@@ -620,10 +619,6 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
|
|||||||
loadInfoArgs.documentHasLoaded()
|
loadInfoArgs.documentHasLoaded()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (loadInfoArgs.isFromProcessingFrameAttributes()) {
|
|
||||||
loadInfo->SetIsFromProcessingFrameAttributes();
|
|
||||||
}
|
|
||||||
|
|
||||||
loadInfo.forget(outLoadInfo);
|
loadInfo.forget(outLoadInfo);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
|||||||
, mIsTrackerBlocked(false)
|
, mIsTrackerBlocked(false)
|
||||||
, mDocumentHasUserInteracted(false)
|
, mDocumentHasUserInteracted(false)
|
||||||
, mDocumentHasLoaded(false)
|
, mDocumentHasLoaded(false)
|
||||||
, mIsFromProcessingFrameAttributes(false)
|
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mLoadingPrincipal);
|
MOZ_ASSERT(mLoadingPrincipal);
|
||||||
MOZ_ASSERT(mTriggeringPrincipal);
|
MOZ_ASSERT(mTriggeringPrincipal);
|
||||||
@@ -367,7 +366,6 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* aOuterWindow,
|
|||||||
, mIsTrackerBlocked(false)
|
, mIsTrackerBlocked(false)
|
||||||
, mDocumentHasUserInteracted(false)
|
, mDocumentHasUserInteracted(false)
|
||||||
, mDocumentHasLoaded(false)
|
, mDocumentHasLoaded(false)
|
||||||
, mIsFromProcessingFrameAttributes(false)
|
|
||||||
{
|
{
|
||||||
// Top-level loads are never third-party
|
// Top-level loads are never third-party
|
||||||
// Grab the information we can out of the window.
|
// Grab the information we can out of the window.
|
||||||
@@ -470,7 +468,6 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
|
|||||||
, mIsTrackerBlocked(rhs.mIsTrackerBlocked)
|
, mIsTrackerBlocked(rhs.mIsTrackerBlocked)
|
||||||
, mDocumentHasUserInteracted(rhs.mDocumentHasUserInteracted)
|
, mDocumentHasUserInteracted(rhs.mDocumentHasUserInteracted)
|
||||||
, mDocumentHasLoaded(rhs.mDocumentHasLoaded)
|
, mDocumentHasLoaded(rhs.mDocumentHasLoaded)
|
||||||
, mIsFromProcessingFrameAttributes(rhs.mIsFromProcessingFrameAttributes)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,7 +562,6 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
|||||||
, mIsTrackerBlocked(false)
|
, mIsTrackerBlocked(false)
|
||||||
, mDocumentHasUserInteracted(aDocumentHasUserInteracted)
|
, mDocumentHasUserInteracted(aDocumentHasUserInteracted)
|
||||||
, mDocumentHasLoaded(aDocumentHasLoaded)
|
, mDocumentHasLoaded(aDocumentHasLoaded)
|
||||||
, mIsFromProcessingFrameAttributes(false)
|
|
||||||
{
|
{
|
||||||
// Only top level TYPE_DOCUMENT loads can have a null loadingPrincipal
|
// Only top level TYPE_DOCUMENT loads can have a null loadingPrincipal
|
||||||
MOZ_ASSERT(mLoadingPrincipal || aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
|
MOZ_ASSERT(mLoadingPrincipal || aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
|
||||||
@@ -1454,20 +1450,6 @@ LoadInfo::GetIsTopLevelLoad(bool *aResult)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LoadInfo::SetIsFromProcessingFrameAttributes()
|
|
||||||
{
|
|
||||||
mIsFromProcessingFrameAttributes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
LoadInfo::GetIsFromProcessingFrameAttributes(bool *aIsFromProcessingFrameAttributes)
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(aIsFromProcessingFrameAttributes);
|
|
||||||
*aIsFromProcessingFrameAttributes = mIsFromProcessingFrameAttributes;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
LoadInfo::GetResultPrincipalURI(nsIURI **aURI)
|
LoadInfo::GetResultPrincipalURI(nsIURI **aURI)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ public:
|
|||||||
void SetUpgradeInsecureRequests();
|
void SetUpgradeInsecureRequests();
|
||||||
void SetBrowserUpgradeInsecureRequests();
|
void SetBrowserUpgradeInsecureRequests();
|
||||||
void SetBrowserWouldUpgradeInsecureRequests();
|
void SetBrowserWouldUpgradeInsecureRequests();
|
||||||
void SetIsFromProcessingFrameAttributes();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// private constructor that is only allowed to be called from within
|
// private constructor that is only allowed to be called from within
|
||||||
@@ -220,11 +219,6 @@ private:
|
|||||||
bool mIsTrackerBlocked;
|
bool mIsTrackerBlocked;
|
||||||
bool mDocumentHasUserInteracted;
|
bool mDocumentHasUserInteracted;
|
||||||
bool mDocumentHasLoaded;
|
bool mDocumentHasLoaded;
|
||||||
|
|
||||||
// Is true if this load was triggered by processing the attributes of the
|
|
||||||
// browsing context container.
|
|
||||||
// See nsILoadInfo.isFromProcessingFrameAttributes
|
|
||||||
bool mIsFromProcessingFrameAttributes;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace net
|
} // namespace net
|
||||||
|
|||||||
@@ -1068,11 +1068,4 @@ interface nsILoadInfo : nsISupports
|
|||||||
* See bug 1500908.
|
* See bug 1500908.
|
||||||
*/
|
*/
|
||||||
attribute nsICSPEventListener cspEventListener;
|
attribute nsICSPEventListener cspEventListener;
|
||||||
|
|
||||||
/**
|
|
||||||
* This attribute will be true if this is a load triggered by
|
|
||||||
* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
|
|
||||||
* or https://html.spec.whatwg.org/multipage/obsolete.html#process-the-frame-attributes
|
|
||||||
*/
|
|
||||||
[infallible] readonly attribute boolean isFromProcessingFrameAttributes;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ struct LoadInfoArgs
|
|||||||
bool serviceWorkerTaintingSynthesized;
|
bool serviceWorkerTaintingSynthesized;
|
||||||
bool documentHasUserInteracted;
|
bool documentHasUserInteracted;
|
||||||
bool documentHasLoaded;
|
bool documentHasLoaded;
|
||||||
bool isFromProcessingFrameAttributes;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4413,10 +4413,11 @@ HttpBaseChannel::GetPerformanceStorage()
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLoadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_SUBDOCUMENT &&
|
// We only add to the document's performance object if it has the same
|
||||||
!mLoadInfo->GetIsFromProcessingFrameAttributes()) {
|
// principal as the one triggering the load. This is to prevent navigations
|
||||||
// We only report loads caused by processing the attributes of the
|
// triggered _by_ the iframe from showing up in the parent document's
|
||||||
// browsing context container.
|
// performance entries if they have different origins.
|
||||||
|
if (!mLoadInfo->TriggeringPrincipal()->Equals(loadingDocument->NodePrincipal())) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[resource_subframe_self_navigation.html]
|
||||||
|
[Subsequent <iframe> navigations don't appear in the resource-timing buffer.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Subsequent <frame> navigations don't appear in the resource-timing buffer.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Subsequent <embed> navigations don't appear in the resource-timing buffer.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Subsequent <object> navigations don't appear in the resource-timing buffer.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
Reference in New Issue
Block a user