)]}'
{
  "commit": "03ebdcd6bd92a06081e2f24fff97f0ba6dbe731d",
  "tree": "9614ac16e6b31e54e4e6f21263e8846476ce41dd",
  "parents": [
    "9c71f8b6deaff435bd91f50f92b9c63b61a3da71"
  ],
  "author": {
    "name": "Afzal Najam",
    "email": "AfzalivE@users.noreply.github.com",
    "time": "Tue Sep 01 18:13:43 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Sep 01 18:13:43 2026 +0000"
  },
  "message": "[iOS] Preserve semantics parents after reparenting (#189686)\n\nFixes https://github.com/flutter/flutter/issues/100946.\n\n## Problem\n\nReordering a `ReorderableListView` on iOS could move VoiceOver focus to\nthe upper-left corner of the screen. The affected items could no longer\nbe focused at their visual positions.\n\nDuring a reorder, semantics children move through temporary containers\nused by the drag overlay and drop animation. A child may already have\nbeen attached to its replacement `SemanticsObject` when its previous\nparent is updated or deallocated.\n\nThe previous parent unconditionally cleared the child\u0027s `parent`\nproperty. This overwrote the new parent relationship and disconnected\nthe child from the native semantics hierarchy.\n\n`SemanticsObject` calculates its global accessibility frame by walking\nthis parent chain and composing each ancestor\u0027s transform. Once the\nchain was disconnected, the element retained only its local\nphysical-pixel rectangle. On a 3x simulator, the expected frame:\n\n```\n{{0, 286}, {402, 56}}\n```\n\nbecame:\n\n```\n{{0, 0}, {134, 18.67}}\n```\n\nThis accounts for both the missing translation and the frame being\nreduced by the device pixel ratio.\n\n## Fix\n\nOnly clear a child\u0027s parent when the `SemanticsObject` performing\ncleanup still owns that parent relationship:\n\n```objc\nchild.parent \u003d\u003d self\n```\n\nThis guard is applied when:\n\n- A `SemanticsObject` is deallocated.\n- Its traversal-order children are replaced.\n- Its hit-test-order children are replaced.\n\nA previous parent can now release its stale child references without\ndetaching a child that has already moved under a replacement container.\nThe complete ancestor transform remains available when calculating the\nnative accessibility frame.\n\n## Testing\n\nAdded An iOS XCUITest that performs the default mobile long-press\nreorder gesture, verifies the resulting native semantic traversal order,\nand asserts that the reordered item retains the expected accessibility\nframe.\n\nThe integration app also includes a deterministic direct-drag fixture\nfor exercising XCUITest drag synthesis.\n\nValidation performed:\n\n- `testReorderableListAccessibilityHierarchyUpdates` passes with the\nlocally built engine.\n- `packages/flutter/test/widgets/reorderable_list_test.dart` passes.\n- `packages/flutter/test/material/reorderable_list_test.dart` passes.\n- `ios_test_flutter` builds successfully.\n- Engine formatting and Dart analysis pass.\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [x] I read the [AI contribution guidelines] and understand my\nresponsibilities, or I am not using AI tools.\n- [x] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [x] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [x] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [x] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [x] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [ ] All existing and new tests are passing.\n\n---------\n\nCo-authored-by: LongCatIsLooong \u003c31859944+LongCatIsLooong@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6ab3da7b3a8ae378bbb2ad6fdc3659a87852ca01",
      "old_mode": 33188,
      "old_path": "dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m",
      "new_id": "2bae59cb2a8ee4d0d48b3265ec98c091e5681128",
      "new_mode": 33188,
      "new_path": "dev/integration_tests/ios_platform_view_tests/ios/PlatformViewUITests/PlatformViewUITests.m"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e746becac61dcbb6bc6228e109e68fb6411a5954",
      "new_mode": 33188,
      "new_path": "dev/integration_tests/ios_platform_view_tests/lib/drag.dart"
    },
    {
      "type": "modify",
      "old_id": "0eaff0ec48447bbb14979acb8c20831d7eb35d93",
      "old_mode": 33188,
      "old_path": "dev/integration_tests/ios_platform_view_tests/lib/main.dart",
      "new_id": "b206d1086b1c2884be1b1876c42afe6d7664a5c0",
      "new_mode": 33188,
      "new_path": "dev/integration_tests/ios_platform_view_tests/lib/main.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b30896e7cd07d7bc0b069d2b6c81c1b507a9f7f2",
      "new_mode": 33188,
      "new_path": "dev/integration_tests/ios_platform_view_tests/lib/reorderable_list_semantics.dart"
    },
    {
      "type": "modify",
      "old_id": "44dadba8f7ebc09ae3480b2bab7141689f132ae8",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm",
      "new_id": "36a04c239080ba291cce5d4b98015ea08ba7fc1d",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm"
    },
    {
      "type": "modify",
      "old_id": "056d08798f6cfdb5461e50a49b0a8979903647fc",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm",
      "new_id": "cd2de06869ed3b0e38fa2863301fb2010bbc4053",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm"
    }
  ]
}
