Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix PEBKAC merge error
  • Loading branch information
a-wallen committed Oct 28, 2022
commit f3cc8ef91774f28f044bfebde38555d0878b910a
10 changes: 5 additions & 5 deletions lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ abstract class FlutterView {
@FfiNative<Void Function(Pointer<Void>)>('PlatformConfigurationNativeApi::Render')
external static void _render(Scene scene);

/// Change the retained semantics data about this platform dispatcher.
/// Change the retained semantics data about this [FlutterView].
///
/// If [semanticsEnabled] is true, the user has requested that this function
/// be called whenever the semantic content of this platform dispatcher
/// If [PlatformDispatcher.semanticsEnabled] is true, the user has requested that this function
/// be called whenever the semantic content of this [FlutterView]
/// changes.
///
/// In either case, this function disposes the given update, which means the
/// semantics update cannot be used further.
/// This function disposes the given update, which means the semantics update
/// cannot be used further.
void updateSemantics(SemanticsUpdate update) => _updateSemantics(update);

@FfiNative<Void Function(Pointer<Void>)>('PlatformConfigurationNativeApi::UpdateSemantics')
Expand Down
28 changes: 0 additions & 28 deletions lib/web_ui/lib/src/engine/platform_dispatcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -690,36 +690,8 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
_onAccessibilityFeaturesChanged, _onAccessibilityFeaturesChangedZone);
}

/// Change the retained semantics data about this window.
///
/// If [semanticsEnabled] is true, the user has requested that this function
/// be called whenever the semantic content of this window changes.
///
/// In either case, this function disposes the given update, which means the
/// semantics update cannot be used further.
@override
<<<<<<< HEAD
@Deprecated('''
<<<<<<< HEAD
In a multi-view world, the platform dispatcher can no longer provide apis
to update semantics since each view will host its own semantics tree.

Semantics updates must be passed to an individual [FlutterView]. To update
semantics, use PlatformDispatcher.instance.views to get a [FlutterView] and
call `updateSemantics`.
=======
In a multi-view world, the platform dispatcher can no longer provide apis
to update semantics since each view will host its own semantics tree.

Semantics updates must be passed to an individual flutter view. To update
semantics, use PlatformDispatcher.instance.views to get a flutter view and
call `updateSemantics`.
>>>>>>> ccc5c13a67 (Deprecate `platform_dispatcher` apis in favor of updateSemantics in FlutterView)
''')
void updateSemantics(ui.SemanticsUpdate update) {
=======
void updateSemantics(ui.SemanticsUpdate update, [ui.FlutterView? view]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the base class, it was typed FlutterView instead of FlutterView? - why the difference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why do we add the view parameter here? It appears to be unused? In the future (once the web engine is actually multi-view enabled) we will likely have to add it, but since EnginePlatformDispatcher is private API we can just do that when we need it without a breaking change?

>>>>>>> 58037d36e1 (Testing this commit, will explain later)
EngineSemanticsOwner.instance.updateSemantics(update);
}

Expand Down