mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1405176 - Change IsFrame() in nsDocShell to be an explicitly passed attribute. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D15967 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
21ad33d612
commit
ac833b312a
@ -385,7 +385,8 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext)
|
||||
mInvisible(false),
|
||||
mHasLoadedNonBlankURI(false),
|
||||
mBlankTiming(false),
|
||||
mTitleValidForCurrentURI(false) {
|
||||
mTitleValidForCurrentURI(false),
|
||||
mIsFrame(false) {
|
||||
mHistoryID.m0 = 0;
|
||||
mHistoryID.m1 = 0;
|
||||
mHistoryID.m2 = 0;
|
||||
@ -12100,11 +12101,7 @@ nsresult nsDocShell::EnsureFind() {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool nsDocShell::IsFrame() {
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent;
|
||||
GetSameTypeParent(getter_AddRefs(parent));
|
||||
return !!parent;
|
||||
}
|
||||
bool nsDocShell::IsFrame() { return mIsFrame; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::IsBeingDestroyed(bool* aDoomed) {
|
||||
|
@ -284,6 +284,8 @@ 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();
|
||||
@ -1154,6 +1156,8 @@ class nsDocShell final : public nsDocLoader,
|
||||
|
||||
// This flag indicates when the title is valid for the current URI.
|
||||
bool mTitleValidForCurrentURI : 1;
|
||||
|
||||
bool mIsFrame : 1;
|
||||
};
|
||||
|
||||
#endif /* nsDocShell_h__ */
|
||||
|
@ -2028,6 +2028,12 @@ nsresult nsFrameLoader::MaybeCreateDocShell() {
|
||||
attrs.mAppId = nsIScriptSecurityManager::NO_APP_ID;
|
||||
attrs.mInIsolatedMozBrowser = OwnerIsIsolatedMozBrowserFrame();
|
||||
mDocShell->SetFrameType(nsIDocShell::FRAME_TYPE_BROWSER);
|
||||
} else {
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentCheck;
|
||||
mDocShell->GetSameTypeParent(getter_AddRefs(parentCheck));
|
||||
if (!!parentCheck) {
|
||||
mDocShell->SetIsFrame();
|
||||
}
|
||||
}
|
||||
|
||||
// Apply sandbox flags even if our owner is not an iframe, as this copies
|
||||
|
@ -1,6 +0,0 @@
|
||||
[ignore-opens-during-unload.window.html]
|
||||
expected:
|
||||
if debug and not webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): CRASH
|
||||
if debug and not webrender and not e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): CRASH
|
||||
if debug and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): CRASH
|
||||
if debug and (os == "mac" or os == "win"): CRASH
|
Loading…
Reference in New Issue
Block a user