Bug 111025

Summary: Initialize page visibility after creating WebKitTestRunner WebView on Mac
Product: WebKit Reporter: Kiran Muppala <cmuppala>
Component: Tools / TestsAssignee: Kiran Muppala <cmuppala>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, simon.fraser, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.