Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8cbd42ddce32d874cb5ecf8450ea858c23ddd57f
      
https://github.com/WebKit/WebKit/commit/8cbd42ddce32d874cb5ecf8450ea858c23ddd57f
  Author: Sihui Liu <[email protected]>
  Date:   2025-06-17 (Tue, 17 Jun 2025)

  Changed paths:
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/RemotePageDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemotePageProxy.cpp
    M Source/WebKit/UIProcess/RemotePageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] _doAfterNextPresentationUpdate does not invoke updateBlock
rdar://138875168
https://bugs.webkit.org/show_bug.cgi?id=294312

Reviewed by Alex Christensen.

When site isolation is enabled, the block passed to 
_doAfterNextPresentationUpdate may not be invoked properly, see the
new API test for an example. There are two causes:
1. When WebPageProxy updates DrawingArea, it does not update DrawingArea of 
RemotePageProxy, and UI process does not
notify web processes of RemotePageProxy about the update. Therefore, when UI 
process sends
DrawingArea::DispatchAfterEnsuringDrawing message to those processes, the 
message is dropped since the web processes are
still tracking old DrawingArea identifier. To fix this, this patch updates 
DrawingArea of RemotePageProxy in
WebPageProxy::setDrawingArea.
2. In WebPageProxy::callAfterNextPresentationUpdate, UI process sends messages 
to all web processes that have
RemotePageProxy and wait for them to reply. However, some of them may not reply 
if their rendering is being suspended
(i.e. RemoteLayerTreeDrawingArea::m_isRenderingSuspended is true), which can 
happen if the process does not contain an
active frame. To fix this, this patch updates the function to only send to web 
processes that host frame of the page.

API test: SiteIsolation.DoAfterNextPresentationUpdate

* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/RemotePageDrawingAreaProxy.h:
(WebKit::RemotePageDrawingAreaProxy::identifier const):
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::setDrawingArea):
* Source/WebKit/UIProcess/RemotePageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToProvisionalPage):
(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::webContentProcessesWithFrame):
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, DoAfterNextPresentationUpdate)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to