Title: [184811] trunk/Source
Revision
184811
Author
jon...@apple.com
Date
2015-05-22 18:55:41 -0700 (Fri, 22 May 2015)

Log Message

Rename MediaPlaybackAllowsAirPlay
https://bugs.webkit.org/show_bug.cgi?id=145316

Reviewed by Eric Carlson.

In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
to allowsAirPlayForMediaPlayback.

Source/WebCore:

* page/Settings.in: Update the setting name.

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Update the call to settings.
* testing/InternalSettings.h: Update the name of the member variable.
* testing/InternalSettings.cpp: Update the names and calls to settings.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::resetToConsistentState):
(WebCore::InternalSettings::setWirelessPlaybackDisabled):

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h: Update the name but keep its value, for backwards
compatibility.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Update to reference the new key name.
(-[WebPreferences mediaPlaybackAllowsAirPlay]): Ditto. This API will not change in a future
patch.
(-[WebPreferences setMediaPlaybackAllowsAirPlay:]): Ditto.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Update the call to settings.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h: Update the name.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update the call to settings.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184810 => 184811)


--- trunk/Source/WebCore/ChangeLog	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebCore/ChangeLog	2015-05-23 01:55:41 UTC (rev 184811)
@@ -1,5 +1,26 @@
 2015-05-22  Jon Lee  <jon...@apple.com>
 
+        Rename MediaPlaybackAllowsAirPlay
+        https://bugs.webkit.org/show_bug.cgi?id=145316
+
+        Reviewed by Eric Carlson.
+
+        In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
+        to allowsAirPlayForMediaPlayback.
+
+        * page/Settings.in: Update the setting name.
+
+        * html/HTMLMediaSession.cpp:
+        (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Update the call to settings.
+        * testing/InternalSettings.h: Update the name of the member variable.
+        * testing/InternalSettings.cpp: Update the names and calls to settings.
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::InternalSettings):
+        (WebCore::InternalSettings::resetToConsistentState):
+        (WebCore::InternalSettings::setWirelessPlaybackDisabled):
+
+2015-05-22  Jon Lee  <jon...@apple.com>
+
         Rename MediaPlaybackRequiresUserGesture
         https://bugs.webkit.org/show_bug.cgi?id=145314
 

Modified: trunk/Source/WebCore/html/HTMLMediaSession.cpp (184810 => 184811)


--- trunk/Source/WebCore/html/HTMLMediaSession.cpp	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebCore/html/HTMLMediaSession.cpp	2015-05-23 01:55:41 UTC (rev 184811)
@@ -228,7 +228,7 @@
 bool HTMLMediaSession::wirelessVideoPlaybackDisabled(const HTMLMediaElement& element) const
 {
     Settings* settings = element.document().settings();
-    if (!settings || !settings->mediaPlaybackAllowsAirPlay()) {
+    if (!settings || !settings->allowsAirPlayForMediaPlayback()) {
         LOG(Media, "HTMLMediaSession::wirelessVideoPlaybackDisabled - returning TRUE because of settings");
         return true;
     }

Modified: trunk/Source/WebCore/page/Settings.in (184810 => 184811)


--- trunk/Source/WebCore/page/Settings.in	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebCore/page/Settings.in	2015-05-23 01:55:41 UTC (rev 184811)
@@ -205,7 +205,7 @@
 # FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
 allowMultiElementImplicitSubmission initial=false
 
-mediaPlaybackAllowsAirPlay initial=true, conditional=WIRELESS_PLAYBACK_TARGET
+allowsAirPlayForMediaPlayback initial=true, conditional=WIRELESS_PLAYBACK_TARGET
 
 shouldConvertPositionStyleOnCopy initial=false
 

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (184810 => 184811)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2015-05-23 01:55:41 UTC (rev 184811)
@@ -98,7 +98,7 @@
     , m_touchEventEmulationEnabled(settings.isTouchEventEmulationEnabled())
 #endif
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-    , m_mediaPlaybackAllowsAirPlay(settings.mediaPlaybackAllowsAirPlay())
+    , m_allowsAirPlayForMediaPlayback(settings.allowsAirPlayForMediaPlayback())
 #endif
 {
 }
@@ -202,7 +202,7 @@
     , m_backup(page->settings())
 {
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-    page->settings().setMediaPlaybackAllowsAirPlay(false);
+    page->settings().setAllowsAirPlayForMediaPlayback(false);
 #endif
 }
 
@@ -211,7 +211,7 @@
     page()->setPageScaleFactor(1, IntPoint(0, 0));
     page()->setCanStartMedia(true);
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-    m_page->settings().setMediaPlaybackAllowsAirPlay(false);
+    m_page->settings().setAllowsAirPlayForMediaPlayback(false);
 #endif
 
     m_backup.restoreTo(*settings());
@@ -363,7 +363,7 @@
 void InternalSettings::setWirelessPlaybackDisabled(bool available)
 {
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-    m_page->settings().setMediaPlaybackAllowsAirPlay(available);
+    m_page->settings().setAllowsAirPlayForMediaPlayback(available);
 #else
     UNUSED_PARAM(available);
 #endif

Modified: trunk/Source/WebCore/testing/InternalSettings.h (184810 => 184811)


--- trunk/Source/WebCore/testing/InternalSettings.h	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2015-05-23 01:55:41 UTC (rev 184811)
@@ -96,7 +96,7 @@
         bool m_touchEventEmulationEnabled;
 #endif
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-        bool m_mediaPlaybackAllowsAirPlay;
+        bool m_allowsAirPlayForMediaPlayback;
 #endif
     };
 

Modified: trunk/Source/WebKit/mac/ChangeLog (184810 => 184811)


--- trunk/Source/WebKit/mac/ChangeLog	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-05-23 01:55:41 UTC (rev 184811)
@@ -1,5 +1,25 @@
 2015-05-22  Jon Lee  <jon...@apple.com>
 
+        Rename MediaPlaybackAllowsAirPlay
+        https://bugs.webkit.org/show_bug.cgi?id=145316
+
+        Reviewed by Eric Carlson.
+
+        In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
+        to allowsAirPlayForMediaPlayback.
+
+        * WebView/WebPreferenceKeysPrivate.h: Update the name but keep its value, for backwards
+        compatibility.
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]): Update to reference the new key name.
+        (-[WebPreferences mediaPlaybackAllowsAirPlay]): Ditto. This API will not change in a future
+        patch.
+        (-[WebPreferences setMediaPlaybackAllowsAirPlay:]): Ditto.
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]): Update the call to settings.
+
+2015-05-22  Jon Lee  <jon...@apple.com>
+
         Rename MediaPlaybackRequiresUserGesture
         https://bugs.webkit.org/show_bug.cgi?id=145314
 

Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (184810 => 184811)


