diff --git a/Tests/LibWeb/Ref/manifest.json b/Tests/LibWeb/Ref/manifest.json
index c65328cdf0..3a999f9edc 100644
--- a/Tests/LibWeb/Ref/manifest.json
+++ b/Tests/LibWeb/Ref/manifest.json
@@ -1,3 +1,4 @@
{
- "square-flex.html": "square-ref.html"
+ "square-flex.html": "square-ref.html",
+ "separate-borders-inline-table.html": "separate-borders-ref.html"
}
diff --git a/Tests/LibWeb/Ref/separate-borders-inline-table.html b/Tests/LibWeb/Ref/separate-borders-inline-table.html
new file mode 100644
index 0000000000..74cdd66ec3
--- /dev/null
+++ b/Tests/LibWeb/Ref/separate-borders-inline-table.html
@@ -0,0 +1,17 @@
+
+
diff --git a/Tests/LibWeb/Ref/separate-borders-ref.html b/Tests/LibWeb/Ref/separate-borders-ref.html
new file mode 100644
index 0000000000..717f118bd1
--- /dev/null
+++ b/Tests/LibWeb/Ref/separate-borders-ref.html
@@ -0,0 +1,16 @@
+
+
diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
index eb4270991b..c0667ff52a 100644
--- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
+++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
@@ -136,6 +136,8 @@ void StackingContext::paint_descendants(PaintContext& context, Layout::Node cons
if (child_is_inline_or_replaced) {
paint_node(child, context, PaintPhase::Background);
paint_node(child, context, PaintPhase::Border);
+ if (child.display().is_table_inside() && child.computed_values().border_collapse() == CSS::BorderCollapse::Separate)
+ paint_table_borders(context, child);
paint_descendants(context, child, StackingContextPaintPhase::BackgroundAndBorders);
}
paint_descendants(context, child, phase);