summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/HtmlView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibHTML/HtmlView.cpp')
-rw-r--r--Libraries/LibHTML/HtmlView.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Libraries/LibHTML/HtmlView.cpp b/Libraries/LibHTML/HtmlView.cpp
index fe4c97b4ec..89d4cb8df2 100644
--- a/Libraries/LibHTML/HtmlView.cpp
+++ b/Libraries/LibHTML/HtmlView.cpp
@@ -78,13 +78,15 @@ void HtmlView::paint_event(GPaintEvent& event)
painter.add_clip_rect(widget_inner_rect());
painter.add_clip_rect(event.rect());
- painter.fill_rect(event.rect(), background_color());
+ if (!m_layout_root) {
+ painter.fill_rect(event.rect(), background_color());
+ return;
+ }
painter.translate(frame_thickness(), frame_thickness());
painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
- if (!m_layout_root)
- return;
+ painter.fill_rect(rect(), m_document->background_color());
RenderingContext context { painter };
m_layout_root->render(context);