Reuse layout for view's element when it wasn't cached (#4156)
Refs https://github.com/zed-industries/zed/pull/4131 Refs https://github.com/zed-industries/community/issues/2415 Previously, when a view cache miss occurred during paint, we would either use the element produced during layout or create a new, detached node layout node. In both cases, we would issue a call to `draw`. The problem with this approach, however, is that `draw` would always paint the element at the given `bounds.origin`, which was required when the layout node was detached but harmful when the element was already embedded in the layout tree and already knew its bounds. In this second case, in fact, it was as if we were positioning the element "twice", which caused content to jump. Release Notes: - N/A
A
Antonio Scandurra committed
90c2da4dec0f5bdf9a5e2054eac04d68e5380639
Committed by GitHub <noreply@github.com>
on 1/19/2024, 9:44:06 AM