Don't repeat table headers where there are no sections.

We make room for repeating table headers while laying out table sections
(by essentially shrinking and offsetting the fragmentainers). Repeated
table headers should not occur in fragmentainers where there are no
sections.

In our engine, border spacing is included in the block size of the table
sections (this is not too great), which means that if it's only the
final border spacing (but no part of the actual final section) that
spills into a next fragmentainer, without this fix, we'd put a repeated
table header in that next fragmentainer as well, overlapping with
whatever content might be there.

Bug: 925683
Change-Id: I15391c75b143259b018efb082bc51bf4eaf5bd7c
Reviewed-on: https://chromium-review.googlesource.com/c/1436028
Commit-Queue: Emil A Eklund <[email protected]>
Reviewed-by: Xianzhu Wang <[email protected]>
Reviewed-by: Emil A Eklund <[email protected]>
Cr-Commit-Position: refs/heads/master@{#627346}
diff --git a/third_party/blink/web_tests/fragmentation/no-repeating-table-header-after-sections-expected.html b/third_party/blink/web_tests/fragmentation/no-repeating-table-header-after-sections-expected.html
new file mode 100644
index 0000000..0acbf012
--- /dev/null
+++ b/third_party/blink/web_tests/fragmentation/no-repeating-table-header-after-sections-expected.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<style>
+  .square { width:30px; height:30px; background:blue; }
+</style>
+<p>There should be 2 squares below, and they should not be overlapping.</p>
+<div class="square" style="float:left; margin-left:20px; margin-right:50px; margin-top:260px;"></div>
+<div class="square" style="float:left; margin-left:35px; margin-top:15px;"></div>