diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc index b49e6ece3b611..1f3d1e72e93d3 100644 --- a/shell/platform/windows/flutter_windows_engine.cc +++ b/shell/platform/windows/flutter_windows_engine.cc @@ -327,18 +327,19 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) { auto host = static_cast(user_data); host->OnPreEngineRestart(); }; - args.update_semantics_callback = [](const FlutterSemanticsUpdate* update, - void* user_data) { + args.update_semantics_callback2 = [](const FlutterSemanticsUpdate2* update, + void* user_data) { auto host = static_cast(user_data); - for (size_t i = 0; i < update->nodes_count; i++) { - host->accessibility_bridge_->AddFlutterSemanticsNodeUpdate( - update->nodes[i]); + for (size_t i = 0; i < update->node_count; i++) { + const FlutterSemanticsNode2* node = update->nodes[i]; + host->accessibility_bridge_->AddFlutterSemanticsNodeUpdate(*node); } - for (size_t i = 0; i < update->custom_actions_count; i++) { + for (size_t i = 0; i < update->custom_action_count; i++) { + const FlutterSemanticsCustomAction2* action = update->custom_actions[i]; host->accessibility_bridge_->AddFlutterSemanticsCustomActionUpdate( - update->custom_actions[i]); + *action); } host->accessibility_bridge_->CommitUpdates(); diff --git a/shell/platform/windows/flutter_windows_engine_unittests.cc b/shell/platform/windows/flutter_windows_engine_unittests.cc index 7a503aae7b3a7..f0d9492d423aa 100644 --- a/shell/platform/windows/flutter_windows_engine_unittests.cc +++ b/shell/platform/windows/flutter_windows_engine_unittests.cc @@ -60,7 +60,8 @@ TEST_F(FlutterWindowsEngineTest, RunDoesExpectedInitialization) { EXPECT_NE(args->custom_task_runners->thread_priority_setter, nullptr); EXPECT_EQ(args->custom_dart_entrypoint, nullptr); EXPECT_NE(args->vsync_callback, nullptr); - EXPECT_NE(args->update_semantics_callback, nullptr); + EXPECT_EQ(args->update_semantics_callback, nullptr); + EXPECT_NE(args->update_semantics_callback2, nullptr); EXPECT_EQ(args->update_semantics_node_callback, nullptr); EXPECT_EQ(args->update_semantics_custom_action_callback, nullptr);