Title: [250155] trunk/Source/WebKit
Revision
250155
Author
cdu...@apple.com
Date
2019-09-20 14:40:23 -0700 (Fri, 20 Sep 2019)

Log Message

Add release logging for when a view is added / removed from a window
https://bugs.webkit.org/show_bug.cgi?id=202050

Reviewed by Tim Horton.

Add release logging for when a view is added / removed from a window to help determine the
view's visibility in the logs.

* UIProcess/ios/WKApplicationStateTrackingView.mm:
(-[WKApplicationStateTrackingView willMoveToWindow:]):
(-[WKApplicationStateTrackingView didMoveToWindow]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (250154 => 250155)


--- trunk/Source/WebKit/ChangeLog	2019-09-20 21:37:24 UTC (rev 250154)
+++ trunk/Source/WebKit/ChangeLog	2019-09-20 21:40:23 UTC (rev 250155)
@@ -1,5 +1,19 @@
 2019-09-20  Chris Dumez  <cdu...@apple.com>
 
+        Add release logging for when a view is added / removed from a window
+        https://bugs.webkit.org/show_bug.cgi?id=202050
+
+        Reviewed by Tim Horton.
+
+        Add release logging for when a view is added / removed from a window to help determine the
+        view's visibility in the logs.
+
+        * UIProcess/ios/WKApplicationStateTrackingView.mm:
+        (-[WKApplicationStateTrackingView willMoveToWindow:]):
+        (-[WKApplicationStateTrackingView didMoveToWindow]):
+
+2019-09-20  Chris Dumez  <cdu...@apple.com>
+
         ApplicationStateTracker::m_isBackground initialization does not account for UIScenes
         https://bugs.webkit.org/show_bug.cgi?id=202048
 

Modified: trunk/Source/WebKit/UIProcess/ios/WKApplicationStateTrackingView.mm (250154 => 250155)


--- trunk/Source/WebKit/UIProcess/ios/WKApplicationStateTrackingView.mm	2019-09-20 21:37:24 UTC (rev 250154)
+++ trunk/Source/WebKit/UIProcess/ios/WKApplicationStateTrackingView.mm	2019-09-20 21:40:23 UTC (rev 250155)
@@ -29,6 +29,7 @@
 #if PLATFORM(IOS_FAMILY)
 
 #import "ApplicationStateTracker.h"
+#import "Logging.h"
 #import "WKWebViewInternal.h"
 #import "WebPageProxy.h"
 #import <wtf/RetainPtr.h>
@@ -56,6 +57,8 @@
 
     _lastObservedStateWasBackground = [self isBackground];
 
+    auto page = [_webViewToTrack _page];
+    RELEASE_LOG(ViewState, "%p - WKApplicationStateTrackingView: View with page [%p, pageProxyID: %" PRIu64 "] was removed from a window, _lastObservedStateWasBackground: %d", self, page, page ? page->identifier().toUInt64() : 0, _lastObservedStateWasBackground);
     ASSERT(_applicationStateTracker);
     _applicationStateTracker = nullptr;
 }
@@ -65,6 +68,8 @@
     if (!self._contentView.window || _applicationStateTracker)
         return;
 
+    auto page = [_webViewToTrack _page];
+    RELEASE_LOG(ViewState, "%p - WKApplicationStateTrackingView: View with page [%p, pageProxyID: %" PRIu64 "] was added to a window, _lastObservedStateWasBackground: %d, isNowBackground: %d", self, page, page ? page->identifier().toUInt64() : 0, _lastObservedStateWasBackground, [self isBackground]);
     _applicationStateTracker = makeUnique<WebKit::ApplicationStateTracker>(self, @selector(_applicationDidEnterBackground), @selector(_applicationDidFinishSnapshottingAfterEnteringBackground), @selector(_applicationWillEnterForeground));
     
     if (_lastObservedStateWasBackground && ![self isBackground])
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to