Title: [201157] branches/safari-602.1.32-branch/Source/WebKit2

Diff

Modified: branches/safari-602.1.32-branch/Source/WebKit2/ChangeLog (201156 => 201157)


--- branches/safari-602.1.32-branch/Source/WebKit2/ChangeLog	2016-05-19 09:36:03 UTC (rev 201156)
+++ branches/safari-602.1.32-branch/Source/WebKit2/ChangeLog	2016-05-19 09:36:05 UTC (rev 201157)
@@ -1,5 +1,23 @@
 2016-05-19  Babak Shafiei  <[email protected]>
 
+        Merge r201110. rdar://problem/25730174
+
+    2016-05-18  Jer Noble  <[email protected]>
+
+            Disable default user gesture requirement for audio playback on Mac
+            https://bugs.webkit.org/show_bug.cgi?id=157820
+
+            Reviewed by Sam Weinig.
+
+            Disable the WebPreferences and matching WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback
+            settings on Mac (and other non-iOS ports).
+
+            * Shared/WebPreferencesDefinitions.h:
+            * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+            (-[WKWebViewConfiguration init]):
+
+2016-05-19  Babak Shafiei  <[email protected]>
+
         Merge r201016. rdar://problem/25584201
 
     2016-05-17  Jer Noble  <[email protected]>

Modified: branches/safari-602.1.32-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h (201156 => 201157)


--- branches/safari-602.1.32-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-05-19 09:36:03 UTC (rev 201156)
+++ branches/safari-602.1.32-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-05-19 09:36:05 UTC (rev 201157)
@@ -56,12 +56,10 @@
 #define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED true
 #define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED true
 #define DEFAULT_PDFPLUGIN_ENABLED true
-#define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true
 #else
 #define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED false
 #define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED false
 #define DEFAULT_PDFPLUGIN_ENABLED false
-#define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK false
 #endif
 
 #if PLATFORM(IOS)
@@ -78,6 +76,7 @@
 #define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY false
 #define DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM false
 #define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED false
+#define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true
 #else
 #define DEFAULT_BACKSPACE_KEY_NAVIGATION_ENABLED true
 #define DEFAULT_FRAME_FLATTENING_ENABLED false
@@ -92,6 +91,7 @@
 #define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY true
 #define DEFAULT_MEDIA_CONTROLS_SCALE_WITH_PAGE_ZOOM true
 #define DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED true
+#define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK false
 #endif
 
 #if PLATFORM(IOS_SIMULATOR)

Modified: branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (201156 => 201157)


--- branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2016-05-19 09:36:03 UTC (rev 201156)
+++ branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm	2016-05-19 09:36:05 UTC (rev 201157)
@@ -136,14 +136,15 @@
     _allowsInlineMediaPlayback = WebCore::deviceClass() == MGDeviceClassiPad;
     _inlineMediaPlaybackRequiresPlaysInlineAttribute = !_allowsInlineMediaPlayback;
     _mediaDataLoadsAutomatically = NO;
+    if (linkedOnOrAfter(WebKit::LibraryVersion::FirstWithMediaTypesRequiringUserActionForPlayback))
+        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAudio;
+    else
+        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAll;
 #else
+    _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone;
     _mediaDataLoadsAutomatically = YES;
     _userInterfaceDirectionPolicy = WKUserInterfaceDirectionPolicyContent;
 #endif
-    if (linkedOnOrAfter(WebKit::LibraryVersion::FirstWithMediaTypesRequiringUserActionForPlayback))
-        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAudio;
-    else
-        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAll;
     _mainContentUserGestureOverrideEnabled = NO;
     _invisibleAutoplayNotPermitted = NO;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to