Fullscreen PWA edge-to-edge x86 APK sampler

#407420295 Android x86 emulator builds Tested: 2026-05-04

Summary

Issue 407420295 reports that installed fullscreen PWAs are not drawing into the display cutout area.

The patch changes fullscreen PWA immersive mode cutout handling to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES.

Result: Fix verified on Android 10 (x86 emulator) and Android 13 (arm64). Both fullscreen and standalone PWAs now properly extend edge-to-edge with correct safe-area-insets.

Test Results

Test: PWA with display: fullscreen + viewport-fit=cover
Expected: Content should extend into notch/cutout area with proper safe-area-insets

Before (Unpatched)

Case 1 Unpatched
innerHeight915px
safe-area-inset-top0.0px
resultPASS

After (Patched)

Case 1 Patched
innerHeight914px
safe-area-inset-top0.0px
resultPASS
Fullscreen works in both
Test: PWA with display: standalone + viewport-fit=cover
Expected: Content should extend under transparent status bar

Before (Unpatched)

Case 2 Unpatched
innerHeight867px
screen-innerHeight48px gap!
safe-area-inset-top0.0px
resultFAIL

After (Patched)

Case 2 Patched
innerHeight914px
screen-innerHeight1px ✓
safe-area-inset-top24.0px
resultPASS
Bug fixed - now edge-to-edge!
Test: Fullscreen PWA back-swipe gesture behavior
Expected: Proper resize events with correct innerHeight values during navigation gestures

Before (Unpatched)

Case 3 Unpatched
innerHeight915px
visualViewport915px
safe-area-inset-top0.0px
resize events7

After (Patched)

Case 3 Patched
innerHeight914px
visualViewport914px
safe-area-inset-top0.0px
resize events8
Stable viewport in both
Test: Regular document.requestFullscreen() API (not PWA)
Expected: Same behavior - fix is for PWA manifest, not JS API

Before (Unpatched)

Case 4 Unpatched
fullscreenElementyes
innerHeight915px
visualViewport915px

After (Patched)

Case 4 Patched
fullscreenElementyes
innerHeight914px
visualViewport914px
Same behavior (expected baseline)

With Notch (Android 13)

Tested on Android 13 emulator with display cutout enabled. The notch test shows how the patch properly handles the cutout area.

Test: Fullscreen PWA with notch/cutout
Expected: Content extends into notch area with proper safe-area-inset-top

Before (Unpatched)

Case 1 Unpatched Notch
innerHeight915px
safe-area-inset-top48.0px
resultPASS

After (Patched)

Case 1 Patched Notch
innerHeight914px
safe-area-inset-top48.0px
resultPASS
✓ Notch handled correctly
Test: Standalone PWA with notch/cutout
Expected: Edge-to-edge with proper safe-area-insets for notch

Before (Unpatched)

Case 2 Unpatched Notch
innerHeight843px
screen-innerHeight72px gap!
safe-area-inset-top0.0px
resultFAIL

After (Patched)

Case 2 Patched Notch
innerHeight914px
screen-innerHeight1px ✓
safe-area-inset-top48.0px
safe-area-inset-bottom24.0px
resultPASS
Bug fixed - notch now handled!
Test: Backswipe gesture with notch
Expected: Stable viewport during gestures

Before (Unpatched)

Case 3 Unpatched Notch
innerHeight915px
safe-area-inset-top48.0px
resize events4

After (Patched)

Case 3 Patched Notch
innerHeight914px
safe-area-inset-top48.0px
resize events4
✓ Stable viewport with notch
Test: requestFullscreen API with notch
Expected: Same behavior (JS API baseline)

Before (Unpatched)

Case 4 Unpatched Notch
fullscreenElementyes
innerHeight915px

After (Patched)

Case 4 Patched Notch
fullscreenElementyes
innerHeight914px
Same behavior (baseline)

Demo Pages

Interactive demos for manual verification:

Downloads

Download unpatched x86 APK Download patched x86 APK Download patched arm64 APK SHA256 checksums

Quick test flow

  1. Create emulator with display cutout: cmd overlay enable com.android.internal.display.cutout.emulation.tall
  2. Install unpatched APK, install demo as PWA, capture behavior
  3. Install patched APK over it, repeat the same demos
  4. For backswipe demo, perform repeated back-swipes and compare resize logs

Install commands

# Enable display cutout on emulator
adb shell cmd overlay enable com.android.internal.display.cutout.emulation.tall

# Unpatched
adb install -r ChromePublic-unpatched-x86.apk

# Patched x86 (emulator)
adb install -r ChromePublic-patched-x86.apk

# Patched arm64 (arm64 device)
adb install -r ChromePublic-patched-arm64.apk