Diff
Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (190811 => 190812)
--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2015-10-09 19:53:56 UTC (rev 190812)
@@ -1,3 +1,7 @@
+2015-10-09 Babak Shafiei <[email protected]>
+
+ Roll out r190604.
+
2015-10-08 Matthew Hanson <[email protected]>
Merge r190604. rdar://problem/22993012
Modified: branches/safari-601.1.46-branch/LayoutTests/media/video-background-playback-expected.txt (190811 => 190812)
--- branches/safari-601.1.46-branch/LayoutTests/media/video-background-playback-expected.txt 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/LayoutTests/media/video-background-playback-expected.txt 2015-10-09 19:53:56 UTC (rev 190812)
@@ -21,7 +21,7 @@
EXPECTED (audio.paused == 'false') OK
** Simulate switch back to foreground, video should resume.
-RUN(internals.applicationDidEnterForeground())
+RUN(internals.applicationWillEnterForeground())
EVENT(playing)
Modified: branches/safari-601.1.46-branch/LayoutTests/media/video-background-playback.html (190811 => 190812)
--- branches/safari-601.1.46-branch/LayoutTests/media/video-background-playback.html 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/LayoutTests/media/video-background-playback.html 2015-10-09 19:53:56 UTC (rev 190812)
@@ -23,7 +23,7 @@
testExpected("audio.paused", false);
state = "foreground";
consoleWrite("<br>** Simulate switch back to foreground, video should resume.");
- run("internals.applicationDidEnterForeground()");
+ run("internals.applicationWillEnterForeground()");
setTimeout(checkState, 100);
consoleWrite("");
break;
Modified: branches/safari-601.1.46-branch/LayoutTests/media/video-background-tab-playback-expected.txt (190811 => 190812)
--- branches/safari-601.1.46-branch/LayoutTests/media/video-background-tab-playback-expected.txt 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/LayoutTests/media/video-background-tab-playback-expected.txt 2015-10-09 19:53:56 UTC (rev 190812)
@@ -16,7 +16,7 @@
EXPECTED (video.paused == 'true') OK
** Simulate switch back to foreground, video should remain paused.
-RUN(internals.applicationDidEnterForeground())
+RUN(internals.applicationWillEnterForeground())
** 100ms timer fired...
Modified: branches/safari-601.1.46-branch/LayoutTests/media/video-background-tab-playback.html (190811 => 190812)
--- branches/safari-601.1.46-branch/LayoutTests/media/video-background-tab-playback.html 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/LayoutTests/media/video-background-tab-playback.html 2015-10-09 19:53:56 UTC (rev 190812)
@@ -13,7 +13,7 @@
testExpected("video.paused", true);
state = "foreground";
consoleWrite("<br>** Simulate switch back to foreground, video should remain paused.");
- run("internals.applicationDidEnterForeground()");
+ run("internals.applicationWillEnterForeground()");
setTimeout(checkState, 100);
consoleWrite("");
break;
Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-10-09 19:53:56 UTC (rev 190812)
@@ -1,3 +1,7 @@
+2015-10-09 Babak Shafiei <[email protected]>
+
+ Roll out r190604.
+
2015-10-08 Matthew Hanson <[email protected]>
Merge r190604. rdar://problem/22993012
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSession.h (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSession.h 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSession.h 2015-10-09 19:53:56 UTC (rev 190812)
@@ -84,6 +84,10 @@
void beginInterruption(InterruptionType);
void endInterruption(EndInterruptionFlags);
+ void applicationWillEnterForeground() const;
+ void applicationWillEnterBackground() const;
+ void applicationDidEnterBackground(bool isSuspendedUnderLock) const;
+
bool clientWillBeginPlayback();
bool clientWillPausePlayback();
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp 2015-10-09 19:53:56 UTC (rev 190812)
@@ -289,9 +289,9 @@
}
}
-void PlatformMediaSessionManager::applicationDidEnterForeground() const
+void PlatformMediaSessionManager::applicationWillEnterForeground() const
{
- LOG(Media, "PlatformMediaSessionManager::applicationDidEnterForeground");
+ LOG(Media, "PlatformMediaSessionManager::applicationWillEnterForeground");
if (!m_isApplicationInBackground)
return;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSessionManager.h 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/audio/PlatformMediaSessionManager.h 2015-10-09 19:53:56 UTC (rev 190812)
@@ -54,7 +54,7 @@
WEBCORE_EXPORT void beginInterruption(PlatformMediaSession::InterruptionType);
WEBCORE_EXPORT void endInterruption(PlatformMediaSession::EndInterruptionFlags);
- WEBCORE_EXPORT void applicationDidEnterForeground() const;
+ WEBCORE_EXPORT void applicationWillEnterForeground() const;
WEBCORE_EXPORT void applicationWillEnterBackground() const;
void stopAllMediaPlaybackForDocument(const Document*);
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h 2015-10-09 19:53:56 UTC (rev 190812)
@@ -49,7 +49,6 @@
void externalOutputDeviceAvailableDidChange();
virtual bool hasWirelessTargetsAvailable() override;
void applicationDidEnterBackground(bool isSuspendedUnderLock);
- void applicationWillEnterForeground(bool isSuspendedUnderLock);
private:
friend class PlatformMediaSessionManager;
@@ -68,7 +67,6 @@
virtual bool sessionCanLoadMedia(const PlatformMediaSession&) const override;
RetainPtr<WebMediaSessionHelper> m_objcObserver;
- bool m_isInBackground { false };
};
} // namespace WebCore
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm 2015-10-09 19:53:56 UTC (rev 190812)
@@ -252,10 +252,6 @@
{
LOG(Media, "MediaSessionManageriOS::applicationDidEnterBackground");
- if (m_isInBackground)
- return;
- m_isInBackground = true;
-
if (!isSuspendedUnderLock)
return;
@@ -266,24 +262,7 @@
}
}
-void MediaSessionManageriOS::applicationWillEnterForeground(bool isSuspendedUnderLock)
-{
- LOG(Media, "MediaSessionManageriOS::applicationWillEnterForeground");
- if (!m_isInBackground)
- return;
- m_isInBackground = false;
-
- if (!isSuspendedUnderLock)
- return;
-
- Vector<PlatformMediaSession*> sessions = this->sessions();
- for (auto* session : sessions) {
- if (restrictions(session->mediaType()) & BackgroundProcessPlaybackRestricted)
- session->endInterruption(PlatformMediaSession::MayResumePlaying);
- }
-}
-
} // namespace WebCore
@implementation WebMediaSessionHelper
@@ -453,13 +432,11 @@
LOG(Media, "-[WebMediaSessionHelper applicationWillEnterForeground]");
- BOOL isSuspendedUnderLock = [[[notification userInfo] objectForKey:@"isSuspendedUnderLock"] boolValue];
-
WebThreadRun(^{
if (!_callback)
return;
- _callback->applicationWillEnterForeground(isSuspendedUnderLock);
+ _callback->applicationWillEnterForeground();
});
}
@@ -476,7 +453,7 @@
if (!_callback)
return;
- _callback->applicationDidEnterForeground();
+ _callback->applicationWillEnterForeground();
});
}
Modified: branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.cpp (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.cpp 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.cpp 2015-10-09 19:53:56 UTC (rev 190812)
@@ -2642,9 +2642,9 @@
PlatformMediaSessionManager::sharedManager().endInterruption(flags);
}
-void Internals::applicationDidEnterForeground() const
+void Internals::applicationWillEnterForeground() const
{
- PlatformMediaSessionManager::sharedManager().applicationDidEnterForeground();
+ PlatformMediaSessionManager::sharedManager().applicationWillEnterForeground();
}
void Internals::applicationWillEnterBackground() const
Modified: branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.h (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.h 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.h 2015-10-09 19:53:56 UTC (rev 190812)
@@ -384,7 +384,7 @@
#if ENABLE(VIDEO)
void beginMediaSessionInterruption(const String&, ExceptionCode&);
void endMediaSessionInterruption(const String&);
- void applicationDidEnterForeground() const;
+ void applicationWillEnterForeground() const;
void applicationWillEnterBackground() const;
void setMediaSessionRestrictions(const String& mediaType, const String& restrictions, ExceptionCode&);
void setMediaElementRestrictions(HTMLMediaElement*, const String& restrictions, ExceptionCode&);
Modified: branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.idl (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.idl 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebCore/testing/Internals.idl 2015-10-09 19:53:56 UTC (rev 190812)
@@ -351,13 +351,13 @@
[Conditional=VIDEO, RaisesException] void beginMediaSessionInterruption(DOMString interruptionType);
[Conditional=VIDEO] void endMediaSessionInterruption(DOMString flags);
- [Conditional=VIDEO] void applicationDidEnterForeground();
+ [Conditional=VIDEO] void applicationWillEnterForeground();
[Conditional=VIDEO] void applicationWillEnterBackground();
[Conditional=VIDEO, RaisesException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
[Conditional=VIDEO, RaisesException] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
[Conditional=WEB_AUDIO, RaisesException] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
[Conditional=VIDEO, RaisesException] void postRemoteControlCommand(DOMString command);
-
+
[Conditional=VIDEO] void simulateSystemSleep();
[Conditional=VIDEO] void simulateSystemWake();
[Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(Element element);
@@ -367,7 +367,7 @@
void setPageMuted(boolean muted);
boolean isPagePlayingAudio();
-
+
File createFile(DOMString url);
void queueMicroTask(long testNumber);
boolean testPreloaderSettingViewport();
Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog 2015-10-09 19:53:56 UTC (rev 190812)
@@ -1,3 +1,7 @@
+2015-10-09 Babak Shafiei <[email protected]>
+
+ Roll out r190604.
+
2015-10-08 Matthew Hanson <[email protected]>
Merge r190604. rdar://problem/22993012
Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2015-10-09 19:53:56 UTC (rev 190812)
@@ -614,8 +614,7 @@
void WebPageProxy::applicationWillEnterForeground()
{
- bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
- m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_pageID);
+ m_process->send(Messages::WebPage::ApplicationWillEnterForeground(), m_pageID);
}
void WebPageProxy::applicationWillResignActive()
Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-10-09 19:53:56 UTC (rev 190812)
@@ -801,7 +801,7 @@
void willStartUserTriggeredZooming();
void applicationWillResignActive();
void applicationDidEnterBackground(bool isSuspendedUnderLock);
- void applicationWillEnterForeground(bool isSuspendedUnderLock);
+ void applicationWillEnterForeground();
void applicationDidBecomeActive();
void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
void completePendingSyntheticClickForContentChangeObserver();
Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2015-10-09 19:53:56 UTC (rev 190812)
@@ -90,7 +90,7 @@
SetAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection)
ApplicationWillResignActive()
ApplicationDidEnterBackground(bool isSuspendedUnderLock)
- ApplicationWillEnterForeground(bool isSuspendedUnderLock)
+ ApplicationWillEnterForeground()
ApplicationDidBecomeActive()
ContentSizeCategoryDidChange(String contentSizeCategory)
ExecuteEditCommandWithCallback(String name, uint64_t callbackID)
Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (190811 => 190812)
--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-10-09 18:41:12 UTC (rev 190811)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-10-09 19:53:56 UTC (rev 190812)
@@ -2857,12 +2857,12 @@
m_volatilityTimer.startRepeating(std::chrono::milliseconds(200));
}
-void WebPage::applicationWillEnterForeground(bool isSuspendedUnderLock)
+void WebPage::applicationWillEnterForeground()
{
m_volatilityTimer.stop();
setLayerTreeStateIsFrozen(false);
- [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}];
+ [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil];
}
void WebPage::applicationDidBecomeActive()