[webkit-changes] [WebKit/WebKit] 211b6e: Handle `exitFullscreen()` when using Quick Look

Etienne Segonzac noreply at github.com
Thu Mar 7 01:35:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 211b6e10b7238bbe628003074ecf6b15cf0e6b2b
      https://github.com/WebKit/WebKit/commit/211b6e10b7238bbe628003074ecf6b15cf0e6b2b
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2024-03-07 (Thu, 07 Mar 2024)

  Changed paths:
    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/PreviewWindowController.swift
    M Source/WebKit/WebKitSwift/Preview/WKSPreviewWindowController.h

  Log Message:
  -----------
  Handle `exitFullscreen()` when using Quick Look
https://bugs.webkit.org/show_bug.cgi?id=270297
<rdar://120903037>

Reviewed by Andy Estes and Aditya Keerthi.

Use `PreviewApplication` instead or `Preview` in order to get access to
programmatic close. Wire it to the `exitFullscreen` code path.

* Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:
(WebKit::WebFullScreenManagerProxy::imageMIMEType const): Deleted.
(WebKit::WebFullScreenManagerProxy::imageBuffer const): Deleted.
(WebKit::WebFullScreenManagerProxy::isImageElement const):
Hold the image buffer with a `RefPtr` instead of a `std::optional<Ref>`.
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
(WebKit::sharedQuickLookFileQueue):
(WebKit::WebFullScreenManagerProxy::prepareQuickLookImageURL const):
Add a method to generate local URLs instead of passing NSData to the
Preview.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController exitFullScreen]):
Clean-up PreviewWindowController on exit.
(-[WKFullScreenWindowController _performSpatialFullScreenTransition:completionHandler:]):
Switch to a URL-based QLItem.
(-[WKFullScreenWindowController previewWindowControllerDidClose:]):
(-[WKFullScreenWindowController previewWindowControllerDidClose]): Deleted.
Check that the instance closing is the one we care about.
(-[WKFullScreenWindowController provideDataForItem:]): Deleted.
Remove the NSData-based delegate for QLItems.

* Source/WebKit/WebKitSwift/Preview/WKSPreviewWindowController.h:
Pass the WKSPreviewWindowController instance to the delegate.
* Source/WebKit/WebKitSwift/Preview/PreviewWindowController.swift:
(PreviewWindowController.item):
(PreviewWindowController.previewSession):
(PreviewWindowController.presentWindow):
(PreviewWindowController.dismissWindow):
(PreviewWindowController.previewApp): Deleted.
Switch to `PreviewApplication`.
Implement `dismissWindow`.

Canonical link: https://commits.webkit.org/275778@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