Bug 192821 - <rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
Summary: <rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-18 11:58 PST by Benjamin Poulain
Modified: 2018-12-21 00:38 PST (History)
9 users (show)

See Also:


Attachments
Patch (7.15 KB, patch)
2018-12-18 12:02 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-sierra (2.97 MB, application/zip)
2018-12-18 12:45 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-sierra (2.04 MB, application/zip)
2018-12-18 13:19 PST, EWS Watchlist
no flags Details
Patch (7.18 KB, patch)
2018-12-18 14:27 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-sierra (2.54 MB, application/zip)
2018-12-18 15:02 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-sierra (1.22 MB, application/zip)
2018-12-18 15:57 PST, EWS Watchlist
no flags Details
Patch (10.29 KB, patch)
2018-12-18 16:44 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.39 MB, application/zip)
2018-12-18 18:38 PST, EWS Watchlist
no flags Details
Patch (10.32 KB, patch)
2018-12-18 20:43 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (10.89 KB, patch)
2018-12-19 16:06 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (12.08 KB, patch)
2018-12-20 16:22 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2018-12-18 11:58:50 PST
<rdar://problem/46194315> macOS: WebKit1 does not handle occlusion changes
Comment 1 Benjamin Poulain 2018-12-18 12:02:31 PST
Created attachment 357595 [details]
Patch
Comment 2 Benjamin Poulain 2018-12-18 12:02:33 PST
<rdar://problem/46194315>
Comment 3 EWS Watchlist 2018-12-18 12:45:11 PST
Comment on attachment 357595 [details]
Patch

Attachment 357595 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10462029

Number of test failures exceeded the failure limit.
Comment 4 EWS Watchlist 2018-12-18 12:45:13 PST
Created attachment 357598 [details]
Archive of layout-test-results from ews101 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 5 EWS Watchlist 2018-12-18 13:18:59 PST
Comment on attachment 357595 [details]
Patch

Attachment 357595 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10462188

Number of test failures exceeded the failure limit.
Comment 6 EWS Watchlist 2018-12-18 13:19:00 PST
Created attachment 357601 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 7 Benjamin Poulain 2018-12-18 14:27:48 PST
Created attachment 357613 [details]
Patch
Comment 8 EWS Watchlist 2018-12-18 15:02:48 PST
Comment on attachment 357613 [details]
Patch

Attachment 357613 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10463796

Number of test failures exceeded the failure limit.
Comment 9 EWS Watchlist 2018-12-18 15:02:49 PST
Created attachment 357619 [details]
Archive of layout-test-results from ews103 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 10 EWS Watchlist 2018-12-18 15:57:07 PST
Comment on attachment 357613 [details]
Patch

Attachment 357613 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10464283

Number of test failures exceeded the failure limit.
Comment 11 EWS Watchlist 2018-12-18 15:57:09 PST
Created attachment 357626 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 12 Benjamin Poulain 2018-12-18 16:44:33 PST
Created attachment 357633 [details]
Patch
Comment 13 EWS Watchlist 2018-12-18 18:38:57 PST
Comment on attachment 357633 [details]
Patch

Attachment 357633 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10466514

New failing tests:
imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html
Comment 14 EWS Watchlist 2018-12-18 18:38:59 PST
Created attachment 357645 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 15 Benjamin Poulain 2018-12-18 20:43:49 PST
Created attachment 357649 [details]
Patch
Comment 16 Benjamin Poulain 2018-12-18 20:45:20 PST
The iOS failure looks like noise. The code is #ifdefed on iOS. I reuploaded to give EWS another chance.

The results looks like DRT is dumping the layout instead of the text version.

Chris, if you can't review this, who reviews WebKit1 patches nowadays? :)
Comment 17 Chris Dumez 2018-12-19 14:39:34 PST
Comment on attachment 357649 [details]
Patch

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

r=me with question.

> Source/WebKitLegacy/mac/WebView/WebViewData.h:214
> +    BOOL windowOcclusionDetectionEnabled;

