summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-09-16 22:28:12 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-09-16 22:28:12 -0400
commite941126ea38ec701b4a1d277c24f0f32a3dfd576 (patch)
treefef93abe3eda941aee062ffb84dff6c4a80ba037
parentdb353768e17237de39028da1c8c6cd11df2bd19c (diff)
downloadiceweasel-uxp-e941126ea38ec701b4a1d277c24f0f32a3dfd576.tar.gz
Remove contextual identity followup: browser-context.inc tabbrowser.xml SessionStore.jsm
-rw-r--r--base/content/browser-context.inc15
-rw-r--r--base/content/browser-menubar.inc1
-rw-r--r--base/content/tabbrowser.xml59
-rw-r--r--components/sessionstore/SessionStore.jsm40
4 files changed, 17 insertions, 98 deletions
diff --git a/base/content/browser-context.inc b/base/content/browser-context.inc
index e8c714c..88cab56 100644
--- a/base/content/browser-context.inc
+++ b/base/content/browser-context.inc
@@ -50,23 +50,10 @@
label="&openLinkCmdInCurrent.label;"
accesskey="&openLinkCmdInCurrent.accesskey;"
oncommand="gContextMenu.openLinkInCurrent();"/>
-# label and data-usercontextid are dynamically set.
- <menuitem id="context-openlinkincontainertab"
- accesskey="&openLinkCmdInTab.accesskey;"
- oncommand="gContextMenu.openLinkInTab(event);"/>
<menuitem id="context-openlinkintab"
label="&openLinkCmdInTab.label;"
accesskey="&openLinkCmdInTab.accesskey;"
- data-usercontextid="0"
- oncommand="gContextMenu.openLinkInTab(event);"/>
-
- <menu id="context-openlinkinusercontext-menu"
- label="&openLinkCmdInContainerTab.label;"
- accesskey="&openLinkCmdInContainerTab.accesskey;"
- hidden="true">
- <menupopup oncommand="gContextMenu.openLinkInTab(event);"
- onpopupshowing="return gContextMenu.createContainerMenu(event);" />
- </menu>
+ oncommand="gContextMenu.openLinkInTab();"/>
<menuitem id="context-openlink"
label="&openLinkCmd.label;"
diff --git a/base/content/browser-menubar.inc b/base/content/browser-menubar.inc
index 2d9c1ea..0549ad9 100644
--- a/base/content/browser-menubar.inc
+++ b/base/content/browser-menubar.inc
@@ -17,7 +17,6 @@
command="cmd_newNavigatorTab"
key="key_newNavigatorTab"
accesskey="&tabCmd.accesskey;"/>
- </menu>
<menuitem id="menu_newNavigator"
label="&newNavigatorCmd.label;"
accesskey="&newNavigatorCmd.accesskey;"
diff --git a/base/content/tabbrowser.xml b/base/content/tabbrowser.xml
index 44b8acb..74964f7 100644
--- a/base/content/tabbrowser.xml
+++ b/base/content/tabbrowser.xml
@@ -814,10 +814,8 @@
}
let unifiedComplete = this.mTabBrowser._unifiedComplete;
- let userContextId = this.mBrowser.getAttribute("usercontextid") || 0;
if (this.mBrowser.registeredOpenURI) {
- unifiedComplete.unregisterOpenPage(this.mBrowser.registeredOpenURI,
- userContextId);
+ unifiedComplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
delete this.mBrowser.registeredOpenURI;
}
// Tabs in private windows aren't registered as "Open" so
@@ -825,7 +823,7 @@
if (!isBlankPageURL(aLocation.spec) &&
(!PrivateBrowsingUtils.isWindowPrivate(window) ||
PrivateBrowsingUtils.permanentPrivateBrowsing)) {
- unifiedComplete.registerOpenPage(aLocation, userContextId);
+ unifiedComplete.registerOpenPage(aLocation);
this.mBrowser.registeredOpenURI = aLocation;
}
}
@@ -1485,7 +1483,6 @@
var aSkipAnimation;
var aForceNotRemote;
var aNoReferrer;
- var aUserContextId;
var aRelatedBrowser;
var aOriginPrincipal;
var aOpener;
@@ -1506,7 +1503,6 @@
aSkipAnimation = params.skipAnimation;
aForceNotRemote = params.forceNotRemote;
aNoReferrer = params.noReferrer;
- aUserContextId = params.userContextId;
aRelatedBrowser = params.relatedBrowser;
aOriginPrincipal = params.originPrincipal;
aOpener = params.opener;
@@ -1529,7 +1525,6 @@
allowMixedContent: aAllowMixedContent,
forceNotRemote: aForceNotRemote,
noReferrer: aNoReferrer,
- userContextId: aUserContextId,
originPrincipal: aOriginPrincipal,
relatedBrowser: aRelatedBrowser,
opener: aOpener });
@@ -1550,7 +1545,6 @@
let aTargetTab;
let aNewIndex = -1;
let aPostDatas = [];
- let aUserContextId;
if (arguments.length == 2 &&
typeof arguments[1] == "object") {
let params = arguments[1];
@@ -1561,7 +1555,6 @@
aNewIndex = typeof params.newIndex === "number" ?
params.newIndex : aNewIndex;
aPostDatas = params.postDatas || aPostDatas;
- aUserContextId = params.userContextId;
}
if (!aURIs.length)
@@ -1611,7 +1604,6 @@
skipAnimation: multiple,
allowThirdPartyFixup: aAllowThirdPartyFixup,
postData: aPostDatas[0],
- userContextId: aUserContextId
});
if (aNewIndex !== -1) {
this.moveTabTo(firstTabAdded, aNewIndex);
@@ -1625,7 +1617,6 @@
skipAnimation: true,
allowThirdPartyFixup: aAllowThirdPartyFixup,
postData: aPostDatas[i],
- userContextId: aUserContextId
});
if (targetTabIndex !== -1)
this.moveTabTo(tab, ++tabNum);
@@ -1898,7 +1889,7 @@
<body>
<![CDATA[
// Supported parameters:
- // userContextId, remote, isPreloadBrowser, uriIsAboutBlank, permanentKey
+ // remote, isPreloadBrowser, uriIsAboutBlank, permanentKey
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -1910,10 +1901,6 @@
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
- if (aParams.userContextId) {
- b.setAttribute("usercontextid", aParams.userContextId);
- }
-
if (aParams.remote) {
b.setAttribute("remote", "true");
}
@@ -1988,7 +1975,7 @@
"use strict";
// Supported parameters:
- // forceNotRemote, userContextId
+ // forceNotRemote
let uriIsAboutBlank = !aURI || aURI == "about:blank";
@@ -2006,7 +1993,6 @@
// Private windows are not included because both the label and the
// icon for the tab would be set incorrectly (see bug 1195981).
if (aURI == BROWSER_NEW_TAB_URL &&
- !aParams.userContextId &&
!PrivateBrowsingUtils.isWindowPrivate(window)) {
browser = this._getPreloadedBrowser();
if (browser) {
@@ -2020,7 +2006,6 @@
browser = this._createBrowser({permanentKey: aTab.permanentKey,
remote: remote,
uriIsAboutBlank: uriIsAboutBlank,
- userContextId: aParams.userContextId,
relatedBrowser: aParams.relatedBrowser,
opener: aParams.opener});
}
@@ -2095,7 +2080,6 @@
var aAllowMixedContent;
var aForceNotRemote;
var aNoReferrer;
- var aUserContextId;
var aEventDetail;
var aRelatedBrowser;
var aOriginPrincipal;
@@ -2117,7 +2101,6 @@
aAllowMixedContent = params.allowMixedContent;
aForceNotRemote = params.forceNotRemote;
aNoReferrer = params.noReferrer;
- aUserContextId = params.userContextId;
aEventDetail = params.eventDetail;
aRelatedBrowser = params.relatedBrowser;
aOriginPrincipal = params.originPrincipal;
@@ -2187,7 +2170,6 @@
// of tab.linkedBrowser.
let browserParams = {
forceNotRemote: aForceNotRemote,
- userContextId: aUserContextId,
relatedBrowser: aRelatedBrowser,
opener: aOpener,
};
@@ -2566,8 +2548,7 @@
listener.destroy();
if (browser.registeredOpenURI && !aAdoptedByTab) {
- this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
@@ -2766,11 +2747,6 @@
if (ourBrowser.isRemoteBrowser != otherBrowser.isRemoteBrowser)
return;
- // Keep the userContextId if set on other browser
- if (otherBrowser.hasAttribute("usercontextid")) {
- ourBrowser.setAttribute("usercontextid", otherBrowser.getAttribute("usercontextid"));
- }
-
// That's gBrowser for the other window, not the tab's browser!
var remoteBrowser = aOtherTab.ownerDocument.defaultView.gBrowser;
var isPending = aOtherTab.hasAttribute("pending");
@@ -2803,10 +2779,6 @@
aOurTab.setAttribute("soundplaying", "true");
modifiedAttrs.push("soundplaying");
}
- if (aOtherTab.hasAttribute("usercontextid")) {
- aOurTab.setUserContextId(aOtherTab.getAttribute("usercontextid"));
- modifiedAttrs.push("usercontextid");
- }
if (aOtherTab.hasAttribute("sharing")) {
aOurTab.setAttribute("sharing", aOtherTab.getAttribute("sharing"));
modifiedAttrs.push("sharing");
@@ -2944,8 +2916,7 @@
<![CDATA[
// If the current URI is registered as open remove it from the list.
if (aOurBrowser.registeredOpenURI) {
- this._unifiedComplete.unregisterOpenPage(aOurBrowser.registeredOpenURI,
- aOurBrowser.getAttribute("usercontextid") || 0);
+ this._unifiedComplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
delete aOurBrowser.registeredOpenURI;
}
@@ -3282,10 +3253,6 @@
// it in the other window (making it seem to have moved between
// windows).
let params = { eventDetail: { adoptedTab: aTab } };
- if (aTab.hasAttribute("usercontextid")) {
- // new tab must have the same usercontextid as the old one
- params.userContextId = aTab.getAttribute("usercontextid");
- }
let newTab = this.addTab("about:blank", params);
let newBrowser = this.getBrowserForTab(newTab);
let newURL = aTab.linkedBrowser.currentURI.spec;
@@ -4605,7 +4572,6 @@
disableSetDesktopBackground: data.disableSetDesktopBg,
loginFillInfo: data.loginFillInfo,
parentAllowsMixedContent: data.parentAllowsMixedContent,
- userContextId: data.userContextId,
};
let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
let event = gContextMenuContentData.event;
@@ -4815,8 +4781,7 @@
for (let tab of this.tabs) {
let browser = tab.linkedBrowser;
if (browser.registeredOpenURI) {
- this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
let filter = this._tabFilters.get(tab);
@@ -6360,7 +6325,6 @@
inBackground = !inBackground;
let targetTab = this._getDragTargetTab(event, true);
- let userContextId = this.selectedItem.getAttribute("usercontextid");
let replace = !!targetTab;
let newIndex = this._getDropIndex(event, true);
let urls = links.map(link => link.url);
@@ -6370,7 +6334,6 @@
allowThirdPartyFixup: true,
targetTab,
newIndex,
- userContextId,
});
}
@@ -6631,14 +6594,6 @@
-->
<field name="muteReason">undefined</field>
- <property name="userContextId" readonly="true">
- <getter>
- return this.hasAttribute("usercontextid")
- ? parseInt(this.getAttribute("usercontextid"))
- : 0;
- </getter>
- </property>
-
<property name="soundPlaying" readonly="true">
<getter>
return this.getAttribute("soundplaying") == "true";
diff --git a/components/sessionstore/SessionStore.jsm b/components/sessionstore/SessionStore.jsm
index e23b205..ed87256 100644
--- a/components/sessionstore/SessionStore.jsm
+++ b/components/sessionstore/SessionStore.jsm
@@ -2204,10 +2204,9 @@ var SessionStoreInternal = {
}
// Create a new tab.
- let userContextId = aTab.getAttribute("usercontextid");
let newTab = aTab == aWindow.gBrowser.selectedTab ?
- aWindow.gBrowser.addTab(null, {relatedToCurrent: true, ownerTab: aTab, userContextId}) :
- aWindow.gBrowser.addTab(null, {userContextId});
+ aWindow.gBrowser.addTab(null, {relatedToCurrent: true, ownerTab: aTab}) :
+ aWindow.gBrowser.addTab();
// Set tab title to "Connecting..." and start the throbber to pretend we're
// doing something while actually waiting for data from the frame script.
@@ -2296,7 +2295,7 @@ var SessionStoreInternal = {
// create a new tab
let tabbrowser = aWindow.gBrowser;
- let tab = tabbrowser.selectedTab = tabbrowser.addTab(null, state);
+ let tab = tabbrowser.selectedTab = tabbrowser.addTab();
// restore tab content
this.restoreTab(tab, state);
@@ -3100,30 +3099,12 @@ var SessionStoreInternal = {
let numVisibleTabs = 0;
for (var t = 0; t < newTabCount; t++) {
- // When trying to restore into existing tab, we also take the userContextId
- // into account if present.
- let userContextId = winData.tabs[t].userContextId;
- let reuseExisting = t < openTabCount &&
- (tabbrowser.tabs[t].getAttribute("usercontextid") == (userContextId || ""));
- // If the tab is pinned, then we'll be loading it right away, and
- // there's no need to cause a remoteness flip by loading it initially
- // non-remote.
- let forceNotRemote = !winData.tabs[t].pinned;
- let tab = reuseExisting ? tabbrowser.tabs[t] :
- tabbrowser.addTab("about:blank",
- {skipAnimation: true,
- forceNotRemote,
- userContextId});
-
- // If we inserted a new tab because the userContextId didn't match with the
- // open tab, even though `t < openTabCount`, we need to remove that open tab
- // and put the newly added tab in its place.
- if (!reuseExisting && t < openTabCount) {
- tabbrowser.removeTab(tabbrowser.tabs[t]);
- tabbrowser.moveTabTo(tab, t);
- }
-
- tabs.push(tab);
+ tabs.push(t < openTabCount ?
+ tabbrowser.tabs[t] :
+ tabbrowser.addTab("about:blank", {
+ skipAnimation: true,
+ forceNotRemote: true,
+ }));
if (winData.tabs[t].pinned)
tabbrowser.pinTab(tabs[t]);
@@ -3530,9 +3511,6 @@ var SessionStoreInternal = {
let uri = activePageData ? activePageData.url || null : null;
if (aLoadArguments) {
uri = aLoadArguments.uri;
- if (aLoadArguments.userContextId) {
- browser.setAttribute("usercontextid", aLoadArguments.userContextId);
- }
}
// We have to mark this tab as restoring first, otherwise