Bug 111116

Summary: Disable window occlusion detection for WebKitTestRunner Web View on Mac
Product: WebKit Reporter: Kiran Muppala <cmuppala>
Component: Tools / TestsAssignee: Kiran Muppala <cmuppala>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 111107    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Kiran Muppala 2013-02-28 14:45:56 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

This issue was initially fixed by just setting the page visibility to "visible" after creating the WebView in https://bugs.webkit.org/show_bug.cgi?id=111025.  But, it is not very robust, since the view still thinks it is invisible and this might cause other tests to fail.  Hence, using the private API being added by https://bugs.webkit.org/show_bug.cgi?id=111107, to disable window occlusion detection entirely for the WebKitTestRunner's web view is a better solution.
Comment 1 Kiran Muppala 2013-02-28 14:46:33 PST
<rdar://problem/13305561>
Comment 2 Kiran Muppala 2013-02-28 18:23:33 PST
Created attachment 190862 [details]
Patch
Comment 3 Simon Fraser (smfr) 2013-02-28 19:01:38 PST
Comment on attachment 190862 [details]
Patch

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

> Tools/ChangeLog:11
> +        Window occlusion notifications on Mac cause the WebKitTestRunner's
> +        Web View to be treated as invisible and this automatically enables
> +        JavaScript timer throttling, causing some layout tests exercising
> +        JavaScript timers to fail.  Hence, disable window occlusion detection.

This doesn't seem to match the patch (yes, I know it's a follow-up but should not be copied from the other bug).
Comment 4 Kiran Muppala 2013-02-28 19:17:07 PST
Created attachment 190869 [details]
Patch
Comment 5 Kiran Muppala 2013-02-28 19:18:56 PST
(In reply to comment #3)
> (From update of attachment 190862 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=190862&action=review
> 
> > Tools/ChangeLog:11
> > +        Window occlusion notifications on Mac cause the WebKitTestRunner's
> > +        Web View to be treated as invisible and this automatically enables
> > +        JavaScript timer throttling, causing some layout tests exercising
> > +        JavaScript timers to fail.  Hence, disable window occlusion detection.
> 
> This doesn't seem to match the patch (yes, I know it's a follow-up but should not be copied from the other bug).

You're right, I wrote the change log as if I was fixing the tests, while they have already been fixed.  Corrected the ChangeLog.
Comment 6 WebKit Review Bot 2013-02-28 21:48:18 PST
Comment on attachment 190869 [details]
Patch

Clearing flags on attachment: 190869

Committed r144415: <http://trac.webkit.org/changeset/144415>
Comment 7 WebKit Review Bot 2013-02-28 21:48:21 PST
All reviewed patches have been landed.  Closing bug.