[iOS] allow host application to opt-out of alternate fullscreen
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Nov 2014 14:07:04 +0000 (14:07 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Nov 2014 14:07:04 +0000 (14:07 +0000)
commit8686c3f4b08dbfe0226297cab5fb72c19c323b82
treef2308a18a755f581249766c2a3d60c58ab10e23b
parent7bc963d554f1d38eca100b9f1c56d8cfc4627293
[iOS] allow host application to opt-out of alternate fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138787

Reviewed by Darin Adler.

Source/WebCore:

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
    mediaSession().allowsAlternateFullscreen says it isn't allowed.

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
* html/HTMLMediaSession.h:

* page/Settings.cpp: Add allowsAlternateFullscreen.
* page/Settings.in: Ditto.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences allowsAlternateFullscreen]):
(-[WebPreferences setAllowsAlternateFullscreen:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAllowsAlternateFullscreen):
(WKPreferencesGetAllowsAlternateFullscreen):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaSession.cpp
Source/WebCore/html/HTMLMediaSession.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp