[webkit-changes] [WebKit/WebKit] d67dec: [iOS] Make some drag and drop logic robust when -[...

Wenson Hsieh noreply at github.com
Tue May 23 17:37:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d67decd789fddac0c8a798613661bfcbd776253e
      https://github.com/WebKit/WebKit/commit/d67decd789fddac0c8a798613661bfcbd776253e
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M Source/WebCore/platform/Logging.h
    M Source/WebCore/platform/ios/WebItemProviderPasteboard.mm

  Log Message:
  -----------
  [iOS] Make some drag and drop logic robust when -[NSURL lastPathComponent] is empty
https://bugs.webkit.org/show_bug.cgi?id=257222
rdar://108039720

Reviewed by Aditya Keerthi.

Try to speculatively fix some reports of drag and drop failing on iOS, due to the provided `NSURL`'s
last path component being equal to the empty string. This patch tries to address this by replacing
`nil` checks for the suggested name with length checks instead (such that we'll replace
`suggestedName` with the fallback value in the case of the empty string).

* Source/WebCore/platform/Logging.h:
* Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:
(linkTemporaryItemProviderFilesToDropStagingDirectory):

Canonical link: https://commits.webkit.org/264447@main




More information about the webkit-changes mailing list