Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 02f6442f3dc239e88c1c75520e4502875d7f9028
https://github.com/WebKit/WebKit/commit/02f6442f3dc239e88c1c75520e4502875d7f9028
Author: Jer Noble <[email protected]>
Date: 2024-04-23 (Tue, 23 Apr 2024)
Changed paths:
R
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt
R
LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js
M Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js
M
Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js
M
Source/WebCore/Modules/modern-media-controls/controls/vision-layout-traits.js
M
Source/WebCore/Modules/modern-media-controls/controls/watchos-layout-traits.js
M Source/WebCore/Modules/modern-media-controls/media/media-controller.js
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.h
Log Message:
-----------
[visionOS] Sometimes native inline controls appear after exiting fullscreen,
conflicting with page-implemented controls
https://bugs.webkit.org/show_bug.cgi?id=273013
rdar://125878487
Reviewed by Andy Estes.
Previously on visionOS, video fullscreen used element fullscreen as an
implementation detail, and so
VisionLayoutTraits.controlsAlwaysAvailable() would return true to force native
controls to be visible in
video fullscreen mode. However with the introduction of WKLinearMediaPlayer,
this is no longer true;
video fullscreen will use LinearMediaKit rather than element fullscreen. So the
constant answer from
LayoutTraits became incorrect.
Rather than hard-code these values per-LayoutTraits subclass, just ask the
HTMLMediaElement, which knows
whether `videoFullscreenRequiresElementFullscreen()` has been set to true.
Refactor things into a new private HTMLMediaElement function
videoUsesElementFullscreen(), which can be
used from many places inside HTMLMediaElement, including
shouldForceControlsDisplay(). This ensures the
controls will be visible when videoUsesElementFullscreen() is enabled, hidden
when linearMediaPlayerEnabled()
is enabled, and always on macOS.
* Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js:
(IOSLayoutTraits.prototype.controlsAlwaysAvailable): Deleted.
* Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:
(LayoutTraits.prototype.controlsAlwaysAvailable): Deleted.
* Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js:
(MacOSLayoutTraits.prototype.controlsAlwaysAvailable): Deleted.
* Source/WebCore/Modules/modern-media-controls/controls/vision-layout-traits.js:
(VisionLayoutTraits.prototype.controlsAlwaysAvailable): Deleted.
*
Source/WebCore/Modules/modern-media-controls/controls/watchos-layout-traits.js:
(WatchOSLayoutTraits.prototype.controlsAlwaysAvailable): Deleted.
* Source/WebCore/Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype._shouldControlsBeAvailable):
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::videoUsesElementFullscreen const):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::shouldForceControlsDisplay const):
(WebCore::HTMLMediaElement::configureMediaControls):
* Source/WebCore/html/HTMLMediaElement.h:
Canonical link: https://commits.webkit.org/277882@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes