diff options
author | Linus Groh <mail@linusgroh.de> | 2020-05-10 23:04:26 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-11 10:48:54 +0200 |
commit | 51707b6c6802b85782817fe9bcc7ea1b7b6ac082 (patch) | |
tree | dd79e911ecf53b577e272db78573ffdf8b933184 /Libraries | |
parent | 29a44bc3256e595013b7b0df17e0409d1ac93733 (diff) | |
download | serenity-51707b6c6802b85782817fe9bcc7ea1b7b6ac082.zip |
LibWeb: Draw the inspected node rect last in LayoutBox::render()
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibWeb/Layout/LayoutBox.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutBox.cpp b/Libraries/LibWeb/Layout/LayoutBox.cpp index e73e4900b6..7ae34fad68 100644 --- a/Libraries/LibWeb/Layout/LayoutBox.cpp +++ b/Libraries/LibWeb/Layout/LayoutBox.cpp @@ -200,9 +200,6 @@ void LayoutBox::render(RenderingContext& context) context.painter().draw_rect(m_rect, Color::Red); #endif - if (node() && document().inspected_node() == node()) - context.painter().draw_rect(enclosing_int_rect(m_rect), Color::Magenta); - Gfx::FloatRect padded_rect; 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()); @@ -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); 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 |