Title: [167512] trunk/Source/WebKit2
Revision
167512
Author
aes...@apple.com
Date
2014-04-18 15:48:39 -0700 (Fri, 18 Apr 2014)

Log Message

[iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
https://bugs.webkit.org/show_bug.cgi?id=131860
<rdar://problem/16631282>

Reviewed by Tim Horton.

We were basing our process assertion state on whether or not the
process had a WKContentView in a window, but when displaying a PDF
we've removed the WKContentView from the window. Base this decision
instead on whether or not the WKWebView is in the window.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewInWindow):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (167511 => 167512)


--- trunk/Source/WebKit2/ChangeLog	2014-04-18 22:31:34 UTC (rev 167511)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-18 22:48:39 UTC (rev 167512)
@@ -1,3 +1,21 @@
+2014-04-18  Andy Estes  <aes...@apple.com>
+
+        [iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
+        https://bugs.webkit.org/show_bug.cgi?id=131860
+        <rdar://problem/16631282>
+
+        Reviewed by Tim Horton.
+
+        We were basing our process assertion state on whether or not the
+        process had a WKContentView in a window, but when displaying a PDF
+        we've removed the WKContentView from the window. Base this decision
+        instead on whether or not the WKWebView is in the window.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView didMoveToWindow]):
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::isViewInWindow):
+
 2014-04-18  Anders Carlsson  <ander...@apple.com>
 
         Address a couple of review comments

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (167511 => 167512)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-04-18 22:31:34 UTC (rev 167511)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-04-18 22:48:39 UTC (rev 167512)
@@ -628,6 +628,11 @@
     return false;
 }
 
+- (void)didMoveToWindow
+{
+    _page->viewStateDidChange(WebCore::ViewState::IsInWindow);
+}
+
 #pragma mark - UIScrollViewDelegate
 
 - (BOOL)usesStandardContentView

Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (167511 => 167512)


--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm	2014-04-18 22:31:34 UTC (rev 167511)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm	2014-04-18 22:48:39 UTC (rev 167512)
@@ -127,7 +127,7 @@
 
 bool PageClientImpl::isViewInWindow()
 {
-    return [m_contentView window];
+    return [m_webView window];
 }
 
 void PageClientImpl::processDidExit()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to