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.
Created attachment 339611 [details] Patch
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 on attachment 339611 [details] Patch Clearing flags on attachment: 339611 Committed r231458: <https://trac.webkit.org/changeset/231458>
All reviewed patches have been landed. Closing bug.
<rdar://problem/40038038>
Rolled out in <https://trac.webkit.org/changeset/231498> due to conflict.
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
Created attachment 340136 [details] Patch
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
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 on attachment 340136 [details] Patch Clearing flags on attachment: 340136 Committed r231676: <https://trac.webkit.org/changeset/231676>