Summary: | position: sticky element is not always re-painted on DOM update | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | patrick | ||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | bfulgham, malcolmkiano, simon.fraser, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | Safari 15 | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
patrick
2022-08-19 13:42:54 PDT
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) } |