Fix fragment post-layout cloning for multicol.

Fragment post-layout cloning is needed for two things:
1. Rebuilding the fragment tree spine after subtree relayout
2. Recalculating overflow without laying out

Don't store layout results on the flow thread. This was tricky to
maintain and hard to reason about (we'd store fragmentainer children of
the multicol container fragment, but not spanners, OOFs, list item
markers etc.), Besides, we're going to remove the flow thread concept as
soon as we can (which admittedly isn't *that* soon, though), so this
will prepare us for the future. This also means that we should no longer
set up FragmentData entries for the flow thread, so removed that code as
well.

When cloning a fragmentation context root fragment, we'll now also
update the children of its fragmentainers to the post-layout fragments,
since fragmentainers no longer have the concept of "post-layout" (line
boxes don't have that, either, FWIW).

For subtree relayout, all we need to do is making sure that we only
visit NG containing blocks when rebuilding the fragment tree spine (i.e.
skip any flow threads).

For overflow recalculation, we're not making any specific changes in
this CL at all; things will just start working (with at least one
exception, but I'll get back to that in a follow-up), and stop crashing.

The change in OwnerLayoutBox() (to never do anything special) would
trigger a DCHECK failure in OffsetFromOwnerLayoutBox() when hit-testing
(because the owner is the multicol container and |this| is a
fragmentainer), which is why we will now never hit fragmentainers
during hit-testing (and there should be no need for that anyway).
Add an additional DCHECK (and documentation) to
OffsetFromOwnerLayoutBox(), to make it clear that fragmentainers aren't
supported.

NGOutOfFlowLayoutPart::ReplaceFragmentainer() became a bit fancy, but it
was the best I could come up with. This part was easier when we could
just update fragments in the flow thread.

Had to update the unit tests that expected any useful FragmentData from
flow threads.

Bug: 1279078, 1279525
Change-Id: I1d1c8366fe22f75e9a56a8e3f9910671f1ee81bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3378669
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959971}
diff --git a/css/css-break/out-of-flow-in-multicolumn-081.html b/css/css-break/out-of-flow-in-multicolumn-081.html
new file mode 100644
index 0000000..218fa2a
--- /dev/null
+++ b/css/css-break/out-of-flow-in-multicolumn-081.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-position-3/#abspos-breaking">
+<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:5; column-gap:0; column-fill:auto; width:100px; height:100px; background:red;">
+  <div style="columns:2; column-gap:0; column-fill:auto;">
+    <div style="columns:2; column-gap:0; column-fill:auto;">
+      <div style="position:relative;">
+        <div style="position:absolute; width:100%; height:2000px; background:green;"></div>
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/css/css-multicol/change-transform-in-nested.html b/css/css-multicol/change-transform-in-nested.html
new file mode 100644
index 0000000..fd5420b
--- /dev/null
+++ b/css/css-multicol/change-transform-in-nested.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279525">
+<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="overflow:auto; width:500px;">
+  <div style="columns:2; column-gap:0; column-fill:auto; margin-left:-300px; width:400px; height:100px;">
+    <div style="break-after:column; height:1px;"></div>
+    <div style="columns:2; column-gap:0; column-fill:auto; height:200px;">
+      <div style="break-after:column; height:1px;"></div>
+      <div style="width:100px; height:100px; background:red;">
+        <div id="elm" style="transform:translateX(1000px); width:100px; height:100px; background:green;"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<script>
+  document.body.offsetTop;
+  elm.style.transform = "translateX(0)";
+</script>
diff --git a/css/css-multicol/change-transform-in-second-column.html b/css/css-multicol/change-transform-in-second-column.html
new file mode 100644
index 0000000..c627c33
--- /dev/null
+++ b/css/css-multicol/change-transform-in-second-column.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279525">
+<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="overflow:auto; width:500px;">
+  <div style="columns:2; column-gap:0; column-fill:auto; margin-left:-100px; width:200px; height:100px;">
+    <div style="break-after:column; height:1px;"></div>
+    <div style="width:100px; height:100px; background:red;">
+      <div id="elm" style="transform:translateX(1000px); width:100px; height:100px; background:green;"></div>
+    </div>
+  </div>
+</div>
+<script>
+  document.body.offsetTop;
+  elm.style.transform = "translateX(0)";
+</script>
diff --git a/css/css-multicol/change-transform-in-spanner.html b/css/css-multicol/change-transform-in-spanner.html
new file mode 100644
index 0000000..a70a415
--- /dev/null
+++ b/css/css-multicol/change-transform-in-spanner.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279525">
+<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="overflow:auto; width:500px;">
+  <div style="columns:2; column-fill:auto; height:100px;">
+    <div style="width:100px; height:100px; background:red;">
+      <div id="elm" style="transform:translateX(1000px); width:100px; height:100px; background:green;"></div>
+    </div>
+  </div>
+</div>
+<script>
+  document.body.offsetTop;
+  elm.style.transform = "translateX(0)";
+</script>
diff --git a/css/css-multicol/change-transform.html b/css/css-multicol/change-transform.html
new file mode 100644
index 0000000..a70a415
--- /dev/null
+++ b/css/css-multicol/change-transform.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279525">
+<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="overflow:auto; width:500px;">
+  <div style="columns:2; column-fill:auto; height:100px;">
+    <div style="width:100px; height:100px; background:red;">
+      <div id="elm" style="transform:translateX(1000px); width:100px; height:100px; background:green;"></div>
+    </div>
+  </div>
+</div>
+<script>
+  document.body.offsetTop;
+  elm.style.transform = "translateX(0)";
+</script>
diff --git a/css/css-multicol/remove-child-in-strict-containment-also-spanner.html b/css/css-multicol/remove-child-in-strict-containment-also-spanner.html
new file mode 100644
index 0000000..8dfbe1e
--- /dev/null
+++ b/css/css-multicol/remove-child-in-strict-containment-also-spanner.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279078">
+<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-gap:0; width:100px; background:red;">
+  <div style="column-span:all; height:20px; background:green;"></div>
+  <div style="contain:strict; height:80px; background:green;">
+    <div id="elm" style="height:80px; background:red;"></div>
+  </div>
+  <div style="contain:strict; height:80px; background:green;"></div>
+</div>
+<script>
+  document.body.offsetTop;
+  elm.style.display = "none";
+</script>
diff --git a/css/css-multicol/resize-in-strict-containment-nested.html b/css/css-multicol/resize-in-strict-containment-nested.html
new file mode 100644
index 0000000..73f1494
--- /dev/null
+++ b/css/css-multicol/resize-in-strict-containment-nested.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1279078">
+<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-gap:0; column-fill:auto; width:200px; height:100px; margin-left:-100px;">
+  <div style="columns:1;">
+    <div style="height:1px; break-after:column;"></div>
+    <div style="width:100px; height:100px; contain:strict; background:red;">
+      <div id="target" style="width:1px; height:100px; background:green;"></div>
+    </div>
+  </div>
+</div>
+<script>
+  document.body.offsetTop;
+  target.style.width = "100px";
+</script>