[tables] Only include border-spacing if we've seen a non-collapsed row.

Previously we'd include border-spacing if we've seen any first row.
This is incorrect, (can can lead to a double spacing) if the first
row(s) are collapsed.

Change-Id: Iaa7b999bfb77a82779b7a1d6d290caf6edbc5e68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3513609
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979813}
diff --git a/css/css-tables/visibility-collapse-border-spacing.html b/css/css-tables/visibility-collapse-border-spacing.html
new file mode 100644
index 0000000..738cea1
--- /dev/null
+++ b/css/css-tables/visibility-collapse-border-spacing.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/">
+<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>
+<table style="width: 100px; border-spacing: 10px; background: red;">
+  <tbody style="outline: solid green 10px;">
+    <tr style="visibility: collapse;">
+      <td style="padding: 0;"></td>
+    </tr>
+    <tr>
+      <td style="padding: 0;"><div style="height: 80px; background: green;"></div></td>
+    </tr>
+  </tbody>
+</table>