diff --git a/Libraries/LibHTML/Layout/LayoutBlock.cpp b/Libraries/LibHTML/Layout/LayoutBlock.cpp index 734ada9f00..31c1b95f7f 100644 --- a/Libraries/LibHTML/Layout/LayoutBlock.cpp +++ b/Libraries/LibHTML/Layout/LayoutBlock.cpp @@ -202,7 +202,7 @@ void LayoutBlock::render(RenderingContext& context) if (!is_visible()) return; - LayoutNode::render(context); + LayoutBox::render(context); if (children_are_inline()) { for (auto& line_box : m_line_boxes) { diff --git a/Libraries/LibHTML/Layout/LayoutBox.cpp b/Libraries/LibHTML/Layout/LayoutBox.cpp index 0e7d69afc9..54e0b24aad 100644 --- a/Libraries/LibHTML/Layout/LayoutBox.cpp +++ b/Libraries/LibHTML/Layout/LayoutBox.cpp @@ -9,6 +9,9 @@ void LayoutBox::render(RenderingContext& context) { + if (!is_visible()) + return; + #ifdef DRAW_BOXES_AROUND_LAYOUT_NODES context.painter().draw_rect(m_rect, Color::Blue); #endif @@ -60,6 +63,8 @@ void LayoutBox::render(RenderingContext& context) context.painter().draw_line(padded_rect.bottom_left(), padded_rect.top_left(), border_color, border_width); } } + + LayoutNodeWithStyleAndBoxModelMetrics::render(context); } HitTestResult LayoutBox::hit_test(const Point& position) const