Bug 258933

Summary: Fullscreen video become blank upon showing image analysis results when WKWebView is laid out using constraints instead of auto resizing masks on Mac.
Product: WebKit Reporter: Ethan Wong <bunnnywong>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eric.carlson, jer.noble, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
Attachments:
Description Flags
A patch to help reproduce this issue, see the description for detailed steps to reproduce
none
Screen recording for this issue none

Description Ethan Wong 2023-07-06 09:18:59 PDT
Created attachment 466951 [details]
A patch to help reproduce this issue, see the description for detailed steps to reproduce

This is an issue we discover while testing our production App.

See the attached screen recording.

Steps to reproduce:

* Apply the attached patch, this changes the WKWebView inside MiniBrowser->WK2BrowserWindowController to use constraints-based layout.

* Build MiniBrowser for Mac and launch it, open an arbitrary website containing `<video>` elements showing any video that contains text. (For example: https://codepen.io/Varo/pen/vLdvMK.)

* Put that video into fullscreen.

* Pause it when there are some text and wait for the image analysis to complete.

* The page would become blank in white below the overlay view of analysis results.

* Minimize the fullscreen window, and put it fullscreen again.

* The fullscreen window would be black. Videos would never be visible on fullscreen until the page is refreshed.
Comment 1 Ethan Wong 2023-07-06 09:20:02 PDT
Created attachment 466952 [details]
Screen recording for this issue
Comment 2 Radar WebKit Bug Importer 2023-07-13 09:19:19 PDT
<rdar://problem/112202783>