Bug 128677

Summary: Clean up PageThrottler interface
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: WebCore Misc.Assignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, esprehn+autocc, glenn, gyuyoung.kim, japhet, jer.noble, philipj, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix benjamin: review+

Description Gavin Barraclough 2014-02-12 11:16:11 PST
Currently, responsibility for throttling DOM timers & suspending animations is split between the Page & the PageThrottler. Clarify by making Page responsible for suspending animations (PageThrottler is now purely related to aspects of timer throttling), and move all timer throttling policy to the PageThrottler, with a single function on Page to enable (Page::setTimerThrottlingEnabled).

Also, transmit the full ViewState to the PageThrottler (not just the IsVisuallyIdle flag), and distinguish between media & page-load activity.
Comment 1 Gavin Barraclough 2014-02-12 11:53:20 PST
Created attachment 223989 [details]
Fix
Comment 2 WebKit Commit Bot 2014-02-12 11:55:52 PST
Attachment 223989 [details] did not pass style-queue:


ERROR: Source/WebCore/page/PageThrottler.h:46:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gavin Barraclough 2014-02-12 13:51:33 PST
Transmitting file data ..........
Committed revision 163983.