Bug 111025 - Initialize page visibility after creating WebKitTestRunner WebView on Mac
Summary: Initialize page visibility after creating WebKitTestRunner WebView on Mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kiran Muppala
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-02-27 17:26 PST by Kiran Muppala
Modified: 2013-02-27 22:53 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.55 KB, patch)
2013-02-27 17:47 PST, Kiran Muppala
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kiran Muppala 2013-02-27 17:26:06 PST
Window Occlusion Notifications on Mac mark the WebKitTestRunner's WebView as not visible as soon as created.  On Mac this enables JavaScript timer throttling and hence causes the following layouts tests to fail.

fast/dom/timer-increase-min-interval-and-reset-part-2.html
fast/dom/timer-increase-then-decrease-min-interval-repeating.html
fast/dom/timer-increase-then-decrease-min-interval.html	
fast/dom/timer-throttling-hidden-page.html

So, to avoid issues due to the page being marked as hidden, WebKitTestRunner should initialize the page visibility to "visible" after creating the WebView.
Comment 1 Kiran Muppala 2013-02-27 17:26:26 PST
<rdar://problem/13305561>
Comment 2 Kiran Muppala 2013-02-27 17:31:20 PST
https://bugs.webkit.org/show_bug.cgi?id=107494
Comment 3 Kiran Muppala 2013-02-27 17:32:35 PST
(In reply to comment #2)
> https://bugs.webkit.org/show_bug.cgi?id=107494

Link to bug which added window occlusion notifications.
Comment 4 Kiran Muppala 2013-02-27 17:47:25 PST
Created attachment 190628 [details]
Patch
Comment 5 Simon Fraser (smfr) 2013-02-27 19:36:35 PST
Comment on attachment 190628 [details]
Patch

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

Does DRT also need fixing?

> Tools/WebKitTestRunner/TestController.cpp:487
> +    setVisibilityState(kWKPageVisibilityStateVisible, true);

Hard to know what the 'true' means reading this.
Comment 6 WebKit Review Bot 2013-02-27 19:53:37 PST
Comment on attachment 190628 [details]
Patch

Clearing flags on attachment: 190628

Committed r144259: <http://trac.webkit.org/changeset/144259>
Comment 7 WebKit Review Bot 2013-02-27 19:53:40 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Kiran Muppala 2013-02-27 22:53:15 PST
(In reply to comment #5)
> (From update of attachment 190628 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=190628&action=review
> 
> Does DRT also need fixing?
> 
Not currently because window occlusion notifications are only available in WebKit2.

> > Tools/WebKitTestRunner/TestController.cpp:487
> > +    setVisibilityState(kWKPageVisibilityStateVisible, true);
> 
> Hard to know what the 'true' means reading this.

I considered adding a inline comment /*isInitialState*/, but then in a previous WebKit2 patch that style was frowned upon.  I can find several such instances of inline comment in WebCore but just one in WebKit2.  So, I left it out.