5c4f1e744c
The frame was a hardcoded 280px unless the model guessed a height attribute — tall pages clipped (the flip-clock demo cut its last digit), short ones floated in dead space. The opaque-origin sandbox means the parent can't measure the document, but we own the srcdoc string: a tiny injected script observes the document with ResizeObserver and posts its scrollHeight up via postMessage, and the frame tracks it live within the 120-1200 clamp. Reports are validated before they can move layout — per-mount random token (two previews in one transcript, or a hostile page inventing messages, can't move each other's frames), finite-number check, clamp. A 4px tolerance stops vh-sized pages (which measure exactly what they're given) from oscillating; an explicit height attribute still opts out of auto-sizing entirely.