Title: [247738] branches/safari-608-branch/Source/WebKit
- Revision
- 247738
- Author
- [email protected]
- Date
- 2019-07-23 13:40:56 -0700 (Tue, 23 Jul 2019)
Log Message
Cherry-pick r247658. rdar://problem/53449709
Web Content process gets stuck suspended after navigating away from a system preview
https://bugs.webkit.org/show_bug.cgi?id=199965
<rdar://problem/53109004>
Reviewed by Dean Jackson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isBackground]):
* UIProcess/ios/WKSystemPreviewView.h:
* UIProcess/ios/WKSystemPreviewView.mm:
(-[WKSystemPreviewView web_initWithFrame:webView:mimeType:]):
(-[WKSystemPreviewView web_isBackground]):
Apply the fix from r193481 to WKSystemPreviewView as well, having it
become a WKApplicationStateTrackingView and plumbing that through
to our is-background machinery.
We really, really should instead have WKWebView itself be the application
state tracking view, but that is a bigger change (and has some implications
for full-screen video and whatnot).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (247737 => 247738)
--- branches/safari-608-branch/Source/WebKit/ChangeLog 2019-07-23 20:40:53 UTC (rev 247737)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog 2019-07-23 20:40:56 UTC (rev 247738)
@@ -1,5 +1,54 @@
2019-07-23 Alan Coon <[email protected]>
+ Cherry-pick r247658. rdar://problem/53449709
+
+ Web Content process gets stuck suspended after navigating away from a system preview
+ https://bugs.webkit.org/show_bug.cgi?id=199965
+ <rdar://problem/53109004>
+
+ Reviewed by Dean Jackson.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _isBackground]):
+ * UIProcess/ios/WKSystemPreviewView.h:
+ * UIProcess/ios/WKSystemPreviewView.mm:
+ (-[WKSystemPreviewView web_initWithFrame:webView:mimeType:]):
+ (-[WKSystemPreviewView web_isBackground]):
+ Apply the fix from r193481 to WKSystemPreviewView as well, having it
+ become a WKApplicationStateTrackingView and plumbing that through
+ to our is-background machinery.
+
+ We really, really should instead have WKWebView itself be the application
+ state tracking view, but that is a bigger change (and has some implications
+ for full-screen video and whatnot).
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-07-19 Tim Horton <[email protected]>
+
+ Web Content process gets stuck suspended after navigating away from a system preview
+ https://bugs.webkit.org/show_bug.cgi?id=199965
+ <rdar://problem/53109004>
+
+ Reviewed by Dean Jackson.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _isBackground]):
+ * UIProcess/ios/WKSystemPreviewView.h:
+ * UIProcess/ios/WKSystemPreviewView.mm:
+ (-[WKSystemPreviewView web_initWithFrame:webView:mimeType:]):
+ (-[WKSystemPreviewView web_isBackground]):
+ Apply the fix from r193481 to WKSystemPreviewView as well, having it
+ become a WKApplicationStateTrackingView and plumbing that through
+ to our is-background machinery.
+
+ We really, really should instead have WKWebView itself be the application
+ state tracking view, but that is a bigger change (and has some implications
+ for full-screen video and whatnot).
+
+2019-07-23 Alan Coon <[email protected]>
+
Cherry-pick r247652. rdar://problem/53423997
Add a menu item to toggle between showing and hiding link previews
Modified: branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (247737 => 247738)
--- branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-07-23 20:40:53 UTC (rev 247737)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-07-23 20:40:56 UTC (rev 247738)
@@ -1461,7 +1461,7 @@
- (BOOL)_isBackground
{
- if ([self _isDisplayingPDF])
+ if (![self usesStandardContentView] && [_customContentView respondsToSelector:@selector(web_isBackground)])
return [_customContentView web_isBackground];
return [_contentView isBackground];
}
Modified: branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKSystemPreviewView.h (247737 => 247738)
--- branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKSystemPreviewView.h 2019-07-23 20:40:53 UTC (rev 247737)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKSystemPreviewView.h 2019-07-23 20:40:56 UTC (rev 247738)
@@ -25,12 +25,13 @@
#if USE(SYSTEM_PREVIEW)
+#import "WKApplicationStateTrackingView.h"
#import "WKWebViewContentProvider.h"
#import <QuickLook/QuickLook.h>
#import <UIKit/UIKit.h>
#import <pal/spi/ios/QuickLookSPI.h>
-@interface WKSystemPreviewView : UIView <WKWebViewContentProvider, QLPreviewItemDataProvider>
+@interface WKSystemPreviewView : WKApplicationStateTrackingView <WKWebViewContentProvider, QLPreviewItemDataProvider>
@end
Modified: branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm (247737 => 247738)
--- branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm 2019-07-23 20:40:53 UTC (rev 247737)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm 2019-07-23 20:40:56 UTC (rev 247738)
@@ -69,7 +69,7 @@
- (instancetype)web_initWithFrame:(CGRect)frame webView:(WKWebView *)webView mimeType:(NSString *)mimeType
{
- if (!(self = [super initWithFrame:frame]))
+ if (!(self = [super initWithFrame:frame webView:webView]))
return nil;
UIColor *backgroundColor = [UIColor colorWithRed:(38. / 255) green:(38. / 255) blue:(38. / 255) alpha:1];
@@ -170,6 +170,11 @@
{
}
+- (BOOL)web_isBackground
+{
+ return self.isBackground;
+}
+
#pragma mark Find-in-Page
- (void)web_countStringMatches:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes