[flutter_releases] Flutter stable 2.10.1 Framework Cherrypicks (#98091)

* Fix autofill eligibility check (#95210)

* 'add branch flutter-2.8-candidate.16 to enabled_branches in .ci.yaml'

* 'Update Engine revision to ab46186b246f5a36bd1f3f295d14a43abb1e2f38 for stable release 2.10.1'

* remove reference to enabled_branch

* update canvaskit version

* remove trailing line from canvaskit.version

Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
Co-authored-by: Kevin Chisholm <kevinjchisholm@google.com>
diff --git a/bin/internal/canvaskit.version b/bin/internal/canvaskit.version
index 81d5236..71082dc 100644
--- a/bin/internal/canvaskit.version
+++ b/bin/internal/canvaskit.version
@@ -1 +1 @@
-NcwvqeeKK7urddCbEdDvHytdaCiCA_8-4oS_T_ouGfgC
+8MSYGWVWzrTJIoVL00ZquruZs-weuwLBy1kt1AawJiIC
diff --git a/bin/internal/engine.version b/bin/internal/engine.version
index 23a7a59..0271767 100644
--- a/bin/internal/engine.version
+++ b/bin/internal/engine.version
@@ -1 +1 @@
-776efd2034d50af73e2876d703213601df384e88
+ab46186b246f5a36bd1f3f295d14a43abb1e2f38
diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart
index f7518ca..67f5674 100644
--- a/packages/flutter/lib/src/widgets/editable_text.dart
+++ b/packages/flutter/lib/src/widgets/editable_text.dart
@@ -2191,7 +2191,7 @@
   bool get _hasInputConnection => _textInputConnection?.attached ?? false;
   /// Whether to send the autofill information to the autofill service. True by
   /// default.
-  bool get _needsAutofill => widget.autofillHints?.isNotEmpty ?? true;
+  bool get _needsAutofill => _effectiveAutofillClient.textInputConfiguration.autofillConfiguration.enabled;
 
   void _openInputConnection() {
     if (!_shouldCreateInputConnection) {
diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart
index 10c31a2..1f1561a 100644
--- a/packages/flutter/test/widgets/editable_text_test.dart
+++ b/packages/flutter/test/widgets/editable_text_test.dart
@@ -6585,6 +6585,7 @@
       'TextInput.setStyle',
       'TextInput.setEditingState',
       'TextInput.show',
+      'TextInput.requestAutofill',
       'TextInput.setEditingState',
       'TextInput.show',
       'TextInput.setCaretRect',
@@ -6648,6 +6649,7 @@
         'TextInput.setStyle',
         'TextInput.setEditingState',
         'TextInput.show',
+        'TextInput.requestAutofill',
         'TextInput.setCaretRect',
       ];
       expect(
@@ -6690,6 +6692,7 @@
       'TextInput.setStyle',
       'TextInput.setEditingState',
       'TextInput.show',
+      'TextInput.requestAutofill',
       'TextInput.setEditingState',
       'TextInput.show',
       'TextInput.setCaretRect',
@@ -6740,6 +6743,7 @@
       'TextInput.setStyle',
       'TextInput.setEditingState',
       'TextInput.show',
+      'TextInput.requestAutofill',
       'TextInput.setEditingState',
       'TextInput.show',
       'TextInput.setCaretRect',
@@ -8974,6 +8978,53 @@
     await tester.pump();
     expect(scrollController.offset.roundToDouble(), 0.0);
   });
+
+  testWidgets('Autofill enabled by default', (WidgetTester tester) async {
+    final FocusNode focusNode = FocusNode();
+    await tester.pumpWidget(
+      MaterialApp(
+        home: EditableText(
+          autofocus: true,
+          controller: TextEditingController(text: 'A'),
+          focusNode: focusNode,
+          style: textStyle,
+          cursorColor: Colors.blue,
+          backgroundCursorColor: Colors.grey,
+          cursorOpacityAnimates: true,
+        ),
+      ),
+    );
+
+    assert(focusNode.hasFocus);
+    expect(
+      tester.testTextInput.log,
+      contains(matchesMethodCall('TextInput.requestAutofill')),
+    );
+  });
+
+  testWidgets('Autofill can be disabled', (WidgetTester tester) async {
+    final FocusNode focusNode = FocusNode();
+    await tester.pumpWidget(
+      MaterialApp(
+        home: EditableText(
+          autofocus: true,
+          controller: TextEditingController(text: 'A'),
+          focusNode: focusNode,
+          style: textStyle,
+          cursorColor: Colors.blue,
+          backgroundCursorColor: Colors.grey,
+          cursorOpacityAnimates: true,
+          autofillHints: null,
+        ),
+      ),
+    );
+
+    assert(focusNode.hasFocus);
+    expect(
+      tester.testTextInput.log,
+      isNot(contains(matchesMethodCall('TextInput.requestAutofill'))),
+    );
+  });
 }
 
 class UnsettableController extends TextEditingController {