summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout/Box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Box.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Layout/Box.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp
index 23b98e3604..79c26947d3 100644
--- a/Userland/Libraries/LibWeb/Layout/Box.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Box.cpp
@@ -60,11 +60,7 @@ void Box::paint(PaintContext& context, PaintPhase phase)
}
if (phase == PaintPhase::Border) {
- auto bordered_rect = this->bordered_rect();
- Painting::paint_border(context, Painting::BorderEdge::Left, bordered_rect, computed_values());
- Painting::paint_border(context, Painting::BorderEdge::Right, bordered_rect, computed_values());
- Painting::paint_border(context, Painting::BorderEdge::Top, bordered_rect, computed_values());
- Painting::paint_border(context, Painting::BorderEdge::Bottom, bordered_rect, computed_values());
+ paint_border(context);
}
if (phase == PaintPhase::Overlay && dom_node() && document().inspected_node() == dom_node()) {
@@ -87,6 +83,15 @@ void Box::paint(PaintContext& context, PaintPhase phase)
}
}
+void Box::paint_border(PaintContext& context)
+{
+ auto bordered_rect = this->bordered_rect();
+ Painting::paint_border(context, Painting::BorderEdge::Left, bordered_rect, computed_values());
+ Painting::paint_border(context, Painting::BorderEdge::Right, bordered_rect, computed_values());
+ Painting::paint_border(context, Painting::BorderEdge::Top, bordered_rect, computed_values());
+ Painting::paint_border(context, Painting::BorderEdge::Bottom, bordered_rect, computed_values());
+}
+
void Box::paint_background_image(
PaintContext& context,
const Gfx::Bitmap& background_image,