Bug 185333

Summary: [iOS] Release page load process assertion if the screen is locked
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ggaren, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 185318    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from webkit-cq-02 for mac-sierra none

Description Chris Dumez 2018-05-04 16:09:46 PDT
We normally take a background process assertion during page loads to allow them to complete even if the tab / app is backgrounded. We should however avoid doing so when the backgrounding is caused by the screen locking. Keeping the process assertion in this case would prevent the whole device from sleeping longer than it should, thus negatively impacting power.
Comment 1 Chris Dumez 2018-05-04 16:35:50 PDT
Created attachment 339611 [details]
Patch
Comment 2 Geoffrey Garen 2018-05-07 14:30:06 PDT
Comment on attachment 339611 [details]
Patch

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

r=me

> Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:683
> +    // We normally delay process suspension when the app is backgrounded until the current page load completes. However,
> +    // we do not want to do so when the screen is locked for power reasons.

FWIW, I think we also consider screen lock to be a strong signal that the user isn't interested in that loaded webpage anymore.

Simple backgrounding can happen just by switching between apps, even in a workflow where you mean to use both apps. So, in that case, we want to avoid failing the load. But screen lock is not a part of any meaningful intentional workflow. It's what you do before you put the device away.
Comment 3 WebKit Commit Bot 2018-05-07 14:57:31 PDT
Comment on attachment 339611 [details]
Patch

Clearing flags on attachment: 339611

Committed r231458: <https://trac.webkit.org/changeset/231458>
Comment 4 WebKit Commit Bot 2018-05-07 14:57:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-05-07 14:58:24 PDT
<rdar://problem/40038038>
Comment 6 Chris Dumez 2018-05-08 11:59:31 PDT
Rolled out in <https://trac.webkit.org/changeset/231498> due to conflict.
Comment 7 WebKit Commit Bot 2018-05-10 15:06:57 PDT
Comment on attachment 339611 [details]
Patch

Rejecting attachment 339611 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 339611, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebKit/ChangeLog contains OOPS!.

Full output: http://webkit-queues.webkit.org/results/7643394
Comment 8 Chris Dumez 2018-05-10 15:10:05 PDT
Created attachment 340136 [details]
Patch
Comment 9 WebKit Commit Bot 2018-05-10 15:42:06 PDT
Comment on attachment 340136 [details]
Patch

Rejecting attachment 340136 [details] from commit-queue.

Number of test failures exceeded the failure limit.
Full output: http://webkit-queues.webkit.org/results/7643639
Comment 10 WebKit Commit Bot 2018-05-10 15:42:08 PDT
Created attachment 340138 [details]
Archive of layout-test-results from webkit-cq-02 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-02  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 11 WebKit Commit Bot 2018-05-10 16:35:37 PDT
Comment on attachment 340136 [details]
Patch

Clearing flags on attachment: 340136

Committed r231676: <https://trac.webkit.org/changeset/231676>
Comment 12 WebKit Commit Bot 2018-05-10 16:35:39 PDT
All reviewed patches have been landed.  Closing bug.