1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

LibWeb: Split PaintContext::viewport_rect() into device/css variants

For now, everyone uses `device_viewport_rect()`, until I convert them.
This commit is contained in:
Sam Atkins 2022-10-27 14:37:05 +01:00 committed by Linus Groh
parent 0be479dcfb
commit 4440af0870
8 changed files with 24 additions and 13 deletions

View file

@ -50,7 +50,7 @@ void InitialContainingBlock::paint_all_phases(PaintContext& context)
{
build_stacking_context_tree_if_needed();
context.painter().fill_rect(enclosing_int_rect(paint_box()->absolute_rect()), document().background_color(context.palette()));
context.painter().translate(-context.viewport_rect().location());
context.painter().translate(-context.device_viewport_rect().location().to_type<int>());
paint_box()->stacking_context()->paint(context);
}