mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
LibHTML: Fix missing backgrounds an borders after LayoutBox refactoring
The render() implementation in both LayoutBlock and LayoutBox need to be calling the immediate parent class. :^)
This commit is contained in:
parent
4814253589
commit
110b2d52f2
2 changed files with 6 additions and 1 deletions
|
@ -202,7 +202,7 @@ void LayoutBlock::render(RenderingContext& context)
|
||||||
if (!is_visible())
|
if (!is_visible())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LayoutNode::render(context);
|
LayoutBox::render(context);
|
||||||
|
|
||||||
if (children_are_inline()) {
|
if (children_are_inline()) {
|
||||||
for (auto& line_box : m_line_boxes) {
|
for (auto& line_box : m_line_boxes) {
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
|
|
||||||
void LayoutBox::render(RenderingContext& context)
|
void LayoutBox::render(RenderingContext& context)
|
||||||
{
|
{
|
||||||
|
if (!is_visible())
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef DRAW_BOXES_AROUND_LAYOUT_NODES
|
#ifdef DRAW_BOXES_AROUND_LAYOUT_NODES
|
||||||
context.painter().draw_rect(m_rect, Color::Blue);
|
context.painter().draw_rect(m_rect, Color::Blue);
|
||||||
#endif
|
#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);
|
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
|
HitTestResult LayoutBox::hit_test(const Point& position) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue