Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videos in in-window mode should have their WebKitPresentationMode property set to inline #28862

Conversation

danae404
Copy link
Contributor

@danae404 danae404 commented May 21, 2024

ac7aecf

Videos in in-window mode should have their WebKitPresentationMode property set to inline
https://bugs.webkit.org/show_bug.cgi?id=274477
rdar://128482499

Reviewed by Jer Noble.

This fix adds a method HTMLVideoElement::webkitPresentationModeForBindings(). The
default media controls now consult MediaControlsHost::inWindowFullscreen() to
determine that a video is in in-window mode.

* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::inWindowFullscreen const):
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl:
* Source/WebCore/Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get isFullscreen):
(MediaController.prototype._updateControlsIfNeeded):
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitPresentationModeForBindings const):
* Source/WebCore/html/HTMLVideoElement.h:
* Source/WebCore/html/HTMLVideoElement.idl:

Canonical link: https://commits.webkit.org/279143@main

077c1b3

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2 βœ… πŸ§ͺ wincairo-tests
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  wpe-cairo
❌ πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ›  gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2-stress βœ… πŸ§ͺ api-gtk
βœ… πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim

@danae404 danae404 self-assigned this May 21, 2024
@danae404 danae404 added the Media Bugs related to the HTML 5 Media elements. label May 21, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 21, 2024
@danae404 danae404 removed the merging-blocked Applied to prevent a change from being merged label May 21, 2024
@danae404 danae404 force-pushed the eng/videos-in-in-window-mode-should-have-their-WebKitPresentationMode-property-set-to-inline branch from 93f9a7d to 8d0de8a Compare May 21, 2024 19:54
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 21, 2024
@danae404 danae404 removed the merging-blocked Applied to prevent a change from being merged label May 21, 2024
@danae404 danae404 force-pushed the eng/videos-in-in-window-mode-should-have-their-WebKitPresentationMode-property-set-to-inline branch from 8d0de8a to 077c1b3 Compare May 21, 2024 20:24
@danae404 danae404 added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 22, 2024
…perty set to inline

https://bugs.webkit.org/show_bug.cgi?id=274477
rdar://128482499

Reviewed by Jer Noble.

This fix adds a method HTMLVideoElement::webkitPresentationModeForBindings(). The
default media controls now consult MediaControlsHost::inWindowFullscreen() to
determine that a video is in in-window mode.

* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::inWindowFullscreen const):
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl:
* Source/WebCore/Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get isFullscreen):
(MediaController.prototype._updateControlsIfNeeded):
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitPresentationModeForBindings const):
* Source/WebCore/html/HTMLVideoElement.h:
* Source/WebCore/html/HTMLVideoElement.idl:

Canonical link: https://commits.webkit.org/279143@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/videos-in-in-window-mode-should-have-their-WebKitPresentationMode-property-set-to-inline branch from 077c1b3 to ac7aecf Compare May 22, 2024 18:52
@webkit-commit-queue
Copy link
Collaborator

Committed 279143@main (ac7aecf): https://commits.webkit.org/279143@main

Reviewed commits have been landed. Closing PR #28862 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit ac7aecf into WebKit:main May 22, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
5 participants