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
On MobileSafari with Skwasm, the canvas backing store can be valid (1206 x 2142) while the visible CSS/display size collapses to about 0.328125px. User-visible result: the page is blank or nearly blank even though Skwasm artifacts loaded and benchmark telemetry can complete.
Expected visible size on the tested iPhone is about 402 x 714px.
Current status: local verification of the stock #188797 bundle did not reproduce the collapsed CSS-size signature. The bundle was built without the multi-surface flag and without forced CSS/JavaScript sizing. Physical iPhone MobileSafari loaded skwasm_heavy, main.dart.mjs, and main.dart.wasm; bench_card_infinite_scroll and bench_simple_lazy_text_scroll completed with errors: []; canvas geometry was 1206 x 2142 backing / 402 x 714 CSS.
This issue is only about the MobileSafari canvas CSS-size collapse. Safari/WebKit default enablement is separate.
User Impact
Flutter web pages using Skwasm can appear blank or nearly blank on iPhone MobileSafari even when the app has loaded and the canvas backing store contains content.
Screenshots
Failing state
Blank / near-blank page while canvas CSS size is about 0.328125px.
Recovered / fixed state
Visible benchmark content with canvas CSS size about 402 x 714px.
Additional visible benchmark states from local MobileSafari follow-up:
No forced CSS/JS sizing; variant=none is telemetry-only and does not write canvas CSS.
Generated bundle/build logs were checked for FLUTTER_WEB_SKWASM_FORCE_MULTI_SURFACE_RASTERIZER; the string was absent.
Targeted render_canvas_test.dart browser test passed in the [web] Repair RenderCanvas CSS size drift #188797 checkout with --gcs-prod (chrome-dart2js-canvaskit-engine, 3/3, All tests passed!).
Simulator MobileSafari, bench_card_infinite_scroll: loaded skwasm_heavy, main.dart.mjs, and main.dart.wasm; errors: []; canvas 1206 x 2142 backing / 402 x 714 CSS.
Physical iPhone MobileSafari, bench_card_infinite_scroll: loaded the same Skwasm artifacts; errors: []; canvas 1206 x 2142 backing / 402 x 714 CSS.
Physical iPhone MobileSafari, bench_simple_lazy_text_scroll: loaded the same Skwasm artifacts; errors: []; canvas 1206 x 2142 backing / 402 x 714 CSS.
Physical iPhone caveat: page telemetry reported crossOriginIsolated=false even though the harness served isolation headers. Skwasm still loaded through the WebKit allowlist, so the physical result is local canvas-geometry and benchmark-completion evidence, not a cross-origin-isolation pass.
Investigation details
Original Observed Behavior
Default Skwasm run on physical iPhone MobileSafari:
Skwasm runtime initializes.
skwasm_heavy, main.dart.mjs, and main.dart.wasm are fetched.
Benchmark profiles complete.
No app/runtime errors are captured by the local probe.
A Flutter canvas exists under shadow DOM.
Canvas backing store: 1206 x 2142.
Canvas CSS/display rect: approximately 0.328125 x 0.328125px.
The page became visible while the forced size was held active.
Supporting Simulator evidence reproduced the same geometry failure and recovery.
Scope Notes
CanvasKit control rendered visibly on the same physical device.
Standalone 2D/WebGL/ImageBitmap probes were visible on iPhone, so this is not currently classified as a generic ImageBitmap or bitmaprenderer failure.
Wonderous, built as a real Flutter web Skwasm app, rendered visibly on the same physical iPhone MobileSafari with default Skwasm and a normal 402 x 714px canvas rect. This means the sizing collapse is not universal across all Flutter web Skwasm apps.
A Simulator MobileSafari default/no-injection rerun reproduced the collapsed canvas geometry with backing 1206 x 2142 and CSS/display rect around 0.328125 x 0.328125px. A forced CSS-size hold recovered the canvas to 402 x 714 with visible benchmark cards.
Diagnostic RenderCanvas logs from aligned local bundles showed _ensureSize setting 1206 x 2142 canvas attributes, then logical sizing writing 402px / 714px.
A copied collapsed-bundle style-observer run showed the canvas itself receiving inline CSS 0.333333px / 0.333333px; the backing store later reached 1206 x 2142, but the canvas CSS size was not corrected to 402 x 714.
The stock RenderCanvas same-size stale-inline-CSS repair is tracked in [web] Repair RenderCanvas CSS size drift #188797 and has the no-forced/no-multi-surface MobileSafari verification summarized above.
Summary
On MobileSafari with Skwasm, the canvas backing store can be valid (
1206 x 2142) while the visible CSS/display size collapses to about0.328125px. User-visible result: the page is blank or nearly blank even though Skwasm artifacts loaded and benchmark telemetry can complete.Expected visible size on the tested iPhone is about
402 x 714px.Fix candidate: #188797.
Current status: local verification of the stock #188797 bundle did not reproduce the collapsed CSS-size signature. The bundle was built without the multi-surface flag and without forced CSS/JavaScript sizing. Physical iPhone MobileSafari loaded
skwasm_heavy,main.dart.mjs, andmain.dart.wasm;bench_card_infinite_scrollandbench_simple_lazy_text_scrollcompleted witherrors: []; canvas geometry was1206 x 2142backing /402 x 714CSS.This issue is only about the MobileSafari canvas CSS-size collapse. Safari/WebKit default enablement is separate.
User Impact
Flutter web pages using Skwasm can appear blank or nearly blank on iPhone MobileSafari even when the app has loaded and the canvas backing store contains content.
Screenshots
Blank / near-blank page while canvas CSS size is about
0.328125px.Visible benchmark content with canvas CSS size about
402 x 714px.Additional visible benchmark states from local MobileSafari follow-up:
Related PRs
Verification for #188797
wasmAllowList.webkit=true.variants=none.variant=noneis telemetry-only and does not write canvas CSS.FLUTTER_WEB_SKWASM_FORCE_MULTI_SURFACE_RASTERIZER; the string was absent.render_canvas_test.dartbrowser test passed in the [web] Repair RenderCanvas CSS size drift #188797 checkout with--gcs-prod(chrome-dart2js-canvaskit-engine, 3/3,All tests passed!).Local #188797 runs:
bench_card_infinite_scroll: loadedskwasm_heavy,main.dart.mjs, andmain.dart.wasm;errors: []; canvas1206 x 2142backing /402 x 714CSS.bench_card_infinite_scroll: loaded the same Skwasm artifacts;errors: []; canvas1206 x 2142backing /402 x 714CSS.bench_simple_lazy_text_scroll: loaded the same Skwasm artifacts;errors: []; canvas1206 x 2142backing /402 x 714CSS.Physical iPhone caveat: page telemetry reported
crossOriginIsolated=falseeven though the harness served isolation headers. Skwasm still loaded through the WebKit allowlist, so the physical result is local canvas-geometry and benchmark-completion evidence, not a cross-origin-isolation pass.Investigation details
Original Observed Behavior
Default Skwasm run on physical iPhone MobileSafari:
skwasm_heavy,main.dart.mjs, andmain.dart.wasmare fetched.1206 x 2142.0.328125 x 0.328125px.0.328125px / 0.328125px.Expected behavior:
1206 x 2142and DPR3, the canvas CSS/display rect should be approximately402 x 714px.Local Recovery Probe
A local-only JavaScript probe, without changing engine source or Skwasm artifacts, searched shadow DOM for Flutter canvases and applied:
Result on physical iPhone MobileSafari:
0.328125 x 0.328125px.402 x 714px.Supporting Simulator evidence reproduced the same geometry failure and recovery.
Scope Notes
402 x 714pxcanvas rect. This means the sizing collapse is not universal across all Flutter web Skwasm apps.Investigation History
1206 x 2142and CSS/display rect around0.328125 x 0.328125px. A forced CSS-size hold recovered the canvas to402 x 714with visible benchmark cards._ensureSizesetting1206 x 2142canvas attributes, then logical sizing writing402px / 714px.0.333333px / 0.333333px; the backing store later reached1206 x 2142, but the canvas CSS size was not corrected to402 x 714.