Bug 147234 - Relax media playback restrictions if the allowsMediaDocumentInlinePlayback property is set.
Summary: Relax media playback restrictions if the allowsMediaDocumentInlinePlayback pr...
Status: RESOLVED FIXED
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: 147181
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-23 12:54 PDT by Jer Noble
Modified: 2015-07-23 15:24 PDT (History)
0 users

See Also:


Attachments
Patch (4.83 KB, patch)
2015-07-23 13:45 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (4.83 KB, patch)
2015-07-23 14:24 PDT, Jer Noble
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2015-07-23 12:54:35 PDT
Relax media playback restrictions if the allowsMediaDocumentInlinePlayback property is set.
Comment 1 Jer Noble 2015-07-23 13:45:23 PDT
Created attachment 257374 [details]
Patch
Comment 2 Jer Noble 2015-07-23 14:24:07 PDT
Created attachment 257383 [details]
Patch
Comment 3 Darin Adler 2015-07-23 14:28:27 PDT
Comment on attachment 257383 [details]
Patch

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

> Source/WebCore/html/MediaElementSession.cpp:124
> +    Page* page = element.document().page();
> +    if (element.document().isMediaDocument() && !element.document().ownerElement() && page && page->allowsMediaDocumentInlinePlayback())
> +        return true;

Helper function for this? The code is repeated three times.

I would put element.document() into a local variable since we use it three times.
Comment 4 Jer Noble 2015-07-23 15:24:59 PDT
Committed r187262: <http://trac.webkit.org/changeset/187262>