Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix more media control website conflicts in in-window mode
https://bugs.webkit.org/show_bug.cgi?id=274274 rdar://126942381 Reviewed by Jer Noble. Currently on youtube.com, when you drag the media controls in in-window mode, the video plays/pauses. To fix this, if the video is in in-window mode, we now stop the propagation of the click or mousedown events past the media controls <div> element. Additionally, on tv.apple.com, the media controls in in-window mode are unclickable. This is because the website sets the pointer-events css property of the <video> to none. We now set this property to auto !important. Also, the <video> on tv.apple.com does not have the controls attribute, which was causing us to not toggle playback when the video is clicked due to a current requirement that the controls attribute is present. This is fixed now by amending this conditional to check if host.shouldForceControlsDisplay is true. Although this fix makes the in-window controls on tv.apple.com clickable, the behavior is still buggy. This is the new behavior with this fix: If the video is paused when entering in-window mode and playing when exiting to inline, the controls are no longer functional in inline. You must re-enter in-window, pause, then exit to inline, to regain functionality. If the video is playing when entering in-window mode, the in-window controls are not functional. I believe this behavior is due to tv.apple.com keeping their own variable tracking the play/pause state of the video. If this patch lands, I will file a radar tracking this. * Source/WebCore/Modules/modern-media-controls/controls/background-click-delegate-notifier.js: (BackgroundClickDelegateNotifier.prototype.handleEvent): (BackgroundClickDelegateNotifier): * Source/WebCore/Modules/modern-media-controls/media/media-controller.js: (MediaController.prototype.macOSControlsBackgroundWasClicked): * Source/WebCore/css/fullscreen.css: (*|*:not(:root):-internal-in-window-fullscreen): Canonical link: https://commits.webkit.org/279024@main
- Loading branch information