Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Issue 208483002: Implement the activation behavior of media elements (click to play/pause) (Closed)

Created:
6 years, 9 months ago by philipj_slow
Modified:
6 years, 8 months ago
CC:
blink-reviews, nessy, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, adamk+blink_chromium.org, vcarbune.chromium
Visibility:
Public.

Description

Implement the activation behavior of media elements (click to play/pause) http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#user-interface Added to the spec in http://html5.org/r/8315 after a long discussion: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-November/041662.html Firefox already implements click to play/pause when controls are visible, but that implementation predates the spec so accesskey does not work. HTMLMediaElement::togglePlayState() is made public so that it can be used to implement play/pause in MediaControls also. The video-click-dblckick-standalone.html test has been expected to fail since April 2013, r148246, so remove it now since the the results would change. The new tests provide sufficient coverage. BUG=354746 TEST=LayoutTests/media/activation-behavior.html LayoutTests/media/activation-behavior-accesskey.html LayoutTests/media/activation-behavior-shadow.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169812

Patch Set 1 #

Total comments: 6

Patch Set 2 : nit and oops #

Patch Set 3 : cancel activation behavior in a failing fullscreen test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+380 lines, -76 lines) Patch
M LayoutTests/fullscreen/resources/video.html View 1 2 1 chunk +3 lines, -1 line 0 comments Download
A LayoutTests/media/activation-behavior.html View 1 1 chunk +208 lines, -0 lines 0 comments Download
A LayoutTests/media/activation-behavior-accesskey.html View 1 chunk +23 lines, -0 lines 0 comments Download
A + LayoutTests/media/activation-behavior-accesskey-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/media/activation-behavior-expected.txt View 1 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/media/activation-behavior-shadow.html View 1 chunk +32 lines, -0 lines 0 comments Download
A + LayoutTests/media/activation-behavior-shadow-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
D LayoutTests/media/video-click-dblckick-standalone.html View 1 chunk +0 lines, -63 lines 0 comments Download
D LayoutTests/media/video-click-dblckick-standalone-expected.txt View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLMediaElement.h View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 3 chunks +33 lines, -0 lines 0 comments Download
M Source/core/html/MediaController.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/MediaController.cpp View 1 1 chunk +35 lines, -4 lines 0 comments Download
M Source/core/html/shadow/MediaControlElements.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/shadow/MediaControlElements.cpp View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
philipj_slow
PTAL. It was a pleasant surprise to find that Hixie had specified how to best ...
6 years, 9 months ago (2014-03-21 16:40:29 UTC) #1
philipj_slow
Also, it'll be possible to let the overlay play button just be an image, since ...
6 years, 9 months ago (2014-03-21 16:46:47 UTC) #2
acolwell GONE FROM CHROMIUM
lgtm https://codereview.chromium.org/208483002/diff/1/LayoutTests/media/activation-behavior.html File LayoutTests/media/activation-behavior.html (right): https://codereview.chromium.org/208483002/diff/1/LayoutTests/media/activation-behavior.html#newcode52 LayoutTests/media/activation-behavior.html:52: assert_false(e.paused, 'element paused state after click'); This is ...
6 years, 9 months ago (2014-03-21 23:30:12 UTC) #3
philipj_slow
https://codereview.chromium.org/208483002/diff/1/LayoutTests/media/activation-behavior.html File LayoutTests/media/activation-behavior.html (right): https://codereview.chromium.org/208483002/diff/1/LayoutTests/media/activation-behavior.html#newcode52 LayoutTests/media/activation-behavior.html:52: assert_false(e.paused, 'element paused state after click'); On 2014/03/21 23:30:12, ...
6 years, 9 months ago (2014-03-23 03:42:48 UTC) #4
philipj_slow
The CQ bit was checked by philipj@opera.com
6 years, 9 months ago (2014-03-23 10:59:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/philipj@opera.com/208483002/30001
6 years, 9 months ago (2014-03-23 10:59:24 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-23 11:00:35 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-23 11:00:35 UTC) #8
philipj_slow
The CQ bit was checked by philipj@opera.com
6 years, 9 months ago (2014-03-23 13:05:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/philipj@opera.com/208483002/30001
6 years, 9 months ago (2014-03-23 13:05:35 UTC) #10
commit-bot: I haz the power
Change committed as 169812
6 years, 9 months ago (2014-03-23 13:32:31 UTC) #11
qinmin
On 2014/03/23 13:32:31, I haz the power (commit-bot) wrote: > Change committed as 169812 This ...
6 years, 8 months ago (2014-04-02 19:02:46 UTC) #12
philipj_slow
6 years, 8 months ago (2014-04-02 21:55:39 UTC) #13
Message was sent while issue was closed.
On 2014/04/02 19:02:46, qinmin wrote:
> On 2014/03/23 13:32:31, I haz the power (commit-bot) wrote:
> > Change committed as 169812
> 
> This default handler thing will interfere with any javascript that put an
> onclick listener on the video element.

Per spec the activation behavior only applies when showing controls, so it's
probably not so bad. It would be a lot better without the bug I introduced
though :) https://code.google.com/p/chromium/issues/detail?id=358675

Powered by Google App Engine
This is Rietveld 408576698