Relax media playback restrictions if the allowsMediaDocumentInlinePlayback property...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 22:23:28 +0000 (22:23 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 22:23:28 +0000 (22:23 +0000)
commitde96c91f98444e64e190d4fd80533668fb7a3356
tree9b33b2c8a6a0b34e732045d188d3bcd1e7289fc6
parent87064b117cbf5a5d8f3fc976307f1bd42f77c6de
Relax media playback restrictions if the allowsMediaDocumentInlinePlayback property is set.
https://bugs.webkit.org/show_bug.cgi?id=147234

Reviewed by Darin Adler.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad): Moved restriction check into MediaElementSession.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted): Check if is a top-level media document and if
    allowsMediaDocumentInilnePlayback is set, and return early.
(WebCore::MediaElementSession::effectivePreloadForElement): Ditto.
(WebCore::MediaElementSession::allowsAutomaticMediaDataLoading): Ditto.
* html/MediaElementSession.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/MediaElementSession.cpp
Source/WebCore/html/MediaElementSession.h