[webkit-changes] [WebKit/WebKit] a7502c: Use sendWithAsyncReply instead of GenericCallback ...

Alex Christensen noreply at github.com
Mon Feb 13 11:07:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7502ce25f0da417f210172536cf1ad4b5d6eac3
      https://github.com/WebKit/WebKit/commit/a7502ce25f0da417f210172536cf1ad4b5d6eac3
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M Source/WebKit/Platform/IPC/Connection.h
    M Source/WebKit/Platform/IPC/HandleMessage.h
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Scripts/webkit/model.py
    M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
    M Source/WebKit/Scripts/webkit/tests/MessageNames.cpp
    M Source/WebKit/Scripts/webkit/tests/MessageNames.h
    M Source/WebKit/Scripts/webkit/tests/TestWithStream.messages.in
    M Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp
    M Source/WebKit/Scripts/webkit/tests/TestWithStreamMessages.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
    M Source/WebKit/UIProcess/API/C/WKPage.cpp
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/mac/WKView.mm
    M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
    M Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
    M Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
    M Source/WebKit/UIProcess/DrawingAreaProxy.h
    M Source/WebKit/UIProcess/DrawingAreaProxy.messages.in
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
    M Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp
    M Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.h
    M Source/WebKit/WebProcess/WebPage/DrawingArea.h
    M Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

  Log Message:
  -----------
  Use sendWithAsyncReply instead of GenericCallback for DrawingArea::DispatchAfterEnsuringDrawing
https://bugs.webkit.org/show_bug.cgi?id=252098
rdar://105305343

Reviewed by Tim Horton.

This will make sending the message to multiple processes with site isolation more elegant.
The error wasn't used for anything accessible by API except in takeSnapshotWithConfiguration
where I kept the same behavior as before.

To keep the same timing, I introduced a new *.messages.in attribute CallWithReplyID
to call the destination function with a IPC::AsyncReplyID instead of a CompletionHandler.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::callbackIDs const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setCallbackIDs): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode const):
(WebKit::RemoteLayerTreeTransaction::decode):
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageCallAfterNextPresentationUpdate):
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]):
* Source/WebKit/UIProcess/API/mac/WKView.mm:
(-[WKView _doAfterNextPresentationUpdate:]):
* Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::takeScreenshot):
* Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::~DrawingMonitor):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::stop):
(WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing):
* Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::dispatchAfterEnsuringDrawing): Deleted.
(WebKit::DrawingAreaProxy::dispatchPresentationCallbacksAfterFlushingLayers): Deleted.
* Source/WebKit/UIProcess/DrawingAreaProxy.messages.in:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
* Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::~TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchPresentationCallbacksAfterFlushingLayers): Deleted.
* Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp:
(WebKit::DrawingAreaProxyWC::dispatchAfterEnsuringDrawing):
* Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.h:
* Source/WebKit/WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::addTransactionCallbackID): Deleted.
* Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::updateRendering):
(WebKit::RemoteLayerTreeDrawingArea::dispatchAfterEnsuringDrawing):
(WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID): Deleted.
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringDrawing):
(WebKit::TiledCoreAnimationDrawingArea::updateRendering):
(WebKit::TiledCoreAnimationDrawingArea::addTransactionCallbackID): Deleted.

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




More information about the webkit-changes mailing list