LibWeb: Fill the whole viewport with the correct background color

CSS2 tells us to use the HTML element's background color if not
transparent. Otherwise, the BODY element's background color.
This commit is contained in:
Andreas Kling 2022-03-23 17:36:25 +01:00
commit e0c7727934
Notes: sideshowbarker 2024-07-17 16:51:58 +09:00
2 changed files with 16 additions and 13 deletions

View file

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