--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h	2015-05-23 01:55:41 UTC (rev 184811)
@@ -130,7 +130,7 @@
 #define WebKitSuppressesIncrementalRenderingKey @"WebKitSuppressesIncrementalRendering"
 #define WebKitSubpixelCSSOMElementMetricsEnabledPreferenceKey @"WebKitSubpixelCSSOMElementMetricsEnabled"
 #if TARGET_OS_IPHONE
-#define WebKitMediaPlaybackAllowsAirPlayPreferenceKey @"WebKitMediaPlaybackAllowsAirPlay"
+#define WebKitAllowsAirPlayForMediaPlaybackPreferenceKey @"WebKitMediaPlaybackAllowsAirPlay"
 #define WebKitAudioSessionCategoryOverride @"WebKitAudioSessionCategoryOverride"
 #define WebKitAVKitEnabled @"WebKitAVKitEnabled"
 #endif

Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (184810 => 184811)


--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm	2015-05-23 01:55:41 UTC (rev 184811)
@@ -529,7 +529,7 @@
 #else
         [NSNumber numberWithBool:YES],  WebKitRequiresUserGestureForMediaPlaybackPreferenceKey,
         [NSNumber numberWithBool:NO],   WebKitMediaPlaybackAllowsInlinePreferenceKey,
-        [NSNumber numberWithBool:YES],  WebKitMediaPlaybackAllowsAirPlayPreferenceKey,
+        [NSNumber numberWithBool:YES],  WebKitAllowsAirPlayForMediaPlaybackPreferenceKey,
         [NSNumber numberWithUnsignedInt:AudioSession::None],  WebKitAudioSessionCategoryOverride,
 #if HAVE(AVKIT)
         [NSNumber numberWithBool:YES],  WebKitAVKitEnabled,
@@ -2079,12 +2079,12 @@
 #if PLATFORM(IOS)
 - (BOOL)mediaPlaybackAllowsAirPlay
 {
-    return [self _boolValueForKey:WebKitMediaPlaybackAllowsAirPlayPreferenceKey];
+    return [self _boolValueForKey:WebKitAllowsAirPlayForMediaPlaybackPreferenceKey];
 }
 
 - (void)setMediaPlaybackAllowsAirPlay:(BOOL)flag
 {
-    [self _setBoolValue:flag forKey:WebKitMediaPlaybackAllowsAirPlayPreferenceKey];
+    [self _setBoolValue:flag forKey:WebKitAllowsAirPlayForMediaPlaybackPreferenceKey];
 }
 
 - (unsigned)audioSessionCategoryOverride

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (184810 => 184811)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2015-05-23 01:55:41 UTC (rev 184811)
@@ -2350,7 +2350,7 @@
     settings.setLayoutInterval(std::chrono::milliseconds([preferences _layoutInterval]));
     settings.setMaxParseDuration([preferences _maxParseDuration]);
     settings.setAlwaysUseAcceleratedOverflowScroll([preferences _alwaysUseAcceleratedOverflowScroll]);
