Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add missing kHasImplicitScrolling enum value #8030

Merged
merged 1 commit into from
Mar 5, 2019
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
11 changes: 6 additions & 5 deletions lib/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ class SemanticsAction {

/// A Boolean value that can be associated with a semantics node.
//
// When changes are made to this class, the equivalent APIs in each of the
// embedders *must* be updated.
// When changes are made to this class, the equivalent APIs in
// `lib/ui/semantics/semantics_node.h` and in each of the embedders *must* be
// updated.
class SemanticsFlag {
static const int _kHasCheckedStateIndex = 1 << 0;
static const int _kIsCheckedIndex = 1 << 1;
Expand Down Expand Up @@ -476,9 +477,9 @@ class SemanticsFlag {
/// to move focus to an offscreen child.
///
/// For example, a [ListView] widget has implicit scrolling so that users can
/// easily move to the next visible set of children. A [TabBar] widget does
/// not have implicit scrolling, so that users can navigate into the tab
/// body when reaching the end of the tab bar.
/// easily move the accessibility focus to the next set of children. A
/// [PageView] widget does not have implicit scrolling, so that users don't
/// navigate to the next page when reaching the end of the current one.
static const SemanticsFlag hasImplicitScrolling = const SemanticsFlag._(_kHasImplicitScrollingIndex);

/// The possible semantics flags.
Expand Down
1 change: 1 addition & 0 deletions lib/ui/semantics/semantics_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ enum class SemanticsFlags : int32_t {
kIsLiveRegion = 1 << 15,
kHasToggledState = 1 << 16,
kIsToggled = 1 << 17,
kHasImplicitScrolling = 1 << 18,
};

struct SemanticsNode {
Expand Down
8 changes: 8 additions & 0 deletions shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ typedef enum {
kFlutterSemanticsFlagHasToggledState = 1 << 16,
// If true, the semantics node is "on". If false, the semantics node is "off".
kFlutterSemanticsFlagIsToggled = 1 << 17,
// Whether the platform can scroll the semantics node when the user attempts
// to move the accessibility focus to an offscreen child.
//
// For example, a |ListView| widget has implicit scrolling so that users can
// easily move the accessibility focus to the next set of children. A
// |PageView| widget does not have implicit scrolling, so that users don't
// navigate to the next page when reaching the end of the current one.
kFlutterSemanticsFlagHasImplicitScrolling = 1 << 18,
} FlutterSemanticsFlag;

typedef enum {
Expand Down