Created attachment 461737 [details] Video showing the bug Distilled Reproduction Case: https://codepen.io/patrick-mcdougle/pen/QWmYMNz
Thank you for the report and the clear reproduction. I can reproduce the bug.
My attempt to build a testcase without using React does not reproduce the bug.
Created attachment 461742 [details] Non-working reduction
A colleague of mine created a non-react repro case...I'm working on getting it from him. Might have to wait until Monday.
I was able to reproduce this with vanilla JS https://replit.com/@kshncodes/fixed-sticky-repaint-bug#index.html
Created attachment 461745 [details] Working reduction I've attached a working reduction of the issue with vanilla js
We're computing a bad repaint rect, because the layoutDelta is moving the rect to a negative Y offset: (lldb) p view().frameView().layoutContext().layoutDelta() (WebCore::LayoutSize) $0 = { width = 0px (0), height = -57.6875px (-3692) } (lldb) p dirtyRect (WebCore::LayoutRect) $1 = { x = 0px (0), y = -47.6875px (-3052), width = 192px (12288), height = 28px (1792) }
<rdar://problem/99201177>