Bug 210529

Summary: Video elements don't return to the correct position when exiting fullscreen
Product: WebKit Reporter: Peng Liu <peng.liu6>
Component: MediaAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, esprehn+autocc, ews-watchlist, jer.noble, kangil.han, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Peng Liu 2020-04-14 19:53:22 PDT
Video elements don't return to the correct position when exiting fullscreen
Comment 1 Peng Liu 2020-04-14 19:54:02 PDT
<rdar://problem/58845689>
Comment 2 Peng Liu 2020-04-14 20:14:28 PDT
Created attachment 396491 [details]
Patch
Comment 3 Jer Noble 2020-04-14 21:14:53 PDT
Comment on attachment 396491 [details]
Patch

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

> Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:780
>              page->setSuppressVisibilityUpdates(false);
> +            page->setNeedsDOMWindowResizeEvent();

Aha! I bet the previous call to `setSuppressVisibilityUpdate(true)` has the unintended side effect of suppressing the "resize" event too! This seems like a fine fix.
Comment 4 Simon Fraser (smfr) 2020-04-15 09:33:29 PDT
Comment on attachment 396491 [details]
Patch

Can we make a layout test?
Comment 5 Jer Noble 2020-04-15 09:35:18 PDT
(In reply to Simon Fraser (smfr) from comment #4)
> Comment on attachment 396491 [details]
> Patch
> 
> Can we make a layout test?

Layout tests never hit this path, because layout tests (purposefully) don't actually hit the NSWindow layer.
Comment 6 Simon Fraser (smfr) 2020-04-15 10:00:02 PDT
API test then?
Comment 7 Peng Liu 2020-04-15 13:53:33 PDT
This bug is tricky to reproduce with a simple test page. Actually it only happens on some specific website. Filed bug 210568 for it.
Comment 8 EWS 2020-04-15 14:07:20 PDT
Committed r260150: <https://trac.webkit.org/changeset/260150>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396491 [details].