Bug 210529 - Video elements don't return to the correct position when exiting fullscreen
Summary: Video elements don't return to the correct position when exiting fullscreen
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-14 19:53 PDT by Peng Liu
Modified: 2020-04-15 14:07 PDT (History)
8 users (show)

See Also:


Attachments
Patch (7.67 KB, patch)
2020-04-14 20:14 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].