Bug 163813 - WebPage should take UserActivity directly for user input
Summary: WebPage should take UserActivity directly for user input
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-21 15:01 PDT by Gavin Barraclough
Modified: 2016-10-21 16:23 PDT (History)
0 users

See Also:


Attachments
Fix (8.59 KB, patch)
2016-10-21 15:05 PDT, Gavin Barraclough
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2016-10-21 15:01:20 PDT
When we receive mouse/keyboard events in a page, we want to prevent AppNap. We currently do so via the PageThrottler. This patch is to just make the WebPage drive the UserActivity directly.

Two reasons to do so: (1) to cleanup & simplify for further refactoring. (2) The current code isn't really achieving the desired effect. The page setting the flag in the throttler to get the activity to be set is now a less effective way of achieving this goal, since the PageActivityState bounces back across to the UI process & then messages back to the WebContent process to take the UserActivity. These extra hops defeat the purpose of making sure the boost from the initial message isn't lost.
Comment 1 Gavin Barraclough 2016-10-21 15:05:57 PDT
Created attachment 292418 [details]
Fix
Comment 2 Gavin Barraclough 2016-10-21 16:23:03 PDT
Committed revision 207699.