Bug 1248302 - We should not show any decoration for tab with usercontextid=0, r=gijs

This commit is contained in:
Andrea Marchesini 2016-02-15 18:12:53 +00:00
parent 963f9156d9
commit 9d292635cb
3 changed files with 11 additions and 5 deletions

View File

@ -3980,7 +3980,7 @@ function updateEditUIVisibility()
function openNewUserContextTab(event) function openNewUserContextTab(event)
{ {
openUILinkIn(BROWSER_NEW_TAB_URL, "tab", { openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {
userContextId: event.target.getAttribute('usercontextid'), userContextId: parseInt(event.target.getAttribute('usercontextid')),
}); });
} }

View File

@ -983,7 +983,7 @@ nsContextMenu.prototype = {
let params = this._openLinkInParameters({ let params = this._openLinkInParameters({
allowMixedContent: persistAllowMixedContentInChildTab, allowMixedContent: persistAllowMixedContentInChildTab,
userContextId: event.target.getAttribute('usercontextid'), userContextId: parseInt(event.target.getAttribute('usercontextid')),
}); });
openLinkIn(this.linkURL, "tab", params); openLinkIn(this.linkURL, "tab", params);
}, },

View File

@ -1726,8 +1726,9 @@
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu")); b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
b.setAttribute("tooltip", this.getAttribute("contenttooltip")); b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
if (userContextId) if (userContextId) {
b.setAttribute("usercontextid", userContextId); b.setAttribute("usercontextid", userContextId);
}
if (remote) if (remote)
b.setAttribute("remote", "true"); b.setAttribute("remote", "true");
@ -6272,8 +6273,13 @@
<parameter name="aUserContextId"/> <parameter name="aUserContextId"/>
<body> <body>
<![CDATA[ <![CDATA[
this.linkedBrowser.setAttribute("usercontextid", aUserContextId); if (aUserContextId) {
this.setAttribute("usercontextid", aUserContextId); this.linkedBrowser.setAttribute("usercontextid", aUserContextId);
this.setAttribute("usercontextid", aUserContextId);
} else {
this.linkedBrowser.removeAttribute("usercontextid");
this.removeAttribute("usercontextid");
}
]]> ]]>
</body> </body>
</method> </method>