diff --git a/browser/base/content/browser-customization.js b/browser/base/content/browser-customization.js index c265085b9f49..19db93e3a99c 100644 --- a/browser/base/content/browser-customization.js +++ b/browser/base/content/browser-customization.js @@ -60,9 +60,7 @@ var CustomizationHandler = { if (aDetails.changed) { gURLBar = document.getElementById("urlbar"); - gProxyFavIcon = document.getElementById("page-proxy-favicon"); gHomeButton.updateTooltip(); - gIdentityHandler._cacheElements(); XULBrowserWindow.init(); #ifndef XP_MACOSX diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 553acdaa8033..d78860026fc1 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -370,7 +370,7 @@ var PlacesCommandHook = { // Try to dock the panel to: // 1. the bookmarks menu button - // 2. the page-proxy-favicon + // 2. the identity icon // 3. the content area if (BookmarkingUI.anchor) { StarUI.showEditBookmarkPopup(itemId, BookmarkingUI.anchor, @@ -378,9 +378,9 @@ var PlacesCommandHook = { return; } - let pageProxyFavicon = document.getElementById("page-proxy-favicon"); - if (isElementVisible(pageProxyFavicon)) { - StarUI.showEditBookmarkPopup(itemId, pageProxyFavicon, + let identityIcon = document.getElementById("identity-icon"); + if (isElementVisible(identityIcon)) { + StarUI.showEditBookmarkPopup(itemId, identityIcon, "bottomcenter topright"); } else { StarUI.showEditBookmarkPopup(itemId, aBrowser, "overlap"); @@ -446,7 +446,7 @@ var PlacesCommandHook = { // Try to dock the panel to: // 1. the bookmarks menu button - // 2. the page-proxy-favicon + // 2. the identity icon // 3. the content area if (BookmarkingUI.anchor) { StarUI.showEditBookmarkPopup(node, BookmarkingUI.anchor, @@ -454,9 +454,9 @@ var PlacesCommandHook = { return; } - let pageProxyFavicon = document.getElementById("page-proxy-favicon"); - if (isElementVisible(pageProxyFavicon)) { - StarUI.showEditBookmarkPopup(node, pageProxyFavicon, + let identityIcon = document.getElementById("identity-icon"); + if (isElementVisible(identityIcon)) { + StarUI.showEditBookmarkPopup(node, identityIcon, "bottomcenter topright"); } else { StarUI.showEditBookmarkPopup(node, aBrowser, "overlap"); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 2a4eda272c8c..5c7822ea72a7 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -95,7 +95,6 @@ XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() { const nsIWebNavigation = Ci.nsIWebNavigation; var gLastBrowserCharset = null; -var gProxyFavIcon = null; var gLastValidURLStr = ""; var gInPrintPreviewMode = false; var gContextMenu = null; // nsContextMenu instance @@ -2562,11 +2561,7 @@ function SetPageProxyState(aState) if (!gURLBar) return; - if (!gProxyFavIcon) - gProxyFavIcon = document.getElementById("page-proxy-favicon"); - gURLBar.setAttribute("pageproxystate", aState); - gProxyFavIcon.setAttribute("pageproxystate", aState); // the page proxy state is set to valid via OnLocationChange, which // gets called when we switch tabs. @@ -7001,38 +6996,15 @@ var gIdentityHandler = { delete this._identityIconCountryLabel; return this._identityIconCountryLabel = document.getElementById("identity-icon-country-label"); }, - get _identityIcons () { - delete this._identityIcons; - return this._identityIcons = document.getElementById("identity-icons"); - }, get _identityIcon () { delete this._identityIcon; - return this._identityIcon = document.getElementById("page-proxy-favicon"); + return this._identityIcon = document.getElementById("identity-icon"); }, get _permissionList () { delete this._permissionList; return this._permissionList = document.getElementById("identity-popup-permission-list"); }, - /** - * Rebuild cache of the elements that may or may not exist depending - * on whether there's a location bar. - */ - _cacheElements : function() { - delete this._identityBox; - delete this._identityIcons; - delete this._identityIconLabel; - delete this._identityIconCountryLabel; - delete this._identityIcon; - delete this._permissionList; - this._identityBox = document.getElementById("identity-box"); - this._identityIcons = document.getElementById("identity-icons"); - this._identityIconLabel = document.getElementById("identity-icon-label"); - this._identityIconCountryLabel = document.getElementById("identity-icon-country-label"); - this._identityIcon = document.getElementById("page-proxy-favicon"); - this._permissionList = document.getElementById("identity-popup-permission-list"); - }, - /** * Handler for mouseclicks on the "More Information" button in the * "identity-popup" panel. @@ -7532,7 +7504,7 @@ var gIdentityHandler = { this._identityBox.setAttribute("open", "true"); // Now open the popup, anchored off the primary chrome element - this._identityPopup.openPopup(this._identityIcons, "bottomcenter topleft"); + this._identityPopup.openPopup(this._identityIcon, "bottomcenter topleft"); }, onPopupShown(event) { @@ -7575,7 +7547,7 @@ var gIdentityHandler = { dt.setData("text/uri-list", value); dt.setData("text/plain", value); dt.setData("text/html", htmlString); - dt.setDragImage(gProxyFavIcon, 16, 16); + dt.setDragImage(this._identityIcon, 16, 16); }, updateSitePermissions: function () { diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 0c6042cd458e..780bbcf18e46 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -738,13 +738,11 @@ onclick="gIdentityHandler.handleIdentityButtonEvent(event);" onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);" ondragstart="gIdentityHandler.onDragStart(event);"> - - - - + + +