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

Issue 130813006: Remove the user gesture restriction for HTMLMediaElement::pause() (Closed)

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

Description

Remove the user gesture restriction for HTMLMediaElement::pause() This is very nearly dead code, because when the setting is enabled, the only way to play a video is using play(), which removes all restrictions if it succeeds. Therefore, the only observable behavior from the pause restriction is that if pause() is called from an input event handler when networkState is NETWORK_EMPTY, LoadMediaResource is scheduled. Further, it hardly seems like a useful restriction even if it worked. Web sites that pause a video against the will of the user seem rather improbable. Possibly the restriction was originally added to guard the scheduling of LoadMediaResource. Preventing LoadMediaResource is not useful, since there are several other ways to trigger a load, e.g. just <video src="foo"> in markup. Note that there was no test for this restriction, but there are tests for load(), play() and autoplay. BUG=342339 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166888

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -21 lines) Patch
M Source/core/html/HTMLMediaElement.h View 2 chunks +2 lines, -3 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 7 chunks +6 lines, -18 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
philipj_slow
Patch 1
6 years, 10 months ago (2014-02-10 12:53:14 UTC) #1
philipj_slow
https://codereview.chromium.org/130813006/diff/1/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (left): https://codereview.chromium.org/130813006/diff/1/Source/core/html/HTMLMediaElement.cpp#oldcode2204 Source/core/html/HTMLMediaElement.cpp:2204: // 4.8.10.9. Playing the media resource I removed this ...
6 years, 10 months ago (2014-02-10 12:57:40 UTC) #2
acolwell GONE FROM CHROMIUM
lgtm
6 years, 10 months ago (2014-02-10 21:51:19 UTC) #3
philipj_slow
The CQ bit was checked by philipj@opera.com
6 years, 10 months ago (2014-02-11 00:47:53 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/philipj@opera.com/130813006/1
6 years, 10 months ago (2014-02-11 00:48:30 UTC) #5
commit-bot: I haz the power
6 years, 10 months ago (2014-02-11 02:34:51 UTC) #6
Message was sent while issue was closed.
Change committed as 166888

Powered by Google App Engine
This is Rietveld 408576698