-    settings.setMediaPlaybackAllowsAirPlay([preferences mediaPlaybackAllowsAirPlay]);
+    settings.setAllowsAirPlayForMediaPlayback([preferences mediaPlaybackAllowsAirPlay]);
     settings.setAudioSessionCategoryOverride([preferences audioSessionCategoryOverride]);
     settings.setNetworkDataUsageTrackingEnabled([preferences networkDataUsageTrackingEnabled]);
     settings.setNetworkInterfaceName([preferences networkInterfaceName]);

Modified: trunk/Source/WebKit2/ChangeLog (184810 => 184811)


--- trunk/Source/WebKit2/ChangeLog	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-23 01:55:41 UTC (rev 184811)
@@ -1,5 +1,21 @@
 2015-05-22  Jon Lee  <jon...@apple.com>
 
+        Rename MediaPlaybackAllowsAirPlay
+        https://bugs.webkit.org/show_bug.cgi?id=145316
+
+        Reviewed by Eric Carlson.
+
+        In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
+        to allowsAirPlayForMediaPlayback.
+
+        * Shared/WebPreferencesDefinitions.h: Update the name.
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithFrame:configuration:]): Ditto.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences): Update the call to settings.
+
+2015-05-22  Jon Lee  <jon...@apple.com>
+
         Unreviewed GTK fix after r184802.
 
         * UIProcess/API/gtk/WebKitSettings.cpp:

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (184810 => 184811)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2015-05-23 01:55:41 UTC (rev 184811)
@@ -131,7 +131,7 @@
     macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK) \
     macro(MediaPlaybackAllowsInline, mediaPlaybackAllowsInline, Bool, bool, DEFAULT_MEDIA_PLAYBACK_ALLOWS_INLINE) \
     macro(AllowsAlternateFullscreen, allowsAlternateFullscreen, Bool, bool, true) \
-    macro(MediaPlaybackAllowsAirPlay, mediaPlaybackAllowsAirPlay, Bool, bool, true) \
+    macro(AllowsAirPlayForMediaPlayback, allowsAirPlayForMediaPlayback, Bool, bool, true) \
     macro(InspectorStartsAttached, inspectorStartsAttached, Bool, bool, true) \
     macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false) \
     macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false) \

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (184810 => 184811)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-05-23 01:55:41 UTC (rev 184811)
@@ -321,7 +321,7 @@
     webPageConfiguration.preferenceValues.set(WebKit::WebPreferencesKey::mediaPlaybackAllowsInlineKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsInlineMediaPlayback]));
     webPageConfiguration.preferenceValues.set(WebKit::WebPreferencesKey::allowsAlternateFullscreenKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsAlternateFullscreen] && shouldAllowAlternateFullscreen()));
     webPageConfiguration.preferenceValues.set(WebKit::WebPreferencesKey::requiresUserGestureForMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration mediaPlaybackRequiresUserAction]));
-    webPageConfiguration.preferenceValues.set(WebKit::WebPreferencesKey::mediaPlaybackAllowsAirPlayKey(), WebKit::WebPreferencesStore::Value(!![_configuration mediaPlaybackAllowsAirPlay]));
+    webPageConfiguration.preferenceValues.set(WebKit::WebPreferencesKey::allowsAirPlayForMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration mediaPlaybackAllowsAirPlay]));
 #endif
 
 #if PLATFORM(IOS)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (184810 => 184811)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-05-23 01:15:32 UTC (rev 184810)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-05-23 01:55:41 UTC (rev 184811)
@@ -2819,7 +2819,7 @@
 #endif
 
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
-    settings.setMediaPlaybackAllowsAirPlay(store.getBoolValueForKey(WebPreferencesKey::mediaPlaybackAllowsAirPlayKey()));
+    settings.setAllowsAirPlayForMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsAirPlayForMediaPlaybackKey()));
 #endif
 
     settings.setSuppressesIncrementalRendering(store.getBoolValueForKey(WebPreferencesKey::suppressesIncrementalRenderingKey()));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to