[webkit-changes] [WebKit/WebKit] 1b8516: [macOS] Safari occasionally hangs when right click...

Aditya Keerthi noreply at github.com
Fri May 12 14:14:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b8516049c4998a8f926a2a73e2b60fbdaea8002
      https://github.com/WebKit/WebKit/commit/1b8516049c4998a8f926a2a73e2b60fbdaea8002
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2023-05-12 (Fri, 12 May 2023)

  Changed paths:
    M Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm

  Log Message:
  -----------
  [macOS] Safari occasionally hangs when right clicking an image
https://bugs.webkit.org/show_bug.cgi?id=256720
rdar://108912950

Reviewed by Wenson Hsieh.

WebKit performs QR code detection on behalf of Safari when right clicking an
image. `-[VNImageRequestHandler performRequests:error:]` is used to perform
detection. While each request has a completion handler, the call to perform
requests is actually synchronous. Since context menu presentation is already
asynchronous, WebKit can and should perform detection on a background thread to
avoid hangs.

Covered by existing API tests in ContextMenuTests.

* Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm:
(WebKit::requestPayloadForQRCode):

Perform QR code detection on a `WorkQueue`.

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




More information about the webkit-changes mailing list