mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:57:36 +00:00
LibWeb: Draw the inspected node rect last in LayoutBox::render()
This commit is contained in:
parent
29a44bc325
commit
51707b6c68
1 changed files with 3 additions and 3 deletions
|
@ -200,9 +200,6 @@ void LayoutBox::render(RenderingContext& context)
|
||||||
context.painter().draw_rect(m_rect, Color::Red);
|
context.painter().draw_rect(m_rect, Color::Red);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (node() && document().inspected_node() == node())
|
|
||||||
context.painter().draw_rect(enclosing_int_rect(m_rect), Color::Magenta);
|
|
||||||
|
|
||||||
Gfx::FloatRect padded_rect;
|
Gfx::FloatRect padded_rect;
|
||||||
padded_rect.set_x(x() - box_model().padding().left.to_px());
|
padded_rect.set_x(x() - box_model().padding().left.to_px());
|
||||||
padded_rect.set_width(width() + box_model().padding().left.to_px() + box_model().padding().right.to_px());
|
padded_rect.set_width(width() + box_model().padding().left.to_px() + box_model().padding().right.to_px());
|
||||||
|
@ -236,6 +233,9 @@ void LayoutBox::render(RenderingContext& context)
|
||||||
paint_border(context, Edge::Bottom, bordered_rect, CSS::PropertyID::BorderBottomStyle, CSS::PropertyID::BorderBottomColor, CSS::PropertyID::BorderBottomWidth);
|
paint_border(context, Edge::Bottom, bordered_rect, CSS::PropertyID::BorderBottomStyle, CSS::PropertyID::BorderBottomColor, CSS::PropertyID::BorderBottomWidth);
|
||||||
|
|
||||||
LayoutNodeWithStyleAndBoxModelMetrics::render(context);
|
LayoutNodeWithStyleAndBoxModelMetrics::render(context);
|
||||||
|
|
||||||
|
if (node() && document().inspected_node() == node())
|
||||||
|
context.painter().draw_rect(enclosing_int_rect(m_rect), Color::Magenta);
|
||||||
}
|
}
|
||||||
|
|
||||||
HitTestResult LayoutBox::hit_test(const Gfx::Point& position) const
|
HitTestResult LayoutBox::hit_test(const Gfx::Point& position) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue