)]}'
{
  "commit": "8303fed06ebbb434375e5951875feb8507be849a",
  "tree": "b4b4ab6e3a2e27f421c5bfe27b1c6887b3e90a8b",
  "parents": [
    "97b6bacd942eace1dd2fc1259fd7e61fbbb3cbab"
  ],
  "author": {
    "name": "Burak Karahan",
    "email": "burak.karahan@mail.ru",
    "time": "Fri Jul 10 05:45:12 2026 +0300"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Jul 10 02:45:12 2026 +0000"
  },
  "message": "[web] Repair RenderCanvas CSS size drift (#188797)\n\n## What changed\n\nThis PR makes the stock `RenderCanvas` path repair stale inline canvas\nCSS size even when the backing-store size and DPR have not changed.\n\nChanges:\n\n- Factor the expected logical canvas CSS size into a helper.\n- Check actual `style.width` / `style.height` before the same-size early\nreturn.\n- Re-apply backing-store / DPR CSS size when the inline style is stale.\n- Add regression coverage for `1206 x 2142 @ DPR 3`, repairing\n`0.333333px` back to `402 x 714px`.\n\n## Why\n\nflutter/flutter#188723 tracks a Safari/WebKit Skwasm case where the\ncanvas backing store can be valid while the visible CSS/display rect\nremains collapsed around `0.328125 x 0.328125px`.\n\nThe existing stock `RenderCanvas` code repairs CSS size on physical-size\nchanges and DPR changes, but not when only the inline CSS value is\nstale. This PR makes that same-size path self-heal.\n\n## Scope\n\nThis does not enable Skwasm by default, change WebKit policy, depend on\nthe multi-surface rasterizer, or by itself close all Safari/WebKit\ndefault-policy gates.\n\n## Validation\n\n- `dart format`: passed.\n- `git diff --check`: passed.\n- Targeted `felt` browser test in the #188797 checkout: passed locally.\n- Command: `DART_SUPPRESS_ANALYTICS\u003dtrue HOME\u003d/private/tmp\nDART_SDK_DIR\u003d/private/tmp/flutter-mobile-safari-skwasm-canvas-css-size-fix-upstream-worktree/engine/src/flutter/third_party/dart/tools/sdks/dart-sdk\n./dev/felt test --gcs-prod --browser chrome --compiler dart2js\n--renderer canvaskit --fail-early\ntest/engine/compositing/render_canvas_test.dart`\n- Result: `chrome-dart2js-canvaskit-engine`, `3/3`, `All tests passed!`.\n- Fresh `engine/src/out/wasm_release/flutter_web_sdk` build from the\n#188797 worktree: passed locally.\n- `dev/benchmarks/macrobenchmarks` built as web wasm/profile using the\nlocal `wasm_release` SDK: passed locally.\n- Guardrail: preserved SDK/app build logs and generated bundle were\nchecked for `FLUTTER_WEB_SKWASM_FORCE_MULTI_SURFACE_RASTERIZER`; the\nstring was absent.\n- Simulator MobileSafari, Skwasm, `variant\u003dnone`, no forced CSS sizing,\n`bench_card_infinite_scroll`: `probe-complete`, `errors: []`, loaded\n`skwasm_heavy`, `main.dart.mjs`, and `main.dart.wasm`,\n`crossOriginIsolated\u003dtrue`, canvas backing `1206 x 2142`,\nCSS/display/style `402 x 714` / `402px x 714px`.\n- Physical iPhone MobileSafari, Skwasm, `variant\u003dnone`, no forced CSS\nsizing, `bench_card_infinite_scroll`: `all-benchmarks-complete`,\n`errors: []`, loaded `skwasm_heavy`, `main.dart.mjs`, and\n`main.dart.wasm`, canvas backing `1206 x 2142`, CSS/display/style `402 x\n714` / `402px x 714px`.\n- Physical iPhone MobileSafari, Skwasm, `variant\u003dnone`, no forced CSS\nsizing, `bench_simple_lazy_text_scroll`: `all-benchmarks-complete`,\n`errors: []`, loaded `skwasm_heavy`, `main.dart.mjs`, and\n`main.dart.wasm`, canvas backing `1206 x 2142`, CSS/display/style `402 x\n714` / `402px x 714px`.\n\nPhysical iPhone page telemetry reported `crossOriginIsolated\u003dfalse` even\nthough the harness served isolation headers. Skwasm still loaded through\nthe WebKit allowlist, so this is local physical\ngeometry/benchmark-completion evidence, not a cross-origin-isolation\npass.\n\nRelated issue: flutter/flutter#188723.\nBroader Safari/WebKit Wasm/Skwasm tracking: flutter/flutter#178893.\n\n---------\n\nCo-authored-by: Harry Terkelsen \u003c1961493+harryterkelsen@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "73668ad29862a6a70ce0d5f5ee57a0818d7f1f24",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/web_ui/lib/src/engine/compositing/render_canvas.dart",
      "new_id": "d1b91e75b4f705a60a1dac49692588166936110d",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/web_ui/lib/src/engine/compositing/render_canvas.dart"
    },
    {
      "type": "modify",
      "old_id": "536ab9ca18c4a1469166b1d18db7ec2787ba3d78",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/web_ui/test/engine/compositing/render_canvas_test.dart",
      "new_id": "f5582c380df65b552d9be9a7bedbcf3b4af82c8a",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/web_ui/test/engine/compositing/render_canvas_test.dart"
    }
  ]
}