So we want this off by default? Why?
Comment 18 Benjamin Poulain 2018-12-19 14:59:24 PST
(In reply to Chris Dumez from comment #17)
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=357649&action=review
> 
> r=me with question.
> 
> > Source/WebKitLegacy/mac/WebView/WebViewData.h:214
> > +    BOOL windowOcclusionDetectionEnabled;
> 
> So we want this off by default? Why?

Because I am dumb. I bet I broke the patch when I added DRT support.
Comment 19 Benjamin Poulain 2018-12-19 16:06:30 PST
Created attachment 357746 [details]
Patch
Comment 20 Benjamin Poulain 2018-12-19 16:07:31 PST
> > Source/WebKitLegacy/mac/WebView/WebViewData.h:214
> > +    BOOL windowOcclusionDetectionEnabled;
> 
> So we want this off by default? Why?

Thanks so much for the good review Chris. You saved my ass.

I verified this patch by hand after the DRT changes.
Comment 21 Benjamin Poulain 2018-12-19 17:29:19 PST
Thanks for the review.
Comment 22 WebKit Commit Bot 2018-12-19 17:41:43 PST
Comment on attachment 357746 [details]
Patch

Clearing flags on attachment: 357746

Committed r239417: <https://trac.webkit.org/changeset/239417>
Comment 23 WebKit Commit Bot 2018-12-19 17:41:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 24 Chris Dumez 2018-12-20 08:48:59 PST
I think this might have caused 2 API tests to time out:
Timeout

    TestWebKitAPI.FullscreenZoomInitialFrame.WebKit
    TestWebKitAPI.PageVisibilityStateWithWindowChanges.WebKit
Comment 25 Benjamin Poulain 2018-12-20 09:00:02 PST
(In reply to Chris Dumez from comment #24)
> I think this might have caused 2 API tests to time out:
> Timeout
> 
>     TestWebKitAPI.FullscreenZoomInitialFrame.WebKit
>     TestWebKitAPI.PageVisibilityStateWithWindowChanges.WebKit

Are those not tested by the bots?

I'll have a look today
Comment 26 Chris Dumez 2018-12-20 09:00:39 PST
(In reply to Benjamin Poulain from comment #25)
> (In reply to Chris Dumez from comment #24)
> > I think this might have caused 2 API tests to time out:
> > Timeout
> > 
> >     TestWebKitAPI.FullscreenZoomInitialFrame.WebKit
> >     TestWebKitAPI.PageVisibilityStateWithWindowChanges.WebKit
> 
> Are those not tested by the bots?
> 
> I'll have a look today

No, still no API test ews...
Comment 27 Ryan Haddad 2018-12-20 10:24:19 PST
I'm going to roll this out so that we can get the bots back to green in the meantime.
Comment 28 Ryan Haddad 2018-12-20 10:32:45 PST
Reverted r239417 for reason:

Introduced two API test failures on macOS.

Committed r239453: <https://trac.webkit.org/changeset/239453>
Comment 29 Benjamin Poulain 2018-12-20 16:22:25 PST
Created attachment 357898 [details]
Patch
Comment 30 Benjamin Poulain 2018-12-20 16:23:59 PST
Looks like running tests with occlusion is a big fragile.

The tests appear under other windows and the timing of visibility change become unpredictable.

I disabled occlusion support. I see WebKit2 also needed that in a couple of places :(
Comment 31 Chris Dumez 2018-12-20 16:25:06 PST
Comment on attachment 357898 [details]
Patch

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

> Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm:90
> +    // The tests can be run concurrently. In that case, window can occlude each other and change visibility results.

I thought we did not run API tests concurrently. The Window would likely not be visible on screen though.
Comment 32 Benjamin Poulain 2018-12-20 17:07:09 PST
(In reply to Chris Dumez from comment #31)
> Comment on attachment 357898 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=357898&action=review
> 
> > Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm:90
> > +    // The tests can be run concurrently. In that case, window can occlude each other and change visibility results.
> 
> I thought we did not run API tests concurrently. The Window would likely not
> be visible on screen though.

I assumed we could from:
    --child-processes=CHILD_PROCESSES
                        Number of processes to run in parallel.
Comment 33 WebKit Commit Bot 2018-12-21 00:38:04 PST
Comment on attachment 357898 [details]
Patch

Clearing flags on attachment: 357898

Committed r239496: <https://trac.webkit.org/changeset/239496>
Comment 34 WebKit Commit Bot 2018-12-21 00:38:06 PST
All reviewed patches have been landed.  Closing bug.