diff options
Diffstat (limited to 'base/content/tabbrowser.xml')
-rw-r--r-- | base/content/tabbrowser.xml | 124 |
1 files changed, 1 insertions, 123 deletions
diff --git a/base/content/tabbrowser.xml b/base/content/tabbrowser.xml index 76ea5d1..44b8acb 100644 --- a/base/content/tabbrowser.xml +++ b/base/content/tabbrowser.xml @@ -1230,7 +1230,6 @@ this._adjustFocusAfterTabSwitch(this.mCurrentTab); } - updateUserContextUIIndicator(); gIdentityHandler.updateSharingIndicator(); this.tabContainer._setPositionalAttributes(); @@ -2144,11 +2143,6 @@ t.setAttribute("label", aURI); } - if (aUserContextId) { - t.setAttribute("usercontextid", aUserContextId); - ContextualIdentityService.setTabStyle(t); - } - t.setAttribute("crop", "end"); t.setAttribute("onerror", "this.removeAttribute('image');"); t.className = "tabbrowser-tab"; @@ -4638,16 +4632,6 @@ } case "Browser:WindowCreated": { let tab = this.getTabForBrowser(browser); - if (tab && data.userContextId) { - ContextualIdentityService.telemetry(data.userContextId); - tab.setUserContextId(data.userContextId); - } - - // We don't want to update the container icon and identifier if - // this is not the selected browser. - if (browser == gBrowser.selectedBrowser) { - updateUserContextUIIndicator(); - } break; } @@ -5233,7 +5217,7 @@ </xul:arrowscrollbox> </content> - <implementation implements="nsIDOMEventListener, nsIObserver"> + <implementation implements="nsIDOMEventListener"> <constructor> <![CDATA[ this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth"); @@ -5252,17 +5236,9 @@ this._tabAnimationLoggingEnabled = false; } this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled"); - this.observe(null, "nsPref:changed", "privacy.userContext.enabled"); - Services.prefs.addObserver("privacy.userContext.enabled", this, false); ]]> </constructor> - <destructor> - <![CDATA[ - Services.prefs.removeObserver("privacy.userContext.enabled", this); - ]]> - </destructor> - <field name="tabbrowser" readonly="true"> document.getElementById(this.getAttribute("tabbrowser")); </field> @@ -5288,55 +5264,6 @@ <field name="_afterHoveredTab">null</field> <field name="_hoveredTab">null</field> - <method name="observe"> - <parameter name="aSubject"/> - <parameter name="aTopic"/> - <parameter name="aData"/> - <body><![CDATA[ - switch (aTopic) { - case "nsPref:changed": - // This is the only pref observed. - let containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled"); - - const newTab = document.getElementById("new-tab-button"); - const newTab2 = document.getAnonymousElementByAttribute(this, "anonid", "tabs-newtab-button") - - if (containersEnabled) { - for (let parent of [newTab, newTab2]) { - if (!parent) - continue; - let popup = document.createElementNS( - "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - "menupopup"); - if (parent.id) { - popup.id = "newtab-popup"; - } else { - popup.setAttribute("anonid", "newtab-popup"); - } - popup.className = "new-tab-popup"; - popup.setAttribute("position", "after_end"); - parent.appendChild(popup); - - gClickAndHoldListenersOnElement.add(parent); - parent.setAttribute("type", "menu"); - } - } else { - for (let parent of [newTab, newTab2]) { - if (!parent) - continue; - gClickAndHoldListenersOnElement.remove(parent); - parent.removeAttribute("type"); - if (!parent.firstChild) - continue; - parent.firstChild.remove(); - } - } - - break; - } - ]]></body> - </method> - <property name="_isCustomizing" readonly="true"> <getter> let root = document.documentElement; @@ -6839,27 +6766,6 @@ ]]> </body> </method> - - <method name="setUserContextId"> - <parameter name="aUserContextId"/> - <body> - <![CDATA[ - if (aUserContextId) { - if (this.linkedBrowser) { - this.linkedBrowser.setAttribute("usercontextid", aUserContextId); - } - this.setAttribute("usercontextid", aUserContextId); - } else { - if (this.linkedBrowser) { - this.linkedBrowser.removeAttribute("usercontextid"); - } - this.removeAttribute("usercontextid"); - } - - ContextualIdentityService.setTabStyle(this); - ]]> - </body> - </method> </implementation> <handlers> @@ -7036,30 +6942,9 @@ <handlers> <handler event="popupshowing"> <![CDATA[ - if (event.target.getAttribute("id") == "alltabs_containersMenuTab") { - createUserContextMenu(event); - return; - } - - let containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled"); - - if (event.target.getAttribute("anonid") == "newtab-popup" || - event.target.id == "newtab-popup") { - createUserContextMenu(event); - } else { - document.getElementById("alltabs-popup-separator-1").hidden = !containersEnabled; - let containersTab = document.getElementById("alltabs_containersTab"); - - containersTab.hidden = !containersEnabled; - if (PrivateBrowsingUtils.isWindowPrivate(window)) { - containersTab.setAttribute("disabled", "true"); - } - document.getElementById("alltabs_undoCloseTab").disabled = SessionStore.getClosedTabCount(window) == 0; - var tabcontainer = gBrowser.tabContainer; - // Listen for changes in the tab bar. tabcontainer.addEventListener("TabAttrModified", this, false); tabcontainer.addEventListener("TabClose", this, false); @@ -7076,10 +6961,6 @@ <handler event="popuphidden"> <![CDATA[ - if (event.target.getAttribute("id") == "alltabs_containersMenuTab") { - return; - } - // clear out the menu popup and remove the listeners for (let i = this.childNodes.length - 1; i > 0; i--) { let menuItem = this.childNodes[i]; @@ -7087,9 +6968,6 @@ menuItem.tab.mCorrespondingMenuitem = null; this.removeChild(menuItem); } - if (menuItem.hasAttribute("usercontextid")) { - this.removeChild(menuItem); - } } var tabcontainer = gBrowser.tabContainer; tabcontainer.mTabstrip.removeEventListener("scroll", this, false); |