зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1592829 - Remove hasContentOpener logic from C++ and check for content opener directly from JavaScript, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D51318 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2cdaad55a4
Коммит
1f167c323c
|
@ -29,7 +29,6 @@ tags = trackingprotection
|
|||
[browser_privatebrowsing_certexceptionsui.js]
|
||||
[browser_privatebrowsing_concurrent.js]
|
||||
[browser_privatebrowsing_context_and_chromeFlags.js]
|
||||
skip-if = fission
|
||||
[browser_privatebrowsing_crh.js]
|
||||
[browser_privatebrowsing_downloadLastDir.js]
|
||||
skip-if = verify
|
||||
|
|
|
@ -54,7 +54,9 @@ add_task(async function test_context_and_chromeFlags() {
|
|||
|
||||
let browser = win.gBrowser.selectedBrowser;
|
||||
|
||||
let newWinPromise = BrowserTestUtils.waitForNewWindow();
|
||||
let newWinPromise = BrowserTestUtils.waitForNewWindow({
|
||||
url: "http://example.com/",
|
||||
});
|
||||
await ContentTask.spawn(browser, null, async function() {
|
||||
content.open("http://example.com", "_blank", "width=100,height=100");
|
||||
});
|
||||
|
|
|
@ -138,7 +138,6 @@ function tunnelToInnerBrowser(outer, inner) {
|
|||
// Various browser methods access the `frameLoader` property, including:
|
||||
// * `saveBrowser` from contentAreaUtils.js
|
||||
// * `docShellIsActive` from browser.js
|
||||
// * `hasContentOpener` from browser.js
|
||||
// * `preserveLayers` from browser.js
|
||||
// * `receiveMessage` from SessionStore.jsm
|
||||
// In general, these methods are interested in the `frameLoader` for the content,
|
||||
|
|
|
@ -57,7 +57,6 @@ interface nsIRemoteTab : nsISupports
|
|||
*/
|
||||
readonly attribute int32_t osPid;
|
||||
|
||||
readonly attribute boolean hasContentOpener;
|
||||
/**
|
||||
* True if we've previously received layers for this tab when switching to
|
||||
* it.
|
||||
|
|
|
@ -259,17 +259,6 @@ BrowserHost::GetOsPid(int32_t* aOsPid) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean hasContentOpener; */
|
||||
NS_IMETHODIMP
|
||||
BrowserHost::GetHasContentOpener(bool* aHasContentOpener) {
|
||||
if (!mRoot) {
|
||||
*aHasContentOpener = false;
|
||||
return NS_OK;
|
||||
}
|
||||
*aHasContentOpener = mRoot->GetHasContentOpener();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean hasPresented; */
|
||||
NS_IMETHODIMP
|
||||
BrowserHost::GetHasPresented(bool* aHasPresented) {
|
||||
|
|
|
@ -211,7 +211,6 @@ BrowserParent::BrowserParent(ContentParent* aManager, const TabId& aTabId,
|
|||
mMarkedDestroying(false),
|
||||
mIsDestroyed(false),
|
||||
mTabSetsCursor(false),
|
||||
mHasContentOpener(false),
|
||||
mPreserveLayers(false),
|
||||
mRenderLayers(true),
|
||||
mActiveInPriorityManager(false),
|
||||
|
@ -3352,12 +3351,6 @@ void BrowserParent::Deprioritize() {
|
|||
}
|
||||
}
|
||||
|
||||
bool BrowserParent::GetHasContentOpener() { return mHasContentOpener; }
|
||||
|
||||
void BrowserParent::SetHasContentOpener(bool aHasContentOpener) {
|
||||
mHasContentOpener = aHasContentOpener;
|
||||
}
|
||||
|
||||
bool BrowserParent::StartApzAutoscroll(float aAnchorX, float aAnchorY,
|
||||
nsViewID aScrollId,
|
||||
uint32_t aPresShellId) {
|
||||
|
|
|
@ -254,7 +254,6 @@ class BrowserParent final : public PBrowserParent,
|
|||
mBrowserDOMWindow = aBrowserDOMWindow;
|
||||
}
|
||||
|
||||
void SetHasContentOpener(bool aHasContentOpener);
|
||||
|
||||
void SwapFrameScriptsFrom(nsTArray<FrameScriptInfo>& aFrameScripts) {
|
||||
aFrameScripts.SwapElements(mDelayedFrameScripts);
|
||||
|
@ -741,8 +740,6 @@ class BrowserParent final : public PBrowserParent,
|
|||
|
||||
void Deprioritize();
|
||||
|
||||
bool GetHasContentOpener();
|
||||
|
||||
bool StartApzAutoscroll(float aAnchorX, float aAnchorY, nsViewID aScrollId,
|
||||
uint32_t aPresShellId);
|
||||
void StopApzAutoscroll(nsViewID aScrollId, uint32_t aPresShellId);
|
||||
|
@ -948,8 +945,6 @@ class BrowserParent final : public PBrowserParent,
|
|||
// cursor. This happens whenever the cursor is in the tab's region.
|
||||
bool mTabSetsCursor;
|
||||
|
||||
bool mHasContentOpener;
|
||||
|
||||
// If this flag is set, then the tab's layers will be preserved even when
|
||||
// the tab's docshell is inactive.
|
||||
bool mPreserveLayers;
|
||||
|
|
|
@ -4948,10 +4948,6 @@ mozilla::ipc::IPCResult ContentParent::RecvCreateWindow(
|
|||
}
|
||||
});
|
||||
|
||||
// Content has requested that we open this new content window, so
|
||||
// we must have an opener.
|
||||
newTab->SetHasContentOpener(true);
|
||||
|
||||
BrowserParent::AutoUseNewTab aunt(newTab, &cwi.urlToLoad());
|
||||
const uint64_t nextRemoteTabId = ++sNextRemoteTabId;
|
||||
sNextBrowserParents.Put(nextRemoteTabId, newTab);
|
||||
|
|
|
@ -854,10 +854,7 @@
|
|||
}
|
||||
|
||||
get hasContentOpener() {
|
||||
if (this.isRemoteBrowser) {
|
||||
return this.frameLoader.remoteTab.hasContentOpener;
|
||||
}
|
||||
return !!this.contentWindow.opener;
|
||||
return !!this.browsingContext.opener;
|
||||
}
|
||||
|
||||
get mStrBundle() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче