From 9d292635cbd808f88fb4363ef9f68aaef012abc5 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Mon, 15 Feb 2016 18:12:53 +0000 Subject: [PATCH] Bug 1248302 - We should not show any decoration for tab with usercontextid=0, r=gijs --- browser/base/content/browser.js | 2 +- browser/base/content/nsContextMenu.js | 2 +- browser/base/content/tabbrowser.xml | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index bb6059695ed..8f8a3d7b8b2 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -3980,7 +3980,7 @@ function updateEditUIVisibility() function openNewUserContextTab(event) { openUILinkIn(BROWSER_NEW_TAB_URL, "tab", { - userContextId: event.target.getAttribute('usercontextid'), + userContextId: parseInt(event.target.getAttribute('usercontextid')), }); } diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index d44480d5989..18960f8f859 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -983,7 +983,7 @@ nsContextMenu.prototype = { let params = this._openLinkInParameters({ allowMixedContent: persistAllowMixedContentInChildTab, - userContextId: event.target.getAttribute('usercontextid'), + userContextId: parseInt(event.target.getAttribute('usercontextid')), }); openLinkIn(this.linkURL, "tab", params); }, diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 56fc74657d4..e6c6455c0db 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1726,8 +1726,9 @@ b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu")); b.setAttribute("tooltip", this.getAttribute("contenttooltip")); - if (userContextId) + if (userContextId) { b.setAttribute("usercontextid", userContextId); + } if (remote) b.setAttribute("remote", "true"); @@ -6272,8 +6273,13 @@