Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5f8ac173285d5ec1550606ddc8383c45966e7f94
      
https://github.com/WebKit/WebKit/commit/5f8ac173285d5ec1550606ddc8383c45966e7f94
  Author: Ruthvik Konda <[email protected]>
  Date:   2025-10-31 (Fri, 31 Oct 2025)

  Changed paths:
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeCommitBundle.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h
    M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentView.h
    M Source/WebKit/UIProcess/ios/WKContentView.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.h
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm

  Log Message:
  -----------
  Migrate more RemoteLayerTreeTransaction members from transaction scope to 
main frame scope
https://bugs.webkit.org/show_bug.cgi?id=301305
rdar://163225069

Reviewed by Matt Woodrow.

Right now RemoteLayerTreeDrawingAreaProxy::commitLayerTree currently receives a 
Vector<std::pair<RemoteLayerTreeTransaction,
RemoteScrollingCoordinatorTransaction>>, one pair per root frame. However, some 
aspects of the transaction are
scoped to the root frame. Some are scoped to the page. And some are scoped to 
the main frame. We want to accordingly
introduce some separation/organization here to reduce duplication and 
unnecessary isMainFrameProcessTransaction() checks.

This PR builds on https://github.com/WebKit/WebKit/pull/52671. In this PR, we 
move more relevant members from transaction
scope to main frame scope and page scope. They get accordingly removed from the 
isMainFrameProcessTransaction() checks
on UIProcess side and handled separately. Additionally, we introduce a new 
PageData struct and add a member to it.

Once we get toward the end of the migration and almost all mainframe/page 
members are moved out of transaction level
code paths, we can introduce more new methods that are only called once for 
processing PageData/MainFrameData
rather than using existing methods that get called for every transaction. But 
for now, we leave most of them as part of
the same methods to reduce breakage.

We also add a MESSAGE_CHECK at the start of commitLayerTree() to verify that 
main frame data is only provided
from the main frame process.

No new functionality is added. This is a simple refactoring. Existing test 
coverage is enough.
As a result, no new tests are added.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeCommitBundle.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::themeColor const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setThemeColor): Deleted.
(WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor const): 
Deleted.
(WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor): Deleted.
(WebKit::RemoteLayerTreeTransaction::sampledPageTopColor const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setSampledPageTopColor): Deleted.
(WebKit::RemoteLayerTreeTransaction::pageScalingLayerID const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setPageScalingLayerID): Deleted.
(WebKit::RemoteLayerTreeTransaction::scrolledContentsLayerID const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setScrolledContentsLayerID): Deleted.
(WebKit::RemoteLayerTreeTransaction::mainFrameClipLayerID const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setMainFrameClipLayerID): Deleted.
(WebKit::RemoteLayerTreeTransaction::isInStableState const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setIsInStableState): Deleted.
(WebKit::RemoteLayerTreeTransaction::callbackIDs const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setCallbackIDs): Deleted.
(WebKit::RemoteLayerTreeTransaction::newlyReachedPaintingMilestones const): 
Deleted.
(WebKit::RemoteLayerTreeTransaction::setNewlyReachedPaintingMilestones): 
Deleted.
(WebKit::RemoteLayerTreeTransaction::hasEditorState const): Deleted.
(WebKit::RemoteLayerTreeTransaction::editorState const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setEditorState): Deleted.
(WebKit::RemoteLayerTreeTransaction::fixedContainerEdges const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setFixedContainerEdges): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description const):
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _didCommitLayerTree:mainFrameData:]):
(-[WKWebView _didCommitLayerTree:]): Deleted.
* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h:
* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::didCommitLayerTree):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::didCommitMainFrameData):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::didCommitLayerTree):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateBannerLayers):
(WebKit::RemoteLayerTreeHost::updateLayerTree):
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h:
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::didCommitLayerTree):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLayerTree):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didCommitLayerTree):
* Source/WebKit/UIProcess/ios/WKContentView.h:
* Source/WebKit/UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:mainFrameData:]):
(-[WKContentView _didCommitLayerTree:]): Deleted.
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::willCommitLayerTree):
(WebKit::WebPage::willCommitMainFrameData):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
(WebKit::RemoteLayerTreeDrawingArea::willCommitLayerTree):
* 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateRendering):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.h:
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaMac::willCommitLayerTree):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to