You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes shared game fullscreen behavior so the game/canvas play area is the fullscreen target and the canvas resizes to the available fullscreen surface.
6
+
7
+
## Changes
8
+
9
+
- Fullscreen target resolution now creates and uses a dedicated `data-runtime-fullscreen-host="canvas"` wrapper around the game canvas.
10
+
- The shared runtime no longer promotes the broader page/body shell as the preferred fullscreen target when a canvas host can be created.
11
+
- Canvas fullscreen layout now fits the canvas to the active fullscreen host when no bezel/chrome overlay is available.
12
+
- Canvas inline layout styles are captured before runtime fullscreen changes and restored after fullscreen exit.
13
+
- Shared game CSS includes explicit fullscreen host/canvas rules for viewport-sized play surfaces.
14
+
-`FullscreenService` now treats fullscreen as active only when the configured runtime target is the active fullscreen element.
-`npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "fits the game canvas inside the fullscreen play area"`
26
+
-`npm run test:workspace-v2`
27
+
28
+
Result:
29
+
30
+
- Targeted fullscreen validation passed.
31
+
-`npm run test:workspace-v2`: 41 passed.
32
+
- Full samples smoke test skipped because this PR changes shared game fullscreen runtime behavior and is covered by targeted Asteroids game/canvas fullscreen validation plus Workspace V2 regression coverage; broad sample JSON/smoke coverage was explicitly out of scope.
33
+
34
+
## Playwright Coverage
35
+
36
+
The targeted fullscreen test validates:
37
+
38
+
- Asteroids boots through the real game launch path.
39
+
- Fullscreen request targets the dedicated canvas host, not `body` or `documentElement`.
40
+
- Canvas resizes to fill the mocked fullscreen play area.
41
+
- Exiting fullscreen clears fullscreen state and restores normal canvas/browser layout.
42
+
- Shared header height remains restored after fullscreen exit.
43
+
44
+
## Manual Validation
45
+
46
+
1. Open `games/Asteroids/index.html`.
47
+
2. Click the game canvas to enter fullscreen.
48
+
3. Confirm the play surface, not the full page shell, becomes fullscreen.
49
+
4. Confirm the canvas fills the available fullscreen play area.
50
+
5. Exit fullscreen and confirm the normal page layout and header return.
0 commit comments