Only include table block-start border if we've entered the table box.

If we break before the first table section in a fragmentainer, we aren't
going to enter the table box there. Avoid duplicate block-start border.
We used to paint it both in the fragmentainer where we broke before the
section, AND in the next fragmentainer (the one and only right place).

Bug: 1078927
Change-Id: I28118a143d514fc455d124395b7b5081f4d599f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3672904
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1008934}
diff --git a/css/css-break/table/table-border-005.html b/css/css-break/table/table-border-005.html
new file mode 100644
index 0000000..3f8efe9
--- /dev/null
+++ b/css/css-break/table/table-border-005.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-break-3/#box-splitting">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="width:100px; height:100px; background:red;">
+  <div style="columns:2; gap:0; column-fill:auto; height:150px;">
+    <div style="display:table; border-top:30px solid red; width:100%;">
+      <div style="display:table-caption;">
+        <div style="height:100px; background:green;"></div>
+      </div>
+      <div style="contain:size; height:70px;">
+        <div style="margin-top:-30px; height:100px; background:green;"></div>
+      </div>
+    </div>
+  </div>
+</div>