Backed out changeset de9d3e0f0b20 (bug 1299480) for browser-chrome failures in browser_referrer_open_link_in_container_tab.js a=backout
authorWes Kocher <wkocher@mozilla.com>
Tue, 06 Sep 2016 15:55:55 -0700
changeset 312922 d94e8ab0f01ef09739bbe670f5efe14abb567952
parent 312921 9d2271c836ce127fbc343cbf253e0caf78ccca07
child 312923 50f9f9bec91838935029181f22ae228840b56228
push id30665
push usercbook@mozilla.com
push dateWed, 07 Sep 2016 15:20:43 +0000
treeherdermozilla-central@95acb9299faf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1299480
milestone51.0a1
backs outde9d3e0f0b20e94cb0eaa13b955ba8a639e27917
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset de9d3e0f0b20 (bug 1299480) for browser-chrome failures in browser_referrer_open_link_in_container_tab.js a=backout
browser/base/content/browser-context.inc
browser/base/content/nsContextMenu.js
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -49,17 +49,17 @@
                 label="&spellUndoAddToDictionary.label;"
                 accesskey="&spellUndoAddToDictionary.accesskey;"
                 oncommand="InlineSpellCheckerUI.undoAddToDictionary();" />
       <menuseparator id="spell-suggestions-separator"/>
       <menuitem id="context-openlinkincurrent"
                 label="&openLinkCmdInCurrent.label;"
                 accesskey="&openLinkCmdInCurrent.accesskey;"
                 oncommand="gContextMenu.openLinkInCurrent();"/>
-# label and data-usercontextid are dynamically set.
+# label and 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;"
                 usercontextid="0"
                 oncommand="gContextMenu.openLinkInTab(event);"/>
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -146,17 +146,17 @@ nsContextMenu.prototype = {
     }
 
     var inContainer = false;
     var userContextId = this.browser.contentPrincipal.originAttributes.userContextId;
     if (userContextId) {
       inContainer = true;
       var item = document.getElementById("context-openlinkincontainertab");
 
-      item.setAttribute("data-usercontextid", userContextId);
+      item.setAttribute("usercontextid", userContextId);
 
       var label = ContextualIdentityService.getUserContextLabel(userContextId);
       item.setAttribute("label",
          gBrowserBundle.formatStringFromName("userContextOpenLink.label",
                                              [label], 1));
     }
 
     var shouldShow = this.onSaveableLink || isMailtoInternal || this.onPlainTextLink;
@@ -1003,19 +1003,17 @@ nsContextMenu.prototype = {
         sm.checkSameOriginURI(referrerURI, targetURI, false);
         persistAllowMixedContentInChildTab = true;
       }
       catch (e) { }
     }
 
     let params = {
       allowMixedContent: persistAllowMixedContentInChildTab,
-      userContextId: event.target.hasAttribute('data-usercontextid')
-                       ? parseInt(event.target.getAttribute('data-usercontextid'))
-                       : 0,
+      userContextId: parseInt(event.target.getAttribute('usercontextid'))
     };
 
     openLinkIn(this.linkURL, "tab", this._openLinkInParameters(params));
   },
 
   // open URL in current tab
   openLinkInCurrent: function() {
     urlSecurityCheck(this.linkURL, this.principal);