LibWeb: Implement position:fixed painting at the stacking context level

This makes everything within the stacking context stick show up in the
correct position.
This commit is contained in:
Andreas Kling 2021-10-14 23:49:15 +02:00
commit 2447b27d97
Notes: sideshowbarker 2024-07-18 02:22:19 +09:00
2 changed files with 5 additions and 4 deletions

View file

@ -24,10 +24,6 @@ void Box::paint(PaintContext& context, PaintPhase phase)
if (!is_visible())
return;
Gfx::PainterStateSaver saver(context.painter());
if (is_fixed_position())
context.painter().translate(context.scroll_offset());
if (phase == PaintPhase::Background) {
paint_background(context);
paint_box_shadow(context);