Bug 207341 - [WK2][iOS] Add WKWebviewConfiguration SPI to run client navigations at foreground priority, even if the view is background
Summary: [WK2][iOS] Add WKWebviewConfiguration SPI to run client navigations at foregr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-06 10:23 PST by Chris Dumez
Modified: 2020-03-30 13:17 PDT (History)
7 users (show)

See Also:


Attachments
Patch (17.92 KB, patch)
2020-02-06 12:35 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (19.20 KB, patch)
2020-02-06 15:01 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-02-06 10:23:11 PST
Add WKWebviewConfiguration SPI to run client navigations at foreground priority, even if the view is background.
Comment 1 Chris Dumez 2020-02-06 10:23:23 PST
<rdar://problem/59227077>
Comment 2 Chris Dumez 2020-02-06 12:35:58 PST
Created attachment 389981 [details]
Patch
Comment 3 Geoffrey Garen 2020-02-06 14:36:02 PST
Comment on attachment 389981 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389981&action=review

r=me

> Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:153
> +    bool isViewService = WTF::processHasEntitlement("com.apple.UIKit.vends-view-services") && [[m_webView window] _isHostedInAnotherProcess];
> +    if (_UIApplicationIsExtension() || isViewService) {

Might be nicer to use applicationType() here.
Comment 4 Chris Dumez 2020-02-06 14:42:23 PST
(In reply to Geoffrey Garen from comment #3)
> Comment on attachment 389981 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=389981&action=review
> 
> r=me
> 
> > Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:153
> > +    bool isViewService = WTF::processHasEntitlement("com.apple.UIKit.vends-view-services") && [[m_webView window] _isHostedInAnotherProcess];
> > +    if (_UIApplicationIsExtension() || isViewService) {
> 
> Might be nicer to use applicationType() here.

applicationType() is in ApplicationStateTracker.mm, would you like me to move it somewhere else so I can reuse it here?
Comment 5 Chris Dumez 2020-02-06 15:01:11 PST
Created attachment 390009 [details]
Patch
Comment 6 Chris Dumez 2020-02-06 16:44:39 PST
Comment on attachment 390009 [details]
Patch

Clearing flags on attachment: 390009

Committed r255992: <https://trac.webkit.org/changeset/255992>
Comment 7 Chris Dumez 2020-02-06 16:44:41 PST
All reviewed patches have been landed.  Closing bug.