Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 441ea713e1af8f5d048ed66110df6cadcfb5dd55
https://github.com/WebKit/WebKit/commit/441ea713e1af8f5d048ed66110df6cadcfb5dd55
Author: Wenson Hsieh <[email protected]>
Date: 2022-10-27 (Thu, 27 Oct 2022)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
Log Message:
-----------
Refactor some logic for dragging promised images on macOS
https://bugs.webkit.org/show_bug.cgi?id=247158
rdar://101578922
Reviewed by Tim Horton.
* Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
Adjust this method to only attempt to open up sandbox extensions to file paths
that were written
for `NSFilesPromisePboardType`. The only other type that can be returned from
`getPathnamesForType`
is "Apple files promise pasteboard type", whose value is either an extension
(e.g. "png", "jpg") or
a type identifier (e.g. "public.png", "public.jpeg"). In both of these cases,
there's no reason to
check whether there are file paths on disk that correspond to these strings.
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setPromisedDataForImage):
Additionally add a message check for the incoming `extension`, to ensure that
the given file
extension isn't (itself) a file path.
Canonical link: https://commits.webkit.org/256085@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes