Break floats inside self-collapsing blocks correctly.

Even if the BFC block-offset is unknown when finishing layout of a block
(this can happen if the block is self-collapsing), we still need to
FinalizeForFragmentation(), in order to detect any breaks inside child
floats, so that the break gets propagated correctly. If the initial
optimistic BFC block-offset guess was correct, we won't lay out again
with a forced block-offset identical to the optimistic one. So this is
our only chance.

Just use the "expected" block-offset if there's no BFC block-offset set.

Among the new tests, only float-in-self-collapsing-block-000.html were
failing without this, but I also added another test to verify that we
don't get stuck with an incorrect optimistic guess.

Bug: 1238508
Change-Id: Id70a4fc9a897ade0801dc1993742d2ba14209ad5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3087457
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#910990}
diff --git a/css/css-break/float-in-self-collapsing-block-000.html b/css/css-break/float-in-self-collapsing-block-000.html
new file mode 100644
index 0000000..e42d941
--- /dev/null
+++ b/css/css-break/float-in-self-collapsing-block-000.html
@@ -0,0 +1,13 @@
+<!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/#parallel-flows">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1238508">
+<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="columns:2; column-fill:auto; column-gap:0; width:100px; height:100px; background:red;">
+  <div style="height:50px; background:green;"></div>
+  <div>
+    <div style="float:left; width:100%; height:100px; background:green;"></div>
+  </div>
+  <div style="clear:both; height:50px; background:green;"></div>
+</div>
diff --git a/css/css-break/float-in-self-collapsing-block-001.html b/css/css-break/float-in-self-collapsing-block-001.html
new file mode 100644
index 0000000..835a5be
--- /dev/null
+++ b/css/css-break/float-in-self-collapsing-block-001.html
@@ -0,0 +1,14 @@
+<!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/#parallel-flows">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1238508">
+<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="columns:2; column-fill:auto; column-gap:0; width:100px; height:100px; background:red;">
+  <div style="height:50px; background:green;"></div>
+  <div>
+    <div style="float:left; margin-top:-10px; width:100%; height:100px; background:green;"></div>
+    <div style="margin-top:10px;"></div>
+  </div>
+  <div style="clear:both; height:50px; background:green;"></div>
+</div>