requestFullscreen() is handled by the engine but ignored by us, so a video site's fullscreen button currently does nothing on screen. On these devices, that is likely the first button a user reaches for when a <video> starts playing.
Design
- Implement
WebViewDelegate::notify_fullscreen_state_changed(webview, is_fullscreen) in browser/delegate.rs, alongside the existing notify_* hooks, and keep the state per tab. A background tab entering fullscreen must not hide the chrome of the tab currently on screen.
- Fullscreen here means hiding the chrome and giving the page the whole window, not calling
SDL_SetWindowFullscreen. On a handheld, the window already fills the panel; the toolbar is what costs pixels. The webview rect is the window minus the toolbar strip (ui::toolbar_height), so entering fullscreen is the same resize path already used when the toolbar auto-hides. Reuse that path rather than adding another one.
- Exiting: B calls
WebView::exit_fullscreen(), while the page's own exitFullscreen() arrives through the same notification, so both paths converge in one place. While fullscreen, B must not also navigate back in history.
- Overlays such as the menu, settings, and OSK should still draw over the page. Opening one should cover fullscreen, not exit it.
- On desktop, decide whether fullscreen should also call
SDL_SetWindowFullscreen. The simplest first pass is no: keep the same behaviour everywhere.
Notes
- Engine hooks:
WebViewDelegate::notify_fullscreen_state_changed — webview_delegate.rs:984; WebView::exit_fullscreen — webview.rs:706.
- Add a page under
tests/pages/ that requests fullscreen on click, so the path can be tested without relying on a video site.
requestFullscreen()is handled by the engine but ignored by us, so a video site's fullscreen button currently does nothing on screen. On these devices, that is likely the first button a user reaches for when a<video>starts playing.Design
WebViewDelegate::notify_fullscreen_state_changed(webview, is_fullscreen)inbrowser/delegate.rs, alongside the existingnotify_*hooks, and keep the state per tab. A background tab entering fullscreen must not hide the chrome of the tab currently on screen.SDL_SetWindowFullscreen. On a handheld, the window already fills the panel; the toolbar is what costs pixels. The webview rect is the window minus the toolbar strip (ui::toolbar_height), so entering fullscreen is the same resize path already used when the toolbar auto-hides. Reuse that path rather than adding another one.WebView::exit_fullscreen(), while the page's ownexitFullscreen()arrives through the same notification, so both paths converge in one place. While fullscreen, B must not also navigate back in history.SDL_SetWindowFullscreen. The simplest first pass is no: keep the same behaviour everywhere.Notes
WebViewDelegate::notify_fullscreen_state_changed—webview_delegate.rs:984;WebView::exit_fullscreen—webview.rs:706.tests/pages/that requests fullscreen on click, so the path can be tested without relying on a video site.