Bug 61215 - Default min DOM Timer interval is not set soon enough for first page to pick it up in WK2
Summary: Default min DOM Timer interval is not set soon enough for first page to pick ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matthew Delaney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 14:00 PDT by Matthew Delaney
Modified: 2011-05-20 14:40 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2011-05-20 14:02 PDT, Matthew Delaney
no flags Details | Formatted Diff | Diff
Patch (1.60 KB, patch)
2011-05-20 14:07 PDT, Matthew Delaney
sfalken: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Delaney 2011-05-20 14:00:24 PDT
The min DOM timer interval is set just after the first page is created. When pages are created, they use the currently set timer interval. Thus, we should be setting the min DOM timer interval sooner - ideally, just before page creation.

As a follow up, this DOM timer setting code could be cleaned up better very soon since it appears that all (or at least most) of the ports are now agreeing upon default values. I've filed this bug for that followup cleanup: https://bugs.webkit.org/show_bug.cgi?id=61214
Comment 1 Matthew Delaney 2011-05-20 14:02:26 PDT
Created attachment 94267 [details]
Patch
Comment 2 Darin Adler 2011-05-20 14:04:44 PDT
Comment on attachment 94267 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:210
> +    Settings::setDefaultMinDOMTimerInterval(0.004);

Moving this early seems good, but it’s a bit strange to tuck this in between setting up the page clients and calling new Page, since the pageClients structure is really just an argument to the Page constructor. I suggest calling this even before the definition of the pageClients local variable, right after the assert.
Comment 3 Matthew Delaney 2011-05-20 14:07:25 PDT
Created attachment 94268 [details]
Patch
Comment 4 Matthew Delaney 2011-05-20 14:40:42 PDT
Committed r86985: <http://trac.webkit.org/changeset/86985>