Bug 701771 - Context Click menu shows FS option even within FS mode. r=wesj
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 11 Nov 2011 15:51:12 -0800
changeset 83446 a28cb9b7b7f48594151c29b0c46bd9da37118671
parent 83445 2fbc1009254915deecaa16154cf67d3f1dfe9679
child 83447 9c6438dd5534300a6afebe7ed3e1ba20125f1324
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs701771
milestone10.0a1
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
Bug 701771 - Context Click menu shows FS option even within FS mode. r=wesj
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -727,23 +727,21 @@ var NativeWindow = {
         }
       }
     }
   },
   contextmenus: {
     items: {}, //  a list of context menu items that we may show
     textContext: null, // saved selector for text input areas
     linkContext: null, // saved selector for links
-    videoContext: null,
     _contextId: 0, // id to assign to new context menu items if they are added
 
     init: function() {
       this.textContext = this.SelectorContext("input[type='text'],input[type='password'],textarea");
       this.linkContext = this.SelectorContext("a:not([href='']),area:not([href='']),link");
-      this.videoContext = this.SelectorContext("video");
       Services.obs.addObserver(this, "Gesture:LongPress", false);
 
       // TODO: These should eventually move into more appropriate classes
       this.add(Strings.browser.GetStringFromName("contextmenu.openInNewTab"),
                this.linkContext,
                function(aTarget) {
                  let url = NativeWindow.contextmenus._getLinkURL(aTarget);
                  BrowserApp.addTab(url, {selected: false});
@@ -751,17 +749,17 @@ var NativeWindow = {
   
       this.add(Strings.browser.GetStringFromName("contextmenu.changeInputMethod"),
                this.textContext,
                function(aTarget) {
                  Cc["@mozilla.org/imepicker;1"].getService(Ci.nsIIMEPicker).show();
                });
 
       this.add(Strings.browser.GetStringFromName("contextmenu.fullScreen"),
-               this.videoContext,
+               this.SelectorContext("video:not(:-moz-full-screen)"),
                function(aTarget) {
                  aTarget.mozRequestFullScreen();
                });
     },
 
     uninit: function() {
       Services.obs.removeObserver(this, "Gesture:LongPress");
     },