[Webkit-unassigned] [Bug 167355] TAKE 2: Pass down website autoplay policies to media elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 24 11:31:54 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=167355

--- Comment #4 from Matt Rajca <mrajca at apple.com> ---
(In reply to comment #2)
> Comment on attachment 299566 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=299566&action=review
> 
> > Source/WebCore/loader/DocumentLoader.h:471
> > +    std::optional<bool> m_audioPlaybackRequiresUserGesture;
> > +    std::optional<bool> m_videoPlaybackRequiresUserGesture;
> 
> I think this should be a 3-state enum, probably with a different name like
> m_audioPlaybackPolicy.
> enum class AutoplayPolicy {
>     RequireUserGesture,
>     AutoPlay,
>     AutoPlayWithoutSound,
>     Default, <-- This name might need to be more descriptive indicating that
> the policy hasn't been set by the WebsitePolicies so default to the Settings
> value.  Maybe just a comment explaining this.
>     etc.
> }
> These two could probably even be made into one enum

Done.

> 
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:820
> > +#if PLATFORM(MAC)
> 
> Let's get rid of this now that it doesn't do anything for other platforms.

Okay, and I made the tests run on iOS as well.

> 
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:823
> > +        documentLoader->setAudioPlaybackRequiresUserGesture(std::optional<bool>());
> 
> std::nullopt

Not necessary with the changes above.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170124/14830455/attachment-0001.html>


More information about the webkit-unassigned mailing list