[webkit-changes] [WebKit/WebKit] 7f87b7: REGRESSION (274816 at main): [visionOS] Fullscreen wi...
Aditya Keerthi
noreply at github.com
Wed Mar 13 18:13:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7f87b7bf71aefae08144aa6948d677afe9a366cd
https://github.com/WebKit/WebKit/commit/7f87b7bf71aefae08144aa6948d677afe9a366cd
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-03-13 (Wed, 13 Mar 2024)
Changed paths:
M Source/WebKit/Shared/FullScreenMediaDetails.h
M Source/WebKit/Shared/FullScreenMediaDetails.serialization.in
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
Log Message:
-----------
REGRESSION (274816 at main): [visionOS] Fullscreen window size does not always match the video's aspect ratio
https://bugs.webkit.org/show_bug.cgi?id=270897
rdar://124506779
Reviewed by Abrar Rahman Protyasha.
Fullscreen video on visionOS is intended to be presented at the aspect ratio of
the video element. In cases where the video element is not actually the fullscreen
element, the "main" video element is used, as determined by the heuristic in
`WebFullScreenManager::updateMainVideoElement`. If a "main" video element exists,
it's size is sent to the UI process for appropriate window sizing.
To add a distinct path for image fullscreen on visionOS, 274816 at main refactored
fullscreen presentation logic to specify media type (image/video) and video size
in a single struct. However, in this refactoring, the logic for size determination
was additionally gated on whether or not the fullscreen element was a video element,
and not simply the existence of a "main" video element.
Fix by splitting up the "video element is fullscreen" and "the fullscreen element
contains a prominent video" cases by introducing a new `FullScreenMediaDetails::Type`,
ensuring the size is sent over in both cases. The distinction between the two
cases is necessary, as `FullScreenMediaDetails::Type::Video` is used further down
the line, to determine whether native, UI-process side controls should be shown.
* Source/WebKit/Shared/FullScreenMediaDetails.h:
* Source/WebKit/Shared/FullScreenMediaDetails.serialization.in:
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::enterFullScreenForElement):
Do not check `is<HTMLVideoElement>(element)` prior to populating the details,
as the size should always be specified if there is a "main" video element.
Canonical link: https://commits.webkit.org/276059@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