Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: df2046a70dcacbb569831c9fb6d0972942cde482
https://github.com/WebKit/WebKit/commit/df2046a70dcacbb569831c9fb6d0972942cde482
Author: Yoel Hawa <[email protected]>
Date: 2026-02-11 (Wed, 11 Feb 2026)
Changed paths:
M Source/WebCore/platform/graphics/BitmapImage.h
M Source/WebCore/platform/graphics/BitmapImageDescriptor.cpp
M Source/WebCore/platform/graphics/BitmapImageDescriptor.h
M Source/WebCore/platform/graphics/BitmapImageSource.h
M Source/WebCore/platform/graphics/Image.h
M Source/WebCore/platform/graphics/ImageDecoder.h
M Source/WebCore/platform/graphics/ImageSource.h
M Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
M Source/WebCore/platform/graphics/cg/ImageDecoderCG.h
M Source/WebKit/Platform/spi/visionos/QuickLook_SPI_Temp.swiftinterface
M Source/WebKit/Shared/FullScreenMediaDetails.h
M Source/WebKit/Shared/FullScreenMediaDetails.serialization.in
M Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp
M Source/WebKit/UIProcess/WebFullScreenManagerProxy.h
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
M Source/WebKit/WebKitSwift/Preview/WKPreviewWindowController.h
M Source/WebKit/WebKitSwift/Preview/WKPreviewWindowController.swift
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
Log Message:
-----------
[visionOS] Panorama photos fullscreened with QuickLook should launch with
`launchInImmersiveMode` parameter
https://bugs.webkit.org/show_bug.cgi?id=307116
rdar://163077545
Reviewed by Etienne Segonzac.
When fullscreening panoramic images on visionOS, we now wait for responsive
images
to load before deciding whether to defer to QuickLook for fullscreen. This
ensures
that images which appear potentially panoramic due to their aspect ratio but
are too
small to qualify as panoramic can properly pass along the launchInImmersiveMode
parameter to QuickLook after the larger responsive image loads.
The implementation triggers larger responsive image source changes, then waits
up to
1 second for the larger image to load. If the new image qualifies as a true
panorama,
we defer to QuickLook with launchInImmersiveMode set. If it times out or doesn't
qualify, we fall back to regular fullscreen or QuickLook without the immersive
parameter accordingly.
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/BitmapImageDescriptor.cpp:
(WebCore::BitmapImageDescriptor::isPanorama const):
* Source/WebCore/platform/graphics/BitmapImageDescriptor.h:
* Source/WebCore/platform/graphics/BitmapImageSource.h:
* Source/WebCore/platform/graphics/Image.h:
(WebCore::Image::isPanorama const):
* Source/WebCore/platform/graphics/ImageDecoder.h:
(WebCore::ImageDecoder::isPanorama const):
* Source/WebCore/platform/graphics/ImageSource.h:
(WebCore::ImageSource::isPanorama const):
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::isMaybePanoramic const):
(WebCore::ImageDecoderCG::isPanorama const):
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.h:
Added isPanorama() to determine if an image qualifies as panoramic.
* Source/WebKit/Platform/spi/visionos/QuickLook_SPI_Temp.swiftinterface:
Added launchInImmersiveModeKey and launchInImmersiveMode to
PreviewConfiguration.
* Source/WebKit/Shared/FullScreenMediaDetails.h:
* Source/WebKit/Shared/FullScreenMediaDetails.serialization.in:
Added launchInImmersive boolean field.
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:
Store and forward launchInImmersive flag from FullScreenMediaDetails.
(WebKit::WebFullScreenManagerProxy::launchInImmersive const):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController
_enterFullScreen:windowScene:completionHandler:]):
* Source/WebKit/WebKitSwift/Preview/WKPreviewWindowController.h:
* Source/WebKit/WebKitSwift/Preview/WKPreviewWindowController.swift:
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::WebFullScreenManager):
(WebKit::WebFullScreenManager::invalidate):
(WebKit::WebFullScreenManager::enterFullScreenForElement):
(WebKit::WebFullScreenManager::performEnterFullScreen):
(WebKit::WebFullScreenManager::updateImageSource):
(WebKit::WebFullScreenManager::waitForLargerImageLoadTimerFired):
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h:
Added responsive image loading logic. When fullscreening an image that appears
potentially panoramic but is too small to qualify, wait up to 1 second for a
larger
responsive image to load. Added m_waitingForLargerImageLoad and
m_waitForLargerImageLoadTimer to track async image loading. Added
m_pendingWillEnterCallback,
m_pendingDidEnterCallback, m_pendingMode, and m_pendingImageMediaDetails to
store state
for the async callback path. Added performEnterFullScreen() as the common entry
point
for fullscreen after async work completes.
Canonical link: https://commits.webkit.org/307317@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications