[webkit-changes] [WebKit/WebKit] ba6e61: Pass frameID along to grantAccessToCurrentPasteboa...

Commit Queue noreply at github.com
Tue May 7 14:52:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ba6e6127eee18b6141c6dfaca85ee8355934e179
      https://github.com/WebKit/WebKit/commit/ba6e6127eee18b6141c6dfaca85ee8355934e179
  Author: Pascoe <pascoe at apple.com>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  Pass frameID along to grantAccessToCurrentPasteboardData
https://bugs.webkit.org/show_bug.cgi?id=273575
rdar://127383912

Reviewed by Sihui Liu.

We need to start passing along frame info whenever granting access to pasteboard
data because under site isolation, a frame may have a different process than the
main frame. This is nessesary to work towards drag and drop.

This change also gets paste in a site isolated iframe working. We currently change
the process to grant pasteboard only in the no callback executeEditCommand case, as that
is what paste uses and already sends a message to the focused or main frame.

Added API test for paste.

* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::grantAccessToCurrentPasteboardData):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::performDragOperation):
(WebKit::WebPageProxy::willPerformPasteCommand):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _handleDOMPasteRequestWithResult:]):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::willPerformPasteCommand):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::readSelectionFromPasteboard):
(WebKit::WebPageProxy::platformDidSelectItemFromActiveContextMenu):
(WebKit::WebPageProxy::willPerformPasteCommand):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::requestDOMPasteAccess):
(WebKit::WebViewImpl::handleDOMPasteRequestForCategoryWithResult):

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