Title: [168751] branches/safari-538.34-branch/Source/WebKit2
Diff
Modified: branches/safari-538.34-branch/Source/WebKit2/ChangeLog (168750 => 168751)
--- branches/safari-538.34-branch/Source/WebKit2/ChangeLog 2014-05-13 23:25:34 UTC (rev 168750)
+++ branches/safari-538.34-branch/Source/WebKit2/ChangeLog 2014-05-13 23:30:18 UTC (rev 168751)
@@ -1,5 +1,22 @@
2014-05-13 Lucas Forschler <[email protected]>
+ Merge r168441
+
+ 2014-05-07 Dan Bernstein <[email protected]>
+
+ <rdar://problem/16831276> [iOS] Unparenting a WKWebView that’s loading pauses it
+ https://bugs.webkit.org/show_bug.cgi?id=132659
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/Cocoa/NavigationState.h: Added a member variable.
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::didChangeIsLoading): When transitioning into loading state,
+ acquire a background activity token. When transitioning out of loading state, dispose of
+ the token.
+
+2014-05-13 Lucas Forschler <[email protected]>
+
Merge r168550
2014-05-09 Anders Carlsson <[email protected]>
Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (168750 => 168751)
--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.h 2014-05-13 23:25:34 UTC (rev 168750)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.h 2014-05-13 23:30:18 UTC (rev 168751)
@@ -35,6 +35,7 @@
#import "APILoaderClient.h"
#import "APIPolicyClient.h"
#import "PageLoadState.h"
+#import "ProcessThrottler.h"
#import "WeakObjCPtr.h"
@class WKNavigation;
@@ -159,6 +160,10 @@
bool webViewDidPerformServerRedirectFromURLToURL : 1;
bool webViewDidUpdateHistoryTitleForURL : 1;
} m_historyDelegateMethods;
+
+#if PLATFORM(IOS)
+ std::unique_ptr<ProcessThrottler::BackgroundActivityToken> m_activityToken;
+#endif
};
} // namespace WebKit
Modified: branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (168750 => 168751)
--- branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2014-05-13 23:25:34 UTC (rev 168750)
+++ branches/safari-538.34-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm 2014-05-13 23:30:18 UTC (rev 168751)
@@ -51,6 +51,7 @@
#import "WKWebViewInternal.h"
#import "WebFrameProxy.h"
#import "WebPageProxy.h"
+#import "WebProcessProxy.h"
#import <wtf/NeverDestroyed.h>
#if USE(QUICK_LOOK)
@@ -625,6 +626,13 @@
void NavigationState::didChangeIsLoading()
{
+#if PLATFORM(IOS)
+ if (m_webView->_page->pageLoadState().isLoading())
+ m_activityToken = std::make_unique<ProcessThrottler::BackgroundActivityToken>(m_webView->_page->process().throttler());
+ else
+ m_activityToken = nullptr;
+#endif
+
[m_webView didChangeValueForKey:@"loading"];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes