[webkit-changes] [WebKit/WebKit] 2a045b: Fix more media control website conflicts in in-win...

Dana Estra noreply at github.com
Mon May 20 16:48:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2a045b512e469a314414021f7de6122db168ff11
      https://github.com/WebKit/WebKit/commit/2a045b512e469a314414021f7de6122db168ff11
  Author: Dana Estra <destra at apple.com>
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
    M Source/WebCore/Modules/modern-media-controls/media/media-controller.js
    M Source/WebCore/css/fullscreen.css

  Log Message:
  -----------
  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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list