Keep the WebKit subsurface aligned with buffr's browser region as the window resizes and chrome strips reflow.
Scope
When the chrome layout changes (`browser_rect` recomputed), call:
- `wl_subsurface::set_position(rect.x, rect.y)` on the WebKit subsurface.
- Resize WebKit's WPEToplevel via existing path: `tab.resize(rect.w, rect.h)`.
- Commit the parent surface to apply.
wp_viewporter for source-rect clipping
If the WebKit-rendered buffer is larger than the browser rect (it shouldn't be after we resize WPEToplevel, but defensively): use `wp_viewport` extension to clip the source rect.
Bind via wl_registry; cache the `wp_viewporter` global ptr if present. Some compositors don't ship it — skip clipping gracefully and rely on WPE's resize alone.
Cadence
`set_position` runs on every chrome layout change — not every redraw. The apps layer already debounces resize events (`winit: pending Resized debounce` in logs). Hook into the same path.
Out of scope
Acceptance
- Drag-resize buffr window → WebKit subsurface tracks the browser region without lag.
- Chrome strip toggle (omnibar open/close shifts the browser rect) → subsurface re-positions.
- No flicker.
Reference
Keep the WebKit subsurface aligned with buffr's browser region as the window resizes and chrome strips reflow.
Scope
When the chrome layout changes (`browser_rect` recomputed), call:
wp_viewporter for source-rect clipping
If the WebKit-rendered buffer is larger than the browser rect (it shouldn't be after we resize WPEToplevel, but defensively): use `wp_viewport` extension to clip the source rect.
Bind via wl_registry; cache the `wp_viewporter` global ptr if present. Some compositors don't ship it — skip clipping gracefully and rely on WPE's resize alone.
Cadence
`set_position` runs on every chrome layout change — not every redraw. The apps layer already debounces resize events (`winit: pending Resized debounce` in logs). Hook into the same path.
Out of scope
Acceptance
Reference