Bug 1113299 - Hide tab mirroring feature if unavailable. r=jaws, a=lmandel
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 22 Dec 2014 15:05:06 +0000
changeset 249310 a977d85d7c55bf21fc5c0c0b0d06ea8a7587ac6c
parent 249309 3b72ab063119ee024307888b9d5aeb00b919befe
child 249311 70b496db3ef0a1d6ed73a43a0d7296b9f6fdbf3e
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, lmandel
bugs1113299
milestone37.0a2
Bug 1113299 - Hide tab mirroring feature if unavailable. r=jaws, a=lmandel
browser/base/content/browser-menubar.inc
browser/base/content/browser.js
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -545,16 +545,17 @@
               <menuitem id="menu_pageInfo"
                         accesskey="&pageInfoCmd.accesskey;"
                         label="&pageInfoCmd.label;"
 #ifndef XP_WIN
                         key="key_viewInfo"
 #endif
                         command="View:PageInfo"/>
               <menu id="menu_mirrorTabCmd"
+                    hidden="true"
                     accesskey="&mirrorTabCmd.accesskey;"
                     label="&mirrorTabCmd.label;">
                 <menupopup id="menu_mirrorTab-popup"
                            onpopupshowing="populateMirrorTabMenu(this)"/>
               </menu>
 #ifndef XP_UNIX
               <menuseparator id="prefSep"/>
               <menuitem id="menu_preferences"
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2935,17 +2935,17 @@ function getMeOutOfHere() {
 
 function BrowserFullScreen()
 {
   window.fullScreen = !window.fullScreen;
 }
 
 function mirrorShow(popup) {
   let services = CastingApps.getServicesForMirroring();
-  popup.ownerDocument.getElementById("menu_mirrorTabCmd").disabled = !services.length;
+  popup.ownerDocument.getElementById("menu_mirrorTabCmd").hidden = !services.length;
 }
 
 function mirrorMenuItemClicked(event) {
   gBrowser.selectedBrowser.messageManager.sendAsyncMessage("SecondScreen:tab-mirror",
                                                            {service: event.originalTarget._service});
 }
 
 function populateMirrorTabMenu(popup) {