-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION (UI-side compositing?): Sporadic failures in layout tests …
…due to wrong test images https://bugs.webkit.org/show_bug.cgi?id=271348 rdar://120050275 Reviewed by Tim Horton. When we take snapshots of layout tests, we wait for a `callAfterNextPresentationUpdate()`, which waits for a transaction to come from the web process. However, it doesn't wait for the subsequent Core Animation commit, which actually pushes changes to WindowServer. Yet the snapshot we do is a WindowServer snapshot (`PlatformWebView::windowSnapshotImage()`), so we can sometimes capture state that is stale. We don't actually know when our new content gets to WindowServer and will show up in a snapshot, but we can reduce the raciness by at least waiting for the Core Animation commit to complete. So add `callAfterNextPresentationUpdateAndLayerCommit()` and use it `WebPageProxy::forceRepaint()`. Also update `-[WKWebView takeSnapshotWithConfiguration:]` to use it. * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]): * Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::callAfterNextPresentationUpdateAndLayerCommit): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::forceRepaint): (WebKit::WebPageProxy::callAfterNextPresentationUpdateAndLayerCommit): * Source/WebKit/UIProcess/WebPageProxy.h: Canonical link: https://commits.webkit.org/276494@main
- Loading branch information
Showing
4 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters