Title: [282966] trunk/Source
Revision
282966
Author
timothy_hor...@apple.com
Date
2021-09-23 10:14:07 -0700 (Thu, 23 Sep 2021)

Log Message

shouldAllowPictureInPictureMediaPlayback should use WebCore's linkedOnOrAfter()
https://bugs.webkit.org/show_bug.cgi?id=230674

Reviewed by Simon Fraser.

Source/WebCore:

* platform/cocoa/VersionChecks.h:
Remove the unused `FirstWithNetworkCache` version, and add one for PIP.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback):
Adopt the WebCore API (which supports overrides for Safari and for testing).

Source/WebKitLegacy/mac:

* WebView/WebPreferencesDefaultValues.mm:
(WebKit::defaultAllowsPictureInPictureMediaPlayback):
Adopt the WebCore API (which supports overrides for Safari and for testing).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (282965 => 282966)


--- trunk/Source/WebCore/ChangeLog	2021-09-23 17:12:19 UTC (rev 282965)
+++ trunk/Source/WebCore/ChangeLog	2021-09-23 17:14:07 UTC (rev 282966)
@@ -1,3 +1,13 @@
+2021-09-23  Tim Horton  <timothy_hor...@apple.com>
+
+        shouldAllowPictureInPictureMediaPlayback should use WebCore's linkedOnOrAfter()
+        https://bugs.webkit.org/show_bug.cgi?id=230674
+
+        Reviewed by Simon Fraser.
+
+        * platform/cocoa/VersionChecks.h:
+        Remove the unused `FirstWithNetworkCache` version, and add one for PIP.
+
 2021-09-23  Tim Nguyen  <n...@apple.com>
 
         AX: Stop exposing isInert & ignoredFromModalPresence in AXCoreObject & AXIsolatedObject

Modified: trunk/Source/WebCore/platform/cocoa/VersionChecks.h (282965 => 282966)


--- trunk/Source/WebCore/platform/cocoa/VersionChecks.h	2021-09-23 17:12:19 UTC (rev 282965)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.h	2021-09-23 17:14:07 UTC (rev 282966)
@@ -37,7 +37,7 @@
 
 enum class SDKVersion : uint32_t {
 #if PLATFORM(IOS_FAMILY)
-    FirstWithNetworkCache = DYLD_IOS_VERSION_9_0,
+    FirstWithPictureInPictureMediaPlayback = DYLD_IOS_VERSION_9_0,
     FirstWithMediaTypesRequiringUserActionForPlayback = DYLD_IOS_VERSION_10_0,
     FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_IOS_VERSION_11_0,
     FirstWithExpiredOnlyReloadBehavior = DYLD_IOS_VERSION_11_0,
@@ -76,7 +76,6 @@
     FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_IOS_VERSION_15_0,
     FirstForbiddingDotPrefixedFonts = DYLD_IOS_VERSION_16_0,
 #elif PLATFORM(MAC)
-    FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
     FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
     FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13,
     FirstWithExpiredOnlyReloadBehavior = DYLD_MACOSX_VERSION_10_13,

Modified: trunk/Source/WebKit/ChangeLog (282965 => 282966)


--- trunk/Source/WebKit/ChangeLog	2021-09-23 17:12:19 UTC (rev 282965)
+++ trunk/Source/WebKit/ChangeLog	2021-09-23 17:14:07 UTC (rev 282966)
@@ -1,3 +1,14 @@
+2021-09-23  Tim Horton  <timothy_hor...@apple.com>
+
+        shouldAllowPictureInPictureMediaPlayback should use WebCore's linkedOnOrAfter()
+        https://bugs.webkit.org/show_bug.cgi?id=230674
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (shouldAllowPictureInPictureMediaPlayback):
+        Adopt the WebCore API (which supports overrides for Safari and for testing).
+
 2021-09-23  Brent Fulgham  <bfulg...@apple.com>
 
         Remove XSS Auditor: Part 3 (Deprecate API)

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (282965 => 282966)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2021-09-23 17:12:19 UTC (rev 282965)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2021-09-23 17:14:07 UTC (rev 282966)
@@ -245,7 +245,7 @@
 
 static bool shouldAllowPictureInPictureMediaPlayback()
 {
-    static bool shouldAllowPictureInPictureMediaPlayback = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_9_0;
+    static bool shouldAllowPictureInPictureMediaPlayback = WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithPictureInPictureMediaPlayback);
     return shouldAllowPictureInPictureMediaPlayback;
 }
 

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (282965 => 282966)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-09-23 17:12:19 UTC (rev 282965)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-09-23 17:14:07 UTC (rev 282966)
@@ -1,3 +1,14 @@
+2021-09-23  Tim Horton  <timothy_hor...@apple.com>
+
+        shouldAllowPictureInPictureMediaPlayback should use WebCore's linkedOnOrAfter()
+        https://bugs.webkit.org/show_bug.cgi?id=230674
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebPreferencesDefaultValues.mm:
+        (WebKit::defaultAllowsPictureInPictureMediaPlayback):
+        Adopt the WebCore API (which supports overrides for Safari and for testing).
+
 2021-09-23  Brent Fulgham  <bfulg...@apple.com>
 
         Remove XSS Auditor: Part 3 (Deprecate API)

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (282965 => 282966)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm	2021-09-23 17:12:19 UTC (rev 282965)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm	2021-09-23 17:14:07 UTC (rev 282966)
@@ -103,7 +103,7 @@
 
 bool defaultAllowsPictureInPictureMediaPlayback()
 {
-    static bool shouldAllowPictureInPictureMediaPlayback = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_9_0;
+    static bool shouldAllowPictureInPictureMediaPlayback = WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstWithPictureInPictureMediaPlayback);
     return shouldAllowPictureInPictureMediaPlayback;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to