зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1594529: Infer nsDocShell::IsFrame from BrowsingContext. r=nika
This fixes the content policy type for document loads in these frames, where the explicit mIsFrame flag was not set, due to DocShell creation taking a different code path in remote frames than in in-process frames. Differential Revision: https://phabricator.services.mozilla.com/D52093 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c277593b98
Коммит
c4b5d4bfb9
|
@ -388,7 +388,6 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
|
|||
mHasLoadedNonBlankURI(false),
|
||||
mBlankTiming(false),
|
||||
mTitleValidForCurrentURI(false),
|
||||
mIsFrame(false),
|
||||
mSkipBrowsingContextDetachOnDestroy(false),
|
||||
mWatchedByDevtools(false),
|
||||
mIsNavigating(false) {
|
||||
|
@ -12088,8 +12087,6 @@ nsresult nsDocShell::EnsureFind() {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool nsDocShell::IsFrame() { return mIsFrame; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::IsBeingDestroyed(bool* aDoomed) {
|
||||
NS_ENSURE_ARG(aDoomed);
|
||||
|
|
|
@ -348,8 +348,6 @@ class nsDocShell final : public nsDocLoader,
|
|||
void SetInFrameSwap(bool aInSwap) { mInFrameSwap = aInSwap; }
|
||||
bool InFrameSwap();
|
||||
|
||||
void SetIsFrame() { mIsFrame = true; };
|
||||
|
||||
const mozilla::Encoding* GetForcedCharset() { return mForcedCharset; }
|
||||
|
||||
mozilla::HTMLEditor* GetHTMLEditorInternal();
|
||||
|
@ -971,7 +969,7 @@ class nsDocShell final : public nsDocLoader,
|
|||
void RecomputeCanExecuteScripts();
|
||||
void ClearFrameHistory(nsISHEntry* aEntry);
|
||||
void UpdateGlobalHistoryTitle(nsIURI* aURI);
|
||||
bool IsFrame();
|
||||
bool IsFrame() { return mBrowsingContext->GetParent(); }
|
||||
bool CanSetOriginAttributes();
|
||||
bool ShouldBlockLoadingForBackButton();
|
||||
bool ShouldDiscardLayoutState(nsIHttpChannel* aChannel);
|
||||
|
@ -1330,8 +1328,6 @@ class nsDocShell final : public nsDocLoader,
|
|||
// This flag indicates when the title is valid for the current URI.
|
||||
bool mTitleValidForCurrentURI : 1;
|
||||
|
||||
bool mIsFrame : 1;
|
||||
|
||||
// If mSkipBrowsingContextDetachOnDestroy is set to true, then when the
|
||||
// docshell is destroyed, the browsing context will not be detached. This is
|
||||
// for cases where we want to preserve the BC for future use.
|
||||
|
|
|
@ -2133,8 +2133,6 @@ nsresult nsFrameLoader::MaybeCreateDocShell() {
|
|||
|
||||
if (OwnerIsMozBrowserFrame()) {
|
||||
docShell->SetFrameType(nsIDocShell::FRAME_TYPE_BROWSER);
|
||||
} else if (mBrowsingContext->GetParent()) {
|
||||
docShell->SetIsFrame();
|
||||
}
|
||||
|
||||
// Apply sandbox flags even if our owner is not an iframe, as this copies
|
||||
|
|
Загрузка…
Ссылка в новой задаче