Bug 230813

Summary: Toggling display:none on a video element is delayed
Product: WebKit Reporter: Sam Wemyss <samuel.wemyss>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jer.noble, kevin_neal, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Intel)   
OS: macOS 11   
Attachments:
Description Flags
Reduced test case showcasing the issue
none
Video demo of issue
none
Video demo of second issue, repeatedly triggered none

Description Sam Wemyss 2021-09-26 20:02:08 PDT
Created attachment 439303 [details]
Reduced test case showcasing the issue

Safari 15. Though I believe it still occurs on 14 and lower.

Issue:

When toggling display on a parent container of a video there is a visual glitch:

none -> block: The red background will render, then the video will appear. Happens less frequently
block -> none: The video will disappear immediately but the red background will remain for a frame before being removed. This case is much more frequent than the former and can be repeatedly triggered without refreshing.

This can be reproduced in the minimal test case attached.


Expected:
That the video and the red background appear and disappear simultaneously. Same as other browsers.
Comment 1 Sam Wemyss 2021-09-26 20:04:12 PDT
Created attachment 439304 [details]
Video demo of issue

Video demo of both issues occurring. Progress frame by frame to see the visual glitch clearly at both toggle points
Comment 2 Sam Wemyss 2021-09-26 20:04:56 PDT
Created attachment 439305 [details]
Video demo of second issue, repeatedly triggered
Comment 3 Sam Sneddon [:gsnedders] 2021-09-27 01:11:43 PDT
Something compositing related, maybe?
Comment 4 Radar WebKit Bug Importer 2021-09-29 09:22:52 PDT
<rdar://problem/83674133>