File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
shell/platform/darwin/ios/framework/Source Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -763,6 +763,7 @@ class AccessibilityFeatures {
763
763
static const int _kInvertColorsIndex = 1 << 1 ;
764
764
static const int _kDisableAnimationsIndex = 1 << 2 ;
765
765
static const int _kBoldTextIndex = 1 << 3 ;
766
+ static const int _kReduceMotionIndex = 1 << 4 ;
766
767
767
768
// A bitfield which represents each enabled feature.
768
769
final int _index;
@@ -784,6 +785,12 @@ class AccessibilityFeatures {
784
785
/// Only supported on iOS.
785
786
bool get boldText => _kBoldTextIndex & _index != 0 ;
786
787
788
+ /// The platform is requesting that certain animations be simplified and
789
+ /// parallax effects removed.
790
+ ///
791
+ /// Only supported on iOS.
792
+ bool get reduceMotion => _kReduceMotionIndex & _index != 0 ;
793
+
787
794
@override
788
795
String toString () {
789
796
final List <String > features = < String > [];
@@ -795,6 +802,8 @@ class AccessibilityFeatures {
795
802
features.add ('disableAnimations' );
796
803
if (boldText)
797
804
features.add ('boldText' );
805
+ if (reduceMotion)
806
+ features.add ('reduceMotion' );
798
807
return 'AccessibilityFeatures$features ' ;
799
808
}
800
809
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ enum class AccessibilityFeatureFlag : int32_t {
31
31
kInvertColors = 1 << 1 ,
32
32
kDisableAnimations = 1 << 2 ,
33
33
kBoldText = 1 << 3 ,
34
+ kReduceMotion = 1 << 4 ,
34
35
};
35
36
36
37
class WindowClient {
Original file line number Diff line number Diff line change @@ -836,7 +836,7 @@ - (void)onAccessibilityStatusChanged:(NSNotification*)notification {
836
836
if (UIAccessibilityIsInvertColorsEnabled ())
837
837
flags ^= static_cast <int32_t >(blink::AccessibilityFeatureFlag::kInvertColors );
838
838
if (UIAccessibilityIsReduceMotionEnabled ())
839
- flags ^= static_cast <int32_t >(blink::AccessibilityFeatureFlag::kDisableAnimations );
839
+ flags ^= static_cast <int32_t >(blink::AccessibilityFeatureFlag::kReduceMotion );
840
840
if (UIAccessibilityIsBoldTextEnabled ())
841
841
flags ^= static_cast <int32_t >(blink::AccessibilityFeatureFlag::kBoldText );
842
842
#if TARGET_OS_SIMULATOR
You can’t perform that action at this time.
0 commit comments