Bug 704709 - Don't show full-screen warning on media key press on Windows. r=smaug,jmathies
authorChris Pearce <chris@pearce.org.nz>
Thu, 01 Dec 2011 11:27:14 +1300
changeset 81845 72e787c04eb669b6c56858af8fe87eb49dd8a39d
parent 81844 20a24dd3f56bac4574310d7f47d0905c64b97728
child 81846 4679da64ba71aae08b6578c075d3452b0eddfa43
push idunknown
push userunknown
push dateunknown
reviewerssmaug, jmathies
bugs704709
milestone11.0a1
Bug 704709 - Don't show full-screen warning on media key press on Windows. r=smaug,jmathies
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -55,16 +55,20 @@
  */
 
 /* a presentation of a document, part 2 */
 
 #include "mozilla/dom/PBrowserChild.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/Util.h"
 
+#ifdef XP_WIN
+#include "winuser.h"
+#endif
+
 #include "nsPresShell.h"
 #include "nsPresContext.h"
 #include "nsIContent.h"
 #include "mozilla/dom/Element.h"
 #include "nsIDocument.h"
 #include "nsIDOMXULDocument.h"
 #include "nsCSSStyleSheet.h" // XXX for UA sheet loading hack, can this go away please?
 #include "nsIDOMCSSStyleSheet.h"  // for Pref-related rule management (bugs 22963,20760,31816)
@@ -6255,16 +6259,21 @@ IsFullScreenAndRestrictedKeyEvent(nsICon
     case NS_VK_LEFT:
     case NS_VK_UP:
     case NS_VK_RIGHT:
     case NS_VK_DOWN:
     case NS_VK_SHIFT:
     case NS_VK_CONTROL:
     case NS_VK_ALT:
     case NS_VK_META:
+#ifdef XP_WIN
+    case VK_VOLUME_MUTE:
+    case VK_VOLUME_DOWN:
+    case VK_VOLUME_UP:
+#endif
       // Unrestricted key code.
       return false;
     default:
       // Otherwise, fullscreen is enabled, key input is restricted, and the key
       // code is not an allowed key code.
       return true;
   }
 }