Prevent browser frame stretch on resize

Keep the live browser frame proportional while the viewer is being resized by using contain sizing instead of stretching the stale frame to the transient surface shape. Update the regression guard so the viewer contract pins the proportional render path.

Alessandro committed Jul 3, 2026 at 03:16 UTC 277bcd0783a5165801f3113c4aa67406690772f9
2 files changed +2 -2
plugins/_browser/webui/browser-panel.html
+1 -1
@@ -999,7 +999,7 @@
999 height: 100%;
1000 min-width: 0;
1001 min-height: 0;
1002 - object-fit: fill;
1002 + object-fit: contain;
1003 image-rendering: auto;
1004 user-select: none;
1005 background: #fff;
tests/test_browser_agent_regressions.py
+1 -1
@@ -1248,7 +1248,7 @@ def test_browser_viewer_defaults_to_live_screencast_with_snapshot_fallback():
1248 assert "canvas_wheel_screenshot" not in ws_browser
1249 assert "surface_mode: this._mode" not in browser_store
1250 assert "overflow: hidden;" in main_html
1251 - assert "object-fit: fill;" in main_html
1251 + assert "object-fit: contain;" in main_html
1252 assert "image-rendering: auto;" in main_html
1253
1254