浏览代码

LibWeb: Fill page background with the "base" palette color

This fixes an issue where you'd see black (or ghost) pixels when
painting web pages with content smaller than the viewport.
Andreas Kling 3 年之前
父节点
当前提交
ca4276db77
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp

+ 1 - 0
Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp

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