Bug 169417

Summary: [WK2] Prevent app nap for the active tab
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, barraclough, commit-queue, ggaren, sam
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2017-03-09 09:36:24 PST
Prevent app nap for the active tab to minimize the risks of breakage.

From the AppNap documentation [1], the app is only a candidate for app nap if it not the foreground app. However, in the Safari case, the foreground app is Safari (UIProcess) and the same policy does not apply to our foreground WebContent process unless we explicitly make it so.

[1] https://developer.apple.com/library/content/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/AppNap.html
Comment 1 Chris Dumez 2017-03-09 09:36:44 PST
<rdar://problem/30876965>
Comment 2 Chris Dumez 2017-03-09 09:39:00 PST
Created attachment 303926 [details]
Patch
Comment 3 Chris Dumez 2017-03-09 10:02:20 PST
<rdar://problem/30318924>
Comment 4 WebKit Commit Bot 2017-03-09 10:54:05 PST
Comment on attachment 303926 [details]
Patch

Clearing flags on attachment: 303926

Committed r213649: <http://trac.webkit.org/changeset/213649>
Comment 5 WebKit Commit Bot 2017-03-09 10:54:11 PST
All reviewed patches have been landed.  Closing bug.