Bug 1113299 - hide tab mirroring feature if unavailable, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 22 Dec 2014 15:05:06 +0000
changeset 223563 dfc93c68f9c799f93c52f99740baf88623054ab3
parent 223562 268dfa4925ec4f8572dbd4494c14e8d4c754274f
child 223564 d0576cfa0b5c75dfb873ee8c5720f5460e31a76e
child 223675 63006936ab99b4ea5db20d1d7d67ce6c7f16ebf5
push id10800
push usergijskruitbosch@gmail.com
push dateTue, 13 Jan 2015 21:29:29 +0000
treeherderfx-team@dfc93c68f9c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1113299
milestone38.0a1
Bug 1113299 - hide tab mirroring feature if unavailable, r=jaws
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) {