[Webkit-unassigned] [Bug 246048] Incorrect scroll position reported
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 4 20:26:21 PST 2024
https://bugs.webkit.org/show_bug.cgi?id=246048
--- Comment #6 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
There are a number of data races that cause the web process scroll position to be stale relative to the UI process.
In the following, {} represents some asynchronous behavior, and newlines represent thread or process hop.
A page render is triggered via :
CADisplayLink -> RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay ->
IPC -> RemoteLayerTreeDrawingArea::displayDidRefresh -> { zero delay timer } -> Page::updateRendering()
A scroll update getting to the web process goes via:
UIScrollView -> { Core Animation pre-commit hook } -> -[WKContentView didUpdateVisibleRect:] ->
IPC -> ViewUpdateDispatcher work queue ->
-> ViewUpdateDispatcher::visibleContentRectUpdate
There are two main races here. The RemoteLayerTreeDrawingArea::displayDidRefresh message may reach the web process before the ViewUpdateDispatcher::visibleContentRectUpdate, and the ViewUpdateDispatcher work queue can delay the visibleContentRectUpdate getting to the main thread.
For everything to work correctly, the new scroll position from UIScrollView needs to get into a visibleContentRectUpdate before Page::updateRendering() runs. That rarely happens.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241105/e8e904d9/attachment.htm>
More information about the webkit-unassigned
mailing list