Defer use of autoplay heuristics to clients
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2017 19:16:34 +0000 (19:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2017 19:16:34 +0000 (19:16 +0000)
commitd9d16f02b0375a90197484b36896e06d75da6597
tree0595c1b01f6f34453023b03622a0ef238a400a9e
parent149ea49554a183fbcba7196e8b2edb7ba7468d7f
Defer use of autoplay heuristics to clients
https://bugs.webkit.org/show_bug.cgi?id=167010

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-13
Reviewed by Alex Christensen.

Switch the autoplay policy tristate to an on/off option since clients should run any
heuristics and simply send their final decision to WebKit.

* Shared/WebsitePolicies.h:
(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/API/C/WKWebsitePolicies.cpp:
(WKWebsitePoliciesGetAutoplayEnabled):
(WKWebsitePoliciesSetAutoplayEnabled):
(WKWebsitePoliciesGetAutoplayPolicy): Replaced.
(WKWebsitePoliciesSetAutoplayPolicy): Replaced.
* UIProcess/API/C/WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies setAutoplayEnabled:]):
(-[_WKWebsitePolicies autoplayEnabled]):
(-[_WKWebsitePolicies setAutoplayPolicy:]): Replaced.
(-[_WKWebsitePolicies autoplayPolicy]): Replaced.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebsitePolicies.h
Source/WebKit2/UIProcess/API/APIWebsitePolicies.h
Source/WebKit2/UIProcess/API/C/WKWebsitePolicies.cpp
Source/WebKit2/UIProcess/API/C/WKWebsitePolicies.h
Source/WebKit2/UIProcess/API/Cocoa/_WKWebsitePolicies.h
Source/WebKit2/UIProcess/API/Cocoa/_WKWebsitePolicies.mm