Diff
Modified: trunk/LayoutTests/ChangeLog (245943 => 245944)
--- trunk/LayoutTests/ChangeLog 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/LayoutTests/ChangeLog 2019-05-31 03:14:35 UTC (rev 245944)
@@ -1,3 +1,15 @@
+2019-05-30 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r245890, 245887.
+
+ Breaks internal builds.
+
+ Reverted changeset:
+ "Video playback in Safari should continue when CarPlay is plugged in"
+ https://bugs.webkit.org/show_bug.cgi?id=198345
+ https://trac.webkit.org/changeset/245887/webkit
+
+
2019-05-30 Dean Jackson <[email protected]>
Media documents on iPad are too wide in split screen
Deleted: trunk/LayoutTests/media/video-isplayingtoautomotiveheadunit-expected.txt (245943 => 245944)
--- trunk/LayoutTests/media/video-isplayingtoautomotiveheadunit-expected.txt 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/LayoutTests/media/video-isplayingtoautomotiveheadunit-expected.txt 2019-05-31 03:14:35 UTC (rev 245944)
@@ -1,15 +0,0 @@
-
-RUN(video.src = "" "content/test"))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-RUN(internals.setMediaSessionRestrictions("videoaudio", "suspendedunderlockplaybackrestricted"))
-RUN(internals.applicationDidEnterBackground(true))
-EVENT(pause)
-RUN(internals.applicationWillEnterForeground(true))
-EVENT(playing)
-RUN(internals.setIsPlayingToAutomotiveHeadUnit(true))
-RUN(internals.applicationDidEnterBackground(true))
-EXPECTED (video.paused == 'false') OK
-END OF TEST
-
Deleted: trunk/LayoutTests/media/video-isplayingtoautomotiveheadunit.html (245943 => 245944)
--- trunk/LayoutTests/media/video-isplayingtoautomotiveheadunit.html 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/LayoutTests/media/video-isplayingtoautomotiveheadunit.html 2019-05-31 03:14:35 UTC (rev 245944)
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>video-isplayingtoautomotiveheadunit</title>
- <script src=""
- <script src=""
- <script>
- window.addEventListener('load', async event => {
- findMediaElement();
-
- run('video.src = "" "content/test")');
- await waitFor(video, 'canplaythrough');
-
- runWithKeyDown('video.play()');
- await waitFor(video, 'playing');
-
- run('internals.setMediaSessionRestrictions("videoaudio", "suspendedunderlockplaybackrestricted")')
- run('internals.applicationDidEnterBackground(true)');
- await waitFor(video, 'pause');
-
- run('internals.applicationWillEnterForeground(true)');
- await waitFor(video, 'playing');
-
- run('internals.setIsPlayingToAutomotiveHeadUnit(true)');
- run('internals.applicationDidEnterBackground(true)');
- testExpected('video.paused', false);
- endTest();
- });
- </script>
-</head>
-<body>
- <video controls></video>
-</body>
-</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (245943 => 245944)
--- trunk/Source/WebCore/ChangeLog 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/ChangeLog 2019-05-31 03:14:35 UTC (rev 245944)
@@ -1,3 +1,14 @@
+2019-05-30 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r245890, 245887.
+
+ Breaks internal builds.
+
+ Reverted changeset:
+ "Video playback in Safari should continue when CarPlay is plugged in"
+ https://bugs.webkit.org/show_bug.cgi?id=198345
+ https://trac.webkit.org/changeset/245887/webkit
+
2019-05-30 Dean Jackson <[email protected]>
Media documents on iPad are too wide in split screen
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (245943 => 245944)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2019-05-31 03:14:35 UTC (rev 245944)
@@ -7715,10 +7715,6 @@
INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToExternalTarget() is true");
return true;
}
- if (PlatformMediaSessionManager::sharedManager().isPlayingToAutomotiveHeadUnit()) {
- INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToAutomotiveHeadUnit() is true");
- return true;
- }
if (m_videoFullscreenMode & VideoFullscreenModePictureInPicture)
return true;
#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
@@ -7730,10 +7726,6 @@
INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToExternalTarget() is true");
return true;
}
- if (PlatformMediaSessionManager::sharedManager().isPlayingToAutomotiveHeadUnit()) {
- INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToAutomotiveHeadUnit() is true");
- return true;
- }
}
return false;
}
Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (245943 => 245944)
--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2019-05-31 03:14:35 UTC (rev 245944)
@@ -391,15 +391,7 @@
#endif
}
-void PlatformMediaSessionManager::setIsPlayingToAutomotiveHeadUnit(bool isPlayingToAutomotiveHeadUnit)
-{
- if (isPlayingToAutomotiveHeadUnit == m_isPlayingToAutomotiveHeadUnit)
- return;
- ALWAYS_LOG(LOGIDENTIFIER, isPlayingToAutomotiveHeadUnit);
- m_isPlayingToAutomotiveHeadUnit = isPlayingToAutomotiveHeadUnit;
-}
-
void PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged(PlatformMediaSession& session)
{
if (!m_isApplicationInBackground || !(m_restrictions[session.mediaType()] & BackgroundProcessPlaybackRestricted))
Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (245943 => 245944)
--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h 2019-05-31 03:14:35 UTC (rev 245944)
@@ -129,9 +129,6 @@
void sessionIsPlayingToWirelessPlaybackTargetChanged(PlatformMediaSession&);
- WEBCORE_EXPORT void setIsPlayingToAutomotiveHeadUnit(bool);
- bool isPlayingToAutomotiveHeadUnit() const { return m_isPlayingToAutomotiveHeadUnit; }
-
void forEachMatchingSession(const Function<bool(const PlatformMediaSession&)>& predicate, const Function<void(PlatformMediaSession&)>& matchingCallback);
protected:
@@ -191,7 +188,6 @@
mutable bool m_isApplicationInBackground { false };
bool m_willIgnoreSystemInterruptions { false };
bool m_processIsSuspended { false };
- bool m_isPlayingToAutomotiveHeadUnit { false };
#if USE(AUDIO_SESSION)
bool m_becameActive { false };
Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h (245943 => 245944)
--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h 2019-05-31 03:14:35 UTC (rev 245944)
@@ -47,8 +47,6 @@
void externalOutputDeviceAvailableDidChange();
bool hasWirelessTargetsAvailable() override;
- void carPlayServerDied();
- void updateCarPlayIsConnected(Optional<bool>&&);
private:
friend class PlatformMediaSessionManager;
Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (245943 => 245944)
--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm 2019-05-31 03:14:35 UTC (rev 245944)
@@ -56,10 +56,6 @@
SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Celestial)
SOFT_LINK_CLASS_OPTIONAL(Celestial, AVSystemController)
SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_PIDToInheritApplicationStateFrom, NSString *)
-SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedAttribute, NSString *)
-SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedDidChangeNotification, NSString *)
-SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedNotificationParameter, NSString *)
-SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_ServerConnectionDiedNotification, NSString *)
#endif
using namespace WebCore;
@@ -113,8 +109,6 @@
m_objcObserver = adoptNS([[WebMediaSessionHelper alloc] initWithCallback:this]);
END_BLOCK_OBJC_EXCEPTIONS
resetRestrictions();
-
- updateCarPlayIsConnected(WTF::nullopt);
}
MediaSessionManageriOS::~MediaSessionManageriOS()
@@ -200,27 +194,6 @@
END_BLOCK_OBJC_EXCEPTIONS
}
-void MediaSessionManageriOS::carPlayServerDied()
-{
- ALWAYS_LOG(LOGIDENTIFIER);
- updateCarPlayIsConnected(WTF::nullopt);
-}
-
-void MediaSessionManageriOS::updateCarPlayIsConnected(Optional<bool>&& carPlayIsConnected)
-{
- if (carPlayIsConnected) {
- setIsPlayingToAutomotiveHeadUnit(carPlayIsConnected.value());
- return;
- }
-
- if (!canLoadAVSystemController_CarPlayIsConnectedAttribute()) {
- setIsPlayingToAutomotiveHeadUnit(false);
- return;
- }
-
- setIsPlayingToAutomotiveHeadUnit([[[getAVSystemControllerClass() sharedAVSystemController] attributeForKey:getAVSystemController_CarPlayIsConnectedAttribute()] boolValue]);
-}
-
} // namespace WebCore
@implementation WebMediaSessionHelper
@@ -245,10 +218,6 @@
[center addObserver:self selector:@selector(applicationWillResignActive:) name:WebUIApplicationWillResignActiveNotification object:nil];
[center addObserver:self selector:@selector(applicationDidEnterBackground:) name:PAL::get_UIKit_UIApplicationDidEnterBackgroundNotification() object:nil];
[center addObserver:self selector:@selector(applicationDidEnterBackground:) name:WebUIApplicationDidEnterBackgroundNotification object:nil];
- if (canLoadAVSystemController_ServerConnectionDiedNotification())
- [center addObserver:self selector:@selector(carPlayServerDied:) name:getAVSystemController_ServerConnectionDiedNotification() object:nil];
- if (canLoadAVSystemController_CarPlayIsConnectedDidChangeNotification())
- [center addObserver:self selector:@selector(carPlayIsConnectedDidChange:) name:getAVSystemController_CarPlayIsConnectedDidChangeNotification() object:nil];
// Now playing won't work unless we turn on the delivery of remote control events.
dispatch_async(dispatch_get_main_queue(), ^ {
@@ -317,7 +286,7 @@
LOG(Media, "-[WebMediaSessionHelper startMonitoringAirPlayRoutes]");
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable {
ASSERT(!protectedSelf->_routeDetector);
if (protectedSelf->_callback) {
@@ -324,7 +293,7 @@
BEGIN_BLOCK_OBJC_EXCEPTIONS
protectedSelf->_routeDetector = adoptNS([PAL::allocAVRouteDetectorInstance() init]);
protectedSelf->_routeDetector.get().routeDetectionEnabled = protectedSelf->_monitoringAirPlayRoutes;
- [[NSNotificationCenter defaultCenter] addObserver:protectedSelf.get() selector:@selector(wirelessRoutesAvailableDidChange:) name:AVRouteDetectorMultipleRoutesDetectedDidChangeNotification object:protectedSelf->_routeDetector.get()];
+ [[NSNotificationCenter defaultCenter] addObserver:protectedSelf selector:@selector(wirelessRoutesAvailableDidChange:) name:AVRouteDetectorMultipleRoutesDetectedDidChangeNotification object:protectedSelf->_routeDetector.get()];
protectedSelf->_callback->externalOutputDeviceAvailableDidChange();
END_BLOCK_OBJC_EXCEPTIONS
@@ -359,7 +328,7 @@
if (type == AVAudioSessionInterruptionTypeEnded && [[[notification userInfo] objectForKey:AVAudioSessionInterruptionOptionKey] unsignedIntegerValue] == AVAudioSessionInterruptionOptionShouldResume)
flags = PlatformMediaSession::MayResumePlaying;
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), type, flags]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self), type, flags]() mutable {
auto* callback = protectedSelf->_callback;
if (!callback)
return;
@@ -382,7 +351,7 @@
LOG(Media, "-[WebMediaSessionHelper applicationWillEnterForeground]");
BOOL isSuspendedUnderLock = [[[notification userInfo] objectForKey:@"isSuspendedUnderLock"] boolValue];
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), isSuspendedUnderLock]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self), isSuspendedUnderLock]() mutable {
if (auto* callback = protectedSelf->_callback)
callback->applicationWillEnterForeground(isSuspendedUnderLock);
});
@@ -397,7 +366,7 @@
LOG(Media, "-[WebMediaSessionHelper applicationDidBecomeActive]");
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable {
if (auto* callback = protectedSelf->_callback)
callback->applicationDidBecomeActive();
});
@@ -412,7 +381,7 @@
LOG(Media, "-[WebMediaSessionHelper applicationWillResignActive]");
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable {
if (auto* callback = protectedSelf->_callback)
callback->applicationWillBecomeInactive();
});
@@ -427,7 +396,7 @@
LOG(Media, "-[WebMediaSessionHelper wirelessRoutesAvailableDidChange]");
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self)]() mutable {
if (auto* callback = protectedSelf->_callback)
callback->externalOutputDeviceAvailableDidChange();
});
@@ -441,42 +410,11 @@
LOG(Media, "-[WebMediaSessionHelper applicationDidEnterBackground]");
BOOL isSuspendedUnderLock = [[[notification userInfo] objectForKey:@"isSuspendedUnderLock"] boolValue];
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), isSuspendedUnderLock]() mutable {
+ callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = WTFMove(self), isSuspendedUnderLock]() mutable {
if (auto* callback = protectedSelf->_callback)
callback->applicationDidEnterBackground(isSuspendedUnderLock);
});
}
-
-- (void)carPlayServerDied:(NSNotification *)notification
-{
- if (!_callback)
- return;
-
- LOG(Media, "-[WebMediaSessionHelper carPlayServerDied:]");
- UNUSED_PARAM(notification);
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable {
- if (auto* callback = protectedSelf->_callback)
- callback->carPlayServerDied();
- });
-}
-
-- (void)carPlayIsConnectedDidChange:(NSNotification *)notification
-{
- if (!_callback)
- return;
-
- Optional<bool> carPlayIsConnected;
- if (notification && canLoadAVSystemController_CarPlayIsConnectedNotificationParameter()) {
- NSNumber *nsCarPlayIsConnected = [[notification userInfo] valueForKey:getAVSystemController_CarPlayIsConnectedNotificationParameter()];
- if (nsCarPlayIsConnected)
- carPlayIsConnected = [nsCarPlayIsConnected boolValue];
- }
-
- callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), carPlayIsConnected = WTFMove(carPlayIsConnected)]() mutable {
- if (auto* callback = protectedSelf->_callback)
- callback->updateCarPlayIsConnected(WTFMove(carPlayIsConnected));
- });
-}
@end
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebCore/testing/Internals.cpp (245943 => 245944)
--- trunk/Source/WebCore/testing/Internals.cpp 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/testing/Internals.cpp 2019-05-31 03:14:35 UTC (rev 245944)
@@ -492,7 +492,6 @@
PlatformMediaSessionManager::sharedManager().resetRestrictions();
PlatformMediaSessionManager::sharedManager().setWillIgnoreSystemInterruptions(true);
#endif
- PlatformMediaSessionManager::sharedManager().setIsPlayingToAutomotiveHeadUnit(false);
#if HAVE(ACCESSIBILITY)
AXObjectCache::setEnhancedUserInterfaceAccessibility(false);
AXObjectCache::disableAccessibility();
@@ -5068,9 +5067,4 @@
request.setMaximumIntervalForUserGestureForwarding(interval);
}
-void Internals::setIsPlayingToAutomotiveHeadUnit(bool isPlaying)
-{
- PlatformMediaSessionManager::sharedManager().setIsPlayingToAutomotiveHeadUnit(isPlaying);
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/testing/Internals.h (245943 => 245944)
--- trunk/Source/WebCore/testing/Internals.h 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/testing/Internals.h 2019-05-31 03:14:35 UTC (rev 245944)
@@ -823,8 +823,6 @@
void setXHRMaximumIntervalForUserGestureForwarding(XMLHttpRequest&, double);
- void setIsPlayingToAutomotiveHeadUnit(bool);
-
private:
explicit Internals(Document&);
Document* contextDocument() const;
Modified: trunk/Source/WebCore/testing/Internals.idl (245943 => 245944)
--- trunk/Source/WebCore/testing/Internals.idl 2019-05-31 02:19:12 UTC (rev 245943)
+++ trunk/Source/WebCore/testing/Internals.idl 2019-05-31 03:14:35 UTC (rev 245944)
@@ -753,6 +753,4 @@
void testDictionaryLogging();
void setXHRMaximumIntervalForUserGestureForwarding(XMLHttpRequest xhr, double interval);
-
- void setIsPlayingToAutomotiveHeadUnit(boolean value);
};