Title: [244441] trunk/Source
- Revision
- 244441
- Author
- [email protected]
- Date
- 2019-04-18 15:26:07 -0700 (Thu, 18 Apr 2019)
Log Message
[iOS] Improve detection of when web views go to background / foreground
https://bugs.webkit.org/show_bug.cgi?id=197035
<rdar://problem/45281182>
Reviewed by Tim Horton.
Source/WebKit:
Improve detection of when web views go to background / foreground on iOS.
* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker): Deleted.
(WebKit::ApplicationStateTracker::~ApplicationStateTracker): Deleted.
(WebKit::ApplicationStateTracker::applicationDidEnterBackground): Deleted.
(WebKit::ApplicationStateTracker::applicationDidFinishSnapshottingAfterEnteringBackground): Deleted.
(WebKit::ApplicationStateTracker::applicationWillEnterForeground): Deleted.
Source/WTF:
Add build time flag.
* wtf/FeatureDefines.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (244440 => 244441)
--- trunk/Source/WTF/ChangeLog 2019-04-18 22:16:54 UTC (rev 244440)
+++ trunk/Source/WTF/ChangeLog 2019-04-18 22:26:07 UTC (rev 244441)
@@ -1,3 +1,15 @@
+2019-04-18 Chris Dumez <[email protected]>
+
+ [iOS] Improve detection of when web views go to background / foreground
+ https://bugs.webkit.org/show_bug.cgi?id=197035
+ <rdar://problem/45281182>
+
+ Reviewed by Tim Horton.
+
+ Add build time flag.
+
+ * wtf/FeatureDefines.h:
+
2019-04-18 Jer Noble <[email protected]>
Add support for parsing FairPlayStreaming PSSH boxes.
Modified: trunk/Source/WTF/wtf/FeatureDefines.h (244440 => 244441)
--- trunk/Source/WTF/wtf/FeatureDefines.h 2019-04-18 22:16:54 UTC (rev 244440)
+++ trunk/Source/WTF/wtf/FeatureDefines.h 2019-04-18 22:26:07 UTC (rev 244441)
@@ -183,6 +183,12 @@
#endif
#endif
+#if !defined(HAVE_UISCENE)
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
+#define HAVE_UISCENE 1
+#endif
+#endif
+
#if !defined(HAVE_AVSTREAMSESSION)
#define HAVE_AVSTREAMSESSION 0
#endif
Modified: trunk/Source/WebKit/ChangeLog (244440 => 244441)
--- trunk/Source/WebKit/ChangeLog 2019-04-18 22:16:54 UTC (rev 244440)
+++ trunk/Source/WebKit/ChangeLog 2019-04-18 22:26:07 UTC (rev 244441)
@@ -1,3 +1,20 @@
+2019-04-18 Chris Dumez <[email protected]>
+
+ [iOS] Improve detection of when web views go to background / foreground
+ https://bugs.webkit.org/show_bug.cgi?id=197035
+ <rdar://problem/45281182>
+
+ Reviewed by Tim Horton.
+
+ Improve detection of when web views go to background / foreground on iOS.
+
+ * UIProcess/ApplicationStateTracker.mm:
+ (WebKit::ApplicationStateTracker::ApplicationStateTracker): Deleted.
+ (WebKit::ApplicationStateTracker::~ApplicationStateTracker): Deleted.
+ (WebKit::ApplicationStateTracker::applicationDidEnterBackground): Deleted.
+ (WebKit::ApplicationStateTracker::applicationDidFinishSnapshottingAfterEnteringBackground): Deleted.
+ (WebKit::ApplicationStateTracker::applicationWillEnterForeground): Deleted.
+
2019-04-18 Jer Noble <[email protected]>
Refactoring: Pull all fullscreen code out of Document and into its own helper class
Modified: trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm (244440 => 244441)
--- trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm 2019-04-18 22:16:54 UTC (rev 244440)
+++ trunk/Source/WebKit/UIProcess/ApplicationStateTracker.mm 2019-04-18 22:26:07 UTC (rev 244441)
@@ -105,11 +105,19 @@
case ApplicationType::Application: {
m_isInBackground = application.applicationState == UIApplicationStateBackground;
+#if HAVE(UISCENE)
+ m_didEnterBackgroundObserver = [notificationCenter addObserverForName:UISceneDidEnterBackgroundNotification object:window.windowScene queue:nil usingBlock:[this](NSNotification *) {
+#else
m_didEnterBackgroundObserver = [notificationCenter addObserverForName:UIApplicationDidEnterBackgroundNotification object:application queue:nil usingBlock:[this](NSNotification *) {
+#endif
applicationDidEnterBackground();
}];
+#if HAVE(UISCENE)
+ m_willEnterForegroundObserver = [notificationCenter addObserverForName:UISceneWillEnterForegroundNotification object:window.windowScene queue:nil usingBlock:[this](NSNotification *) {
+#else
m_willEnterForegroundObserver = [notificationCenter addObserverForName:UIApplicationWillEnterForegroundNotification object:application queue:nil usingBlock:[this](NSNotification *) {
+#endif
applicationWillEnterForeground();
}];
break;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes