Skip to content

Commit 960d107

Browse files
auto-submit[bot]auto-submit[bot]
andauthored
Reverts "Reapply "Add set semantics enabled API and wire iOS a11y bridge (#161… (flutter#171198)" (flutter#174153)
<!-- start_original_pr_link --> Reverts: flutter#171198 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chunhtai <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: breaking internal tests <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: chunhtai <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {jmagman, mdebbar} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: …265)" This reverts commit cc04ca4. <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> fixes flutter#158399 ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
1 parent 0c127ec commit 960d107

35 files changed

+72
-558
lines changed

dev/integration_tests/ios_host_app/flutterapp/lib/main

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const BasicMessageChannel<String> _kReloadChannel =
3232
void main() {
3333
// Ensures bindings are initialized before doing anything.
3434
WidgetsFlutterBinding.ensureInitialized();
35-
ui.PlatformDispatcher.instance.setSemanticsTreeEnabled(true);
3635
// Start listening immediately for messages from the iOS side. ObjC calls
3736
// will be made to let us know when we should be changing the app state.
3837
_kReloadChannel.setMessageHandler(run);

engine/src/flutter/ci/licenses_golden/excluded_files

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@
287287
../../../flutter/runtime/fixtures
288288
../../../flutter/runtime/no_dart_plugin_registrant_unittests.cc
289289
../../../flutter/runtime/platform_isolate_manager_unittests.cc
290-
../../../flutter/runtime/runtime_controller_unittests.cc
291290
../../../flutter/runtime/type_conversions_unittests.cc
292291
../../../flutter/shell/common/animator_unittests.cc
293292
../../../flutter/shell/common/base64_unittests.cc

engine/src/flutter/ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53508,7 +53508,6 @@ ORIGIN: ../../../flutter/shell/platform/darwin/ios/platform_message_handler_ios.
5350853508
ORIGIN: ../../../flutter/shell/platform/darwin/ios/platform_message_handler_ios_test.mm + ../../../flutter/LICENSE
5350953509
ORIGIN: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.h + ../../../flutter/LICENSE
5351053510
ORIGIN: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.mm + ../../../flutter/LICENSE
53511-
ORIGIN: ../../../flutter/shell/platform/darwin/ios/platform_view_ios_test.mm + ../../../flutter/LICENSE
5351253511
ORIGIN: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.h + ../../../flutter/LICENSE
5351353512
ORIGIN: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.mm + ../../../flutter/LICENSE
5351453513
ORIGIN: ../../../flutter/shell/platform/darwin/macos/InternalFlutterSwift-Bridging-Header.h + ../../../flutter/LICENSE
@@ -56595,7 +56594,6 @@ FILE: ../../../flutter/shell/platform/darwin/ios/platform_message_handler_ios.mm
5659556594
FILE: ../../../flutter/shell/platform/darwin/ios/platform_message_handler_ios_test.mm
5659656595
FILE: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.h
5659756596
FILE: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.mm
56598-
FILE: ../../../flutter/shell/platform/darwin/ios/platform_view_ios_test.mm
5659956597
FILE: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.h
5660056598
FILE: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.mm
5660156599
FILE: ../../../flutter/shell/platform/darwin/macos/InternalFlutterSwift-Bridging-Header.h

engine/src/flutter/lib/ui/dart_ui.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ typedef CanvasPath Path;
103103
V(PlatformConfigurationNativeApi::UpdateSemantics) \
104104
V(PlatformConfigurationNativeApi::SetNeedsReportTimings) \
105105
V(PlatformConfigurationNativeApi::SetIsolateDebugName) \
106-
V(PlatformConfigurationNativeApi::SetSemanticsTreeEnabled) \
107106
V(PlatformConfigurationNativeApi::RequestDartPerformanceMode) \
108107
V(PlatformConfigurationNativeApi::GetPersistentIsolateData) \
109108
V(PlatformConfigurationNativeApi::ComputePlatformResolvedLocale) \

engine/src/flutter/lib/ui/platform_dispatcher.dart

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -716,26 +716,6 @@ class PlatformDispatcher {
716716
@Native<Void Function(Int64)>(symbol: 'PlatformConfigurationNativeApi::RegisterBackgroundIsolate')
717717
external static void __registerBackgroundIsolate(int rootIsolateId);
718718

719-
/// Informs the engine whether the framework is generating a semantics tree.
720-
///
721-
/// Only framework knows when semantics tree should be generated. It uses this
722-
/// method to notify the engine whether the framework will generate a semantics tree.
723-
///
724-
/// In the case where platforms want to enable semantics, e.g. when
725-
/// assistive technologies are enabled, it notifies framework through
726-
/// [onSemanticsEnabledChanged].
727-
///
728-
/// After this has been set to true, platforms are expected to prepare for accepting
729-
/// semantics update sent via [FlutterView.updateSemantics]. When this is set to false, platforms
730-
/// may dispose any resources associated with processing semantics as no further
731-
/// semantics updates will be sent via [FlutterView.updateSemantics].
732-
///
733-
/// One must call this method with true before sending update through [updateSemantics].
734-
void setSemanticsTreeEnabled(bool enabled) => _setSemanticsTreeEnabled(enabled);
735-
736-
@Native<Void Function(Bool)>(symbol: 'PlatformConfigurationNativeApi::SetSemanticsTreeEnabled')
737-
external static void _setSemanticsTreeEnabled(bool update);
738-
739719
/// Deprecated. Migrate to [ChannelBuffers.setListener] instead.
740720
///
741721
/// Called whenever this platform dispatcher receives a message from a

engine/src/flutter/lib/ui/window.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ class FlutterView {
390390

391391
/// Change the retained semantics data about this [FlutterView].
392392
///
393-
/// [PlatformDispatcher.setSemanticsTreeEnabled] must be called with true
394-
/// before sending update through this method.
393+
/// If [PlatformDispatcher.semanticsEnabled] is true, the user has requested that this function
394+
/// be called whenever the semantic content of this [FlutterView]
395+
/// changes.
395396
///
396397
/// This function disposes the given update, which means the semantics update
397398
/// cannot be used further.

engine/src/flutter/lib/ui/window/platform_configuration.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,14 +669,6 @@ void PlatformConfigurationNativeApi::UpdateSemantics(int64_t view_id,
669669
view_id, update);
670670
}
671671

672-
void PlatformConfigurationNativeApi::SetSemanticsTreeEnabled(bool enabled) {
673-
UIDartState::ThrowIfUIOperationsProhibited();
674-
UIDartState::Current()
675-
->platform_configuration()
676-
->client()
677-
->SetSemanticsTreeEnabled(enabled);
678-
}
679-
680672
Dart_Handle PlatformConfigurationNativeApi::ComputePlatformResolvedLocale(
681673
Dart_Handle supportedLocalesHandle) {
682674
UIDartState::ThrowIfUIOperationsProhibited();

engine/src/flutter/lib/ui/window/platform_configuration.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ class PlatformConfigurationClient {
9898
///
9999
virtual void UpdateSemantics(int64_t viewId, SemanticsUpdate* update) = 0;
100100

101-
//--------------------------------------------------------------------------
102-
/// @brief Notifies whether Framework starts generating semantics tree.
103-
///
104-
/// @param[in] enabled True if Framework starts generating semantics tree.
105-
///
106-
virtual void SetSemanticsTreeEnabled(bool enabled) = 0;
107-
108101
//--------------------------------------------------------------------------
109102
/// @brief When the Flutter application has a message to send to the
110103
/// underlying platform, the message needs to be forwarded to
@@ -633,8 +626,6 @@ class PlatformConfigurationNativeApi {
633626

634627
static void UpdateSemantics(int64_t viewId, SemanticsUpdate* update);
635628

636-
static void SetSemanticsTreeEnabled(bool enabled);
637-
638629
static void SetNeedsReportTimings(bool value);
639630

640631
static Dart_Handle GetPersistentIsolateData();

engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ abstract class PlatformDispatcher {
8585

8686
void scheduleWarmUpFrame({required VoidCallback beginFrame, required VoidCallback drawFrame});
8787

88-
void setSemanticsTreeEnabled(bool enabled) {}
89-
9088
AccessibilityFeatures get accessibilityFeatures;
9189

9290
VoidCallback? get onAccessibilityFeaturesChanged;

engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -709,15 +709,6 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
709709
FrameService.instance.scheduleWarmUpFrame(beginFrame: beginFrame, drawFrame: drawFrame);
710710
}
711711

712-
@override
713-
void setSemanticsTreeEnabled(bool enabled) {
714-
if (!enabled) {
715-
for (final EngineFlutterView view in views) {
716-
view.semantics.reset();
717-
}
718-
}
719-
}
720-
721712
/// Updates the application's rendering on the GPU with the newly provided
722713
/// [Scene]. This function must be called within the scope of the
723714
/// [onBeginFrame] or [onDrawFrame] callbacks being invoked. If this function

0 commit comments

Comments
 (0)