Tab crash: fullscreen makes an open popover's parent display: contents via a container query

#577708593 CL 8746522

Before / after

Same ToT content_shell binary, same repro HTML, sandbox off, headless. For before the fix commit was reverted with git reset --hard HEAD~1 and the shell rebuilt. Captured on Linux (Debian bookworm, X11). Platforms other than Linux Blink may not hit this path: the bug is in a Linux-observed ordering of the top-layer OOF walk and style reattach; macOS/Windows have not been confirmed to reproduce. The raw crash log is at crash.log.

before (fix reverted)#CRASHED - renderer
Real content_shell stderr: Received signal 11 SEGV_MAPERR with LayoutObject::CheckIsNotDestroyed on top
after (fix applied)renderer alive
Outer and inner popover laid out, status no crash

Repro

<div id="outer" popover="manual"
     style="container-type: inline-size; width: 600px">
  <div id="wrap">
    <div id="inner" popover="manual">inner</div>
  </div>
</div>
<style>
  @container (width >= 500px) { #wrap { display: contents; } }
</style>
<script>
  outer.showPopover();
  inner.showPopover();
</script>

Root cause

OutOfFlowLayoutPart::Run()'s root top-layer loop walks LayoutView's children with FirstChild()/NextSibling(). Laying out a top-layer size container triggers an interleaved style and layout-tree rebuild that destroys an earlier top-layer sibling's already-added fragment and inserts a fresh un-laid-out LayoutBox for it before the cursor. The forward-only walk never revisits it; paint dereferences a fragment pointing at a destroyed LayoutObject.

Fix

Loop the scan until no new top-layer box is laid out (HeapHashSet of handled boxes) and prune children with destroyed LayoutObjects from the FragmentBuilder between passes. WPT crashtest added.