Last Comment Bug 704709 - Hardware volume buttons in full screen mode triggers full screen warning message
: Hardware volume buttons in full screen mode triggers full screen warning message
Status: VERIFIED FIXED
[good first bug][mentor=jwein][lang=c...
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: x86_64 Windows 7
: -- major (vote)
: mozilla11
Assigned To: Chris Pearce (:cpearce)
:
Mentors:
Depends on:
Blocks: 545812
  Show dependency treegraph
 
Reported: 2011-11-22 18:02 PST by Asa Dotzler [:asa]
Modified: 2012-02-17 05:53 PST (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
affected
verified


Attachments
Patch (1.40 KB, patch)
2011-11-29 17:22 PST, Chris Pearce (:cpearce)
bugs: review+
jmathies: review+
Details | Diff | Splinter Review

Description Asa Dotzler [:asa] 2011-11-22 18:02:34 PST
At YouTube's HTML5 video player, http://www.youtube.com/watch?v=JCUdy1nUqrg for example, if you go into fullscreen mode and then hit the hardware volume buttons on your laptop, the "Press ESC to leave Full-screen mode" UI returns. That UI should not return after initially disappearing. 

Tested on latest nightly build on a Thinkpad X1 laptop running Win 7 at this URL http://www.youtube.com/watch?v=JCUdy1nUqrg
Comment 1 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-22 18:25:05 PST
Guess we need to add those keys to the whitelist...
Comment 2 Jared Wein [:jaws] (please needinfo? me) 2011-11-24 18:54:17 PST
The changes to the whitelist should be made in layout/base/nsPresShell.cpp within the |IsFullScreenAndRestrictedKeyEvent| function.

We'll need to find out what the keyCode is for the hardware volume buttons.
Comment 3 Chris Pearce (:cpearce) 2011-11-24 19:13:29 PST
http://pearce.org.nz/full-screen/ displays keycode of pressed keys. On my Win7 Lenovo T510 mute is 173, volume-down is 174, volume up is 175. I'm not sure if the same key codes are used on other platforms or even other hardware vendors on windows.
Comment 4 Jared Wein [:jaws] (please needinfo? me) 2011-11-24 19:20:34 PST
I have the same key codes (although my laptop is very similar: Lenovo W520 Win7)
Comment 5 Dão Gottwald [:dao] 2011-11-25 03:43:42 PST
(In reply to Chris Pearce (:cpearce) (Mozilla Corporation) from comment #3)
> http://pearce.org.nz/full-screen/ displays keycode of pressed keys. On my
> Win7 Lenovo T510 mute is 173, volume-down is 174, volume up is 175. I'm not
> sure if the same key codes are used on other platforms or even other
> hardware vendors on windows.

Some on my old Samsung NC10 netbook on Windows XP.
Comment 6 Dão Gottwald [:dao] 2011-11-25 03:44:41 PST
(In reply to Dão Gottwald [:dao] from comment #5)
> (In reply to Chris Pearce (:cpearce) (Mozilla Corporation) from comment #3)
> > http://pearce.org.nz/full-screen/ displays keycode of pressed keys. On my
> > Win7 Lenovo T510 mute is 173, volume-down is 174, volume up is 175. I'm not
> > sure if the same key codes are used on other platforms or even other
> > hardware vendors on windows.
> 
> Some on my old Samsung NC10 netbook on Windows XP.

s/Some/Same/
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-11-25 03:52:18 PST
http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx
Comment 8 Chris Pearce (:cpearce) 2011-11-29 15:34:50 PST
The hardware volume control keys don't make it through to content on MacOSX and on Fedora Core 15 Linux. I'm not sure about other Linux distros/window managers, so I'll assume this is windows-only for now.
Comment 9 Chris Pearce (:cpearce) 2011-11-29 17:22:55 PST
Created attachment 577814 [details] [diff] [review]
Patch

Don't show the full-screen warning when pressing media volume keys on Windows.
Comment 10 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2011-11-30 02:22:57 PST
(In reply to Chris Pearce (:cpearce) (Mozilla Corporation) from comment #8)
> The hardware volume control keys don't make it through to content on MacOSX
> and on Fedora Core 15 Linux.
Yeah, I haven't managed to get events from volume control keys on Fedora.
Comment 12 Marco Bonardo [::mak] 2011-12-01 04:43:51 PST
https://hg.mozilla.org/mozilla-central/rev/72e787c04eb6
Comment 13 Ioana (away) 2012-02-10 05:45:04 PST
Verified as fixed using a Windows 7 64-bit MacBook Air with:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0

The "Press ESC to leave Full-screen mode" message is not displayed anymore when changing the volume from the keyboard.
Comment 14 Ioana (away) 2012-02-17 05:53:49 PST
Also verified as fixed using a Windows 7 64-bit HP Compaq 6715b with:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0 beta 3. 

I changed volume by using the specific volume keys from this laptop but the issue didn't reproduce anymore.

Note You need to log in before you can comment on or make changes to this bug.