-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move off of UIKit SPI:
UIURLDragPreviewView
https://bugs.webkit.org/show_bug.cgi?id=260448 rdar://114165890 Reviewed by Aditya Keerthi and Tim Horton. Replace usages of `UIURLDragPreviewView` in WebKit with `+[UIDragPreview previewForURL:title:]`. * Source/WebKit/Platform/spi/ios/UIKitSPI.h: Remove the (now-unused) SPI declaration and header include. * Source/WebKit/UIProcess/ios/DragDropInteractionState.h: * Source/WebKit/UIProcess/ios/DragDropInteractionState.mm: (WebKit::DragDropInteractionState::stageDragItem): We no longer need to plumb the `center` point into the preview provider block, so we can also remove the `adjustedOrigin` member while we're here. (WebKit::DragDropInteractionState::updatePreviewsForActiveDragSources): Use `+[UIDragPreview previewForURL:title:]` instead of directly creating a `UIURLDragPreviewView`. There is a caveat here, which is that on visionOS (where we need to override the background color of the preview by setting `-backgroundColor` on the preview parameters), we need to first use `+previewForURL:title:` to make UIKit instantiate a `UIURLDragPreviewView`, which we can then use to initialize a `UIDragPreview`. Canonical link: https://commits.webkit.org/267102@main
- Loading branch information
Showing
3 changed files
with
11 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters