Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 0 additions & 3 deletions packages/flutter/lib/src/rendering/custom_paint.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,6 @@ class RenderCustomPaint extends RenderProxyBox {
if (config.validationResult != properties.validationResult) {
config.validationResult = properties.validationResult;
}
if (properties.hitTestBehavior != null) {
config.hitTestBehavior = properties.hitTestBehavior!;
}
if (properties.inputType != null) {
config.inputType = properties.inputType!;
}
Expand Down
4 changes: 0 additions & 4 deletions packages/flutter/lib/src/rendering/object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4940,10 +4940,6 @@ mixin SemanticsAnnotationsMixin on RenderObject {
config.validationResult = _properties.validationResult;
}

if (_properties.hitTestBehavior != null) {
config.hitTestBehavior = _properties.hitTestBehavior!;
}

if (_properties.inputType != null) {
config.inputType = _properties.inputType!;
}
Expand Down
51 changes: 4 additions & 47 deletions packages/flutter/lib/src/semantics/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import 'dart:ui'
StringAttribute,
TextDirection,
Tristate;
import 'dart:ui' as ui show SemanticsHitTestBehavior;

import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart';
Expand Down Expand Up @@ -1021,7 +1020,6 @@ class SemanticsData with Diagnosticable {
required this.role,
required this.controlsNodes,
required this.validationResult,
required this.hitTestBehavior,
required this.inputType,
required this.locale,
this.tags,
Expand Down Expand Up @@ -1290,9 +1288,6 @@ class SemanticsData with Diagnosticable {
/// {@macro flutter.semantics.SemanticsProperties.validationResult}
final SemanticsValidationResult validationResult;

/// {@macro flutter.semantics.SemanticsProperties.hitTestBehavior}
final ui.SemanticsHitTestBehavior hitTestBehavior;

/// {@macro flutter.semantics.SemanticsNode.inputType}
final SemanticsInputType inputType;

Expand Down Expand Up @@ -1420,7 +1415,6 @@ class SemanticsData with Diagnosticable {
other.role == role &&
other.validationResult == validationResult &&
other.inputType == inputType &&
other.hitTestBehavior == hitTestBehavior &&
_sortedListsEqual(other.customSemanticsActionIds, customSemanticsActionIds) &&
setEquals<String>(controlsNodes, other.controlsNodes);
}
Expand Down Expand Up @@ -1457,7 +1451,8 @@ class SemanticsData with Diagnosticable {
validationResult,
controlsNodes == null ? null : Object.hashAll(controlsNodes!),
inputType,
hitTestBehavior,
traversalParentIdentifier,
traversalChildIdentifier,
),
);

Expand Down Expand Up @@ -1616,7 +1611,6 @@ class SemanticsProperties extends DiagnosticableTree {
this.controlsNodes,
this.inputType,
this.validationResult = SemanticsValidationResult.none,
this.hitTestBehavior,
this.onTap,
this.onLongPress,
this.onScrollLeft,
Expand Down Expand Up @@ -2561,13 +2555,6 @@ class SemanticsProperties extends DiagnosticableTree {
/// {@endtemplate}
final SemanticsValidationResult validationResult;

/// {@template flutter.semantics.SemanticsProperties.hitTestBehavior}
/// Describes how the semantic node should behave during hit testing.
///
/// See [ui.SemanticsHitTestBehavior] for more details.
/// {@endtemplate}
final ui.SemanticsHitTestBehavior? hitTestBehavior;

/// {@template flutter.semantics.SemanticsProperties.inputType}
/// The input type for of a editable widget.
///
Expand Down Expand Up @@ -3240,8 +3227,7 @@ class SemanticsNode with DiagnosticableTreeMixin {
_headingLevel != config._headingLevel ||
_linkUrl != config._linkUrl ||
_role != config.role ||
_validationResult != config.validationResult ||
_hitTestBehavior != config.hitTestBehavior;
_validationResult != config.validationResult;
}

// TAGS, LABELS, ACTIONS
Expand Down Expand Up @@ -3535,10 +3521,6 @@ class SemanticsNode with DiagnosticableTreeMixin {
SemanticsValidationResult get validationResult => _validationResult;
SemanticsValidationResult _validationResult = _kEmptyConfig.validationResult;

/// {@macro flutter.semantics.SemanticsProperties.hitTestBehavior}
ui.SemanticsHitTestBehavior get hitTestBehavior => _hitTestBehavior;
ui.SemanticsHitTestBehavior _hitTestBehavior = ui.SemanticsHitTestBehavior.defer;

/// {@template flutter.semantics.SemanticsNode.inputType}
/// The input type for of a editable node.
///
Expand Down Expand Up @@ -3619,7 +3601,6 @@ class SemanticsNode with DiagnosticableTreeMixin {
_role = config._role;
_controlsNodes = config._controlsNodes;
_validationResult = config._validationResult;
_hitTestBehavior = config._hitTestBehavior;
_inputType = config._inputType;
_locale = config.locale;

Expand Down Expand Up @@ -3674,7 +3655,6 @@ class SemanticsNode with DiagnosticableTreeMixin {
SemanticsRole role = _role;
Set<String>? controlsNodes = _controlsNodes;
SemanticsValidationResult validationResult = _validationResult;
ui.SemanticsHitTestBehavior hitTestBehavior = _hitTestBehavior;
SemanticsInputType inputType = _inputType;
final Locale? locale = _locale;
final Set<int> customSemanticsActionIds = <int>{};
Expand Down Expand Up @@ -3739,10 +3719,6 @@ class SemanticsNode with DiagnosticableTreeMixin {
if (inputType == SemanticsInputType.none) {
inputType = node._inputType;
}
if (hitTestBehavior == ui.SemanticsHitTestBehavior.defer &&
node._hitTestBehavior != ui.SemanticsHitTestBehavior.defer) {
hitTestBehavior = node._hitTestBehavior;
}
if (tooltip == '') {
tooltip = node._tooltip;
}
Expand Down Expand Up @@ -3834,7 +3810,6 @@ class SemanticsNode with DiagnosticableTreeMixin {
role: role,
controlsNodes: controlsNodes,
validationResult: validationResult,
hitTestBehavior: hitTestBehavior,
inputType: inputType,
locale: locale,
);
Expand Down Expand Up @@ -4026,7 +4001,6 @@ class SemanticsNode with DiagnosticableTreeMixin {
role: data.role,
controlsNodes: data.controlsNodes?.toList(),
validationResult: data.validationResult,
hitTestBehavior: data.hitTestBehavior,
inputType: data.inputType,
locale: data.locale,
);
Expand Down Expand Up @@ -6452,14 +6426,6 @@ class SemanticsConfiguration {
_hasBeenAnnotated = true;
}

/// {@macro flutter.semantics.SemanticsProperties.hitTestBehavior}
ui.SemanticsHitTestBehavior get hitTestBehavior => _hitTestBehavior;
ui.SemanticsHitTestBehavior _hitTestBehavior = ui.SemanticsHitTestBehavior.defer;
set hitTestBehavior(ui.SemanticsHitTestBehavior value) {
_hitTestBehavior = value;
_hasBeenAnnotated = true;
}

/// {@macro flutter.semantics.SemanticsProperties.inputType}
SemanticsInputType get inputType => _inputType;
SemanticsInputType _inputType = SemanticsInputType.none;
Expand Down Expand Up @@ -6568,10 +6534,6 @@ class SemanticsConfiguration {
if (_hasExplicitRole && other._hasExplicitRole) {
return false;
}
if (_hitTestBehavior != ui.SemanticsHitTestBehavior.defer ||
other._hitTestBehavior != ui.SemanticsHitTestBehavior.defer) {
return false;
}
return true;
}

Expand Down Expand Up @@ -6682,10 +6644,6 @@ class SemanticsConfiguration {
child._accessiblityFocusBlockType,
);

if (_hitTestBehavior == ui.SemanticsHitTestBehavior.defer) {
_hitTestBehavior = child._hitTestBehavior;
}

_hasBeenAnnotated = hasBeenAnnotated || child.hasBeenAnnotated;
}

Expand Down Expand Up @@ -6731,8 +6689,7 @@ class SemanticsConfiguration {
.._role = _role
.._controlsNodes = _controlsNodes
.._validationResult = _validationResult
.._inputType = _inputType
.._hitTestBehavior = _hitTestBehavior;
.._inputType = _inputType;
}
}

Expand Down
8 changes: 1 addition & 7 deletions packages/flutter/lib/src/widgets/basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
library;

import 'dart:math' as math;
import 'dart:ui'
as ui
show Image, ImageFilter, SemanticsHitTestBehavior, SemanticsInputType, TextHeightBehavior;
import 'dart:ui' as ui show Image, ImageFilter, SemanticsInputType, TextHeightBehavior;

import 'package:flutter/animation.dart';
import 'package:flutter/foundation.dart';
Expand Down Expand Up @@ -4050,7 +4048,6 @@ sealed class _SemanticsBase extends SingleChildRenderObjectWidget {
required SemanticsRole? role,
required Set<String>? controlsNodes,
required SemanticsValidationResult validationResult,
required ui.SemanticsHitTestBehavior? hitTestBehavior,
required ui.SemanticsInputType? inputType,
required Locale? localeForSubtree,
}) : this.fromProperties(
Expand Down Expand Up @@ -4136,7 +4133,6 @@ sealed class _SemanticsBase extends SingleChildRenderObjectWidget {
role: role,
controlsNodes: controlsNodes,
validationResult: validationResult,
hitTestBehavior: hitTestBehavior,
inputType: inputType,
),
);
Expand Down Expand Up @@ -4386,7 +4382,6 @@ class SliverSemantics extends _SemanticsBase {
super.role,
super.controlsNodes,
super.validationResult = SemanticsValidationResult.none,
super.hitTestBehavior,
super.inputType,
super.localeForSubtree,
}) : super(child: sliver);
Expand Down Expand Up @@ -7969,7 +7964,6 @@ class Semantics extends _SemanticsBase {
super.role,
super.controlsNodes,
super.validationResult = SemanticsValidationResult.none,
super.hitTestBehavior,
super.inputType,
super.localeForSubtree,
});
Expand Down
1 change: 0 additions & 1 deletion packages/flutter/lib/src/widgets/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,6 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
// To be sorted before the _modalBarrier.
return _modalScopeCache ??= Semantics(
sortKey: const OrdinalSortKey(0.0),
hitTestBehavior: ui.SemanticsHitTestBehavior.opaque,
child: _ModalScope<T>(
key: _scopeKey,
route: this,
Expand Down
Loading
Loading