Mark OOFs for paint invalidation on layout cache hit.

This is a work-around for cases where an OOF is missed during
LayoutObject subtree tree walk in pre-paint (with block fragmentation),
so that we end up in PrePaintTreeWalk::WalkMissedChildren(). If any of
the ancestors of the OOF actually moved, pre-paint will force a deep
subtree walk, but that's not going to help the OOF if it's missed.

Bug: 1375232
Change-Id: I57ae0c78c8c5435daba5c6d7971041c9421c006b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3963036
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061456}
diff --git a/css/css-break/monolithic-abspos-enter-fragmentation-context.html b/css/css-break/monolithic-abspos-enter-fragmentation-context.html
new file mode 100644
index 0000000..75e33c2
--- /dev/null
+++ b/css/css-break/monolithic-abspos-enter-fragmentation-context.html
@@ -0,0 +1,19 @@
+<!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=1372396">
+<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 id="container" style="width:100px; gap:0; column-fill:auto; height:100px; background:red;">
+  <div style="position:relative; height:400px;">
+    <div style="height:300px; background:green;">
+      <div style="contain:size; position:absolute; left:0; top:300px; height:100px; width:25px; background:green;"></div>
+    </div>
+  </div>
+</div>
+<script>
+  requestAnimationFrame(()=> {
+    requestAnimationFrame(()=> {
+      container.style.columns = "4";
+    });
+  });
+</script>