e8116c6abb6951c5f5e93c608f2bbfb72743b370
The portrait fit was right, it just ran once and too early: iOS Safari lays the page out before its toolbars settle, so the box the first fit measured was short by a strip — and no window resize follows, because the page never scrolls. The height only came good after a rotate and back, which IS a resize. A ResizeObserver on the canvas watches the box itself, so every cause is covered (bars settling, rotation, split view, zoom) without guessing which event or delay to listen for. It only rewrites the backing store, never the CSS box, so it cannot feed itself. Verified both directions: box grows -> logical H 585 -> 671, box back -> 585, logical aspect matching the box aspect each time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Languages
JavaScript
75.2%
Python
15.8%
HTML
7.3%
Shell
1.4%
Swift
0.2%