Commit Graph

4 Commits

Author SHA1 Message Date
Jelle Raaijmakers
90a211bf47 LibWeb: Use device-pixel coordinates in display list and AVC
Stop converting between CSS and device pixels as part of rendering - the
display list should be as simple as possible, so convert to DevicePixels
once when constructing the display list.
2026-02-26 07:43:00 +01:00
Aliaksandr Kalenik
af58b00922 LibWeb: Restrict direct access to ScrollFrame's own_offset
Remove the public own_offset() getter from ScrollFrame and the
own_offset_for_frame_with_id() helper from ScrollState. The snapshot
creation in ScrollStateSnapshot now accesses m_own_offset directly
through a friend declaration. This ensures scroll offsets in the
painting pipeline are only read through snapshots.
2026-02-01 16:13:13 +01:00
Aliaksandr Kalenik
d6695d7331 LibWeb: Remove unused cumulative_offset from scroll state tracking
The cumulative_offset was being tracked in ScrollStateSnapshot and
ScrollState but was never actually used. This simplifies the code by
removing cumulative_offset_for_frame_with_id() methods and storing
only own_offset values in ScrollStateSnapshot.
2026-01-23 13:18:39 +01:00
Aliaksandr Kalenik
6507d23e29 LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition
With this change we save a copy of of scroll state at the time of
recording a display list, instead of actual ScrollState pointer that
could be modifed by the main thread while display list is beings
rasterized on the rendering thread, which leads to a frame painted with
inconsistent scroll state.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/4288
2025-04-12 02:55:18 +02:00