Bug 33739 - Fullscreen video HUD stays on top when switching to another window (e.g. via Alt-Tab)
Summary: Fullscreen video HUD stays on top when switching to another window (e.g. via ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2010-01-15 14:09 PST by Adam Roben (:aroben)
Modified: 2010-03-12 15:17 PST (History)
2 users (show)

See Also:


Attachments
Patch (3.54 KB, patch)
2010-03-11 16:04 PST, Beth Dakin
aroben: review+
Details | Formatted Diff | Diff
New patch (2.28 KB, patch)
2010-03-12 14:09 PST, Beth Dakin
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2010-01-15 14:09:50 PST
To reproduce:

1. Go to a page with <video controls>
2. Click the fullscreen button in the video's controls
3. Switch to another window via Alt-Tab (e.g., the Safari window that contained the <video>)

The fullscreen video's HUD stays on screen, on top of whatever window you've just switched to.
Comment 1 Adam Roben (:aroben) 2010-01-15 14:15:18 PST
<rdar://problem/7547574>
Comment 2 Beth Dakin 2010-03-11 16:04:35 PST
Created attachment 50556 [details]
Patch
Comment 3 Adam Roben (:aroben) 2010-03-12 13:44:35 PST
Comment on attachment 50556 [details]
Patch

>  void FullscreenVideoController::draw()
>  {
> +    HWND foregroundWindow = GetForegroundWindow();
> +    if (foregroundWindow == m_videoWindow)
> +        createHUDWindow();
> +    else if (foregroundWindow != m_hudWindow)
> +        destroyHUDWindow();
> +

After this, I think you should assert that m_hudWindow is non-null. And maybe you should bail if it is null, in release builds.

r=me
Comment 4 Beth Dakin 2010-03-12 14:09:19 PST
Created attachment 50631 [details]
New patch

Adam and I discussed a better way to do this on IRC!
Comment 5 Adam Roben (:aroben) 2010-03-12 14:10:53 PST
Comment on attachment 50631 [details]
New patch

r=me!
Comment 6 Beth Dakin 2010-03-12 15:17:31 PST
Fixed with r55942.