mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 21:12:08 +02:00
Replace per-frame heap-allocated RefCounted ScrollFrame objects with a single contiguous Vector<ScrollFrame> inside ScrollState. All frames for a viewport are now stored in one allocation, using type-safe ScrollFrameIndex instead of RefPtr pointers. This reduces allocation churn, improves cache locality, and moves parent-chain traversal (cumulative offset, nearest scrolling ancestor) into ScrollState — similar to how visual context nodes were recently consolidated into AccumulatedVisualContextTree.
23 lines
852 B
Plaintext
23 lines
852 B
Plaintext
Before clip-path change:
|
|
AccumulatedVisualContext Tree:
|
|
[1] scroll_frame_id=1 (PaintableWithLines(BlockContainer<PRE>#out))
|
|
[2] clip_path=[bounds: 8,8 100x100, path: M8 8L108 8L108 108L8 108L8 8Z] (PaintableWithLines(BlockContainer<DIV>#box.box))
|
|
|
|
DisplayList:
|
|
SaveLayer@0
|
|
FillRect@2 rect=[8,8 100x100] color=rgb(173, 216, 230)
|
|
DrawGlyphRun@2 rect=[8,8 30x18] translation=[8,21.796875] color=rgb(0, 0, 0)
|
|
Restore@0
|
|
|
|
After clip-path change:
|
|
AccumulatedVisualContext Tree:
|
|
[1] scroll_frame_id=1 (PaintableWithLines(BlockContainer<PRE>#out))
|
|
[2] clip_path=[bounds: 8,8 100x100, path: M58 8L108 58L58 108L8 58L58 8Z] (PaintableWithLines(BlockContainer<DIV>#box.box))
|
|
|
|
DisplayList:
|
|
SaveLayer@0
|
|
FillRect@2 rect=[8,8 100x100] color=rgb(173, 216, 230)
|
|
DrawGlyphRun@2 rect=[8,8 30x18] translation=[8,21.796875] color=rgb(0, 0, 0)
|
|
Restore@0
|
|
|