Bug 62681 - Pressing space bar key does not pause video in full-screen mode (if user has previously clicked on the video)
Summary: Pressing space bar key does not pause video in full-screen mode (if user has ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 17:32 PDT by Jer Noble
Modified: 2012-03-01 15:53 PST (History)
4 users (show)

See Also:


Attachments
Patch (8.45 KB, patch)
2011-06-14 17:44 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (11.17 KB, patch)
2011-06-14 23:55 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2011-06-14 17:32:45 PDT
Pressing space bar key does not pause video in full-screen mode (if user has previously clicked on the video)
Comment 1 Jer Noble 2011-06-14 17:44:01 PDT
Created attachment 97203 [details]
Patch
Comment 2 Darin Adler 2011-06-14 17:45:15 PDT
Comment on attachment 97203 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=97203&action=review

> Source/WebCore/html/shadow/MediaControlRootElement.cpp:460
> +    setTabIndexExplicitly(0);
> +    m_savedFocusNode = document()->focusedNode();
> +    focus();

Will this send a “blur” event to the currently focused element? That does not seem like a good idea in the full-screen video case.
Comment 3 Jer Noble 2011-06-14 23:05:48 PDT
(In reply to comment #2)
> Will this send a “blur” event to the currently focused element? That does not seem like a good idea in the full-screen video case.

Yes, it will, and that's a good point.  I was trying to keep as much code in the MediaControlRootElement as possible, but perhaps the focus code needs to be moved into Document (where we can change the focused node without sending blur (or onfocusout, etc.) events.
Comment 4 Jer Noble 2011-06-14 23:55:18 PDT
Created attachment 97243 [details]
Patch

Suppress the blur events sent to objects outside the full-screen element's DOM when the full-screen element is a media element.  This may not go far enough, in that the fact focus has been lost is still detectable via CSS.  But it should be closer.
Comment 5 Eric Seidel (no email) 2012-02-16 13:49:47 PST
This has been up for review for 6 months.  Did this actually get landed and just forgotten?
Comment 6 Jer Noble 2012-02-16 13:58:37 PST
(In reply to comment #5)
> This has been up for review for 6 months.  Did this actually get landed and just forgotten?

Nope, it never was landed, and additionally, it probably doesn't apply cleanly any longer.
Comment 7 Eric Seidel (no email) 2012-03-01 15:07:19 PST
Seems like a good fix though. :)  Always annoys me when flash-players don't support space-bar to start/stop video. :)

Who can move this forward?  Do you need a review from someone in particular?  Should we obsolete this patch and wait for a new one?
Comment 8 Jer Noble 2012-03-01 15:53:16 PST
Yes, I'll obsolete, rebase, and re-upload.