Don't override _allowsMediaDocumentInlinePlayback in MediaDocument with playsinlineAttr.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jul 2017 04:41:14 +0000 (04:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jul 2017 04:41:14 +0000 (04:41 +0000)
commitb38555a1e2949062a4cf116c564239acebc32001
tree940feda046211a081fe7724f78d8ec2cd85c31f3
parenta3094a6ee54551ab4cda88275b1d844e004202fd
Don't override _allowsMediaDocumentInlinePlayback in MediaDocument with playsinlineAttr.
https://bugs.webkit.org/show_bug.cgi?id=174850
rdar://problem/33449903

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-27
Reviewed by Jon Lee.

This change removes playsinlineAttr from MediaDocument so that it doesn't override the setting
from _allowsMediaDocumentInlinePlayback. In its place is an update to requiresFullscreenForVideoPlayback
that implements the details of exactly which media documents are still allowed to play inlne.

Media documents always use a video element; but when there are no video tracks, it has behavior like
an audio element. See media-controller.js isAudio().

This change preserves this behavior with respect to fullscreen requirements for media document by
mirroring the isAudio() check in requiresFullscreenForVideoPlayback.

* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):

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