-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set and unset accessibility flags even when re-entrant #6853
Conversation
Took a quick look at the iOS side and noticed a similar issue - these methods can be called where enabled is true both times for a given feature, so we should avoid using XOR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flags ^= static_cast<int32_t>(blink::AccessibilityFeatureFlag::kReduceMotion); | ||
if (UIAccessibilityIsBoldTextEnabled()) | ||
flags ^= static_cast<int32_t>(blink::AccessibilityFeatureFlag::kBoldText); | ||
if (UIAccessibilityIsInvertColorsEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary, flags is built up from 0 every time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I missed that. I'm still inclined to change these all to |=
as we don't actually want these to toggle, we just want to set them. Sound good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
flutter/engine@b10b8e8...114d33d git log b10b8e8..114d33d --no-merges --oneline 114d33d Set and unset accessibility flags even when re-entrant (flutter/engine#6853) 396402f Flush UserSettings to window (flutter/engine#6850) 1e7e676 Remove unused import (flutter/engine#6854) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
Using
^=
was toggling these instead of setting them when they're enabled - this caused part of what is noted in flutter/flutter#20388, but I'd like to leave that bug open even if this lands - I suspect that we should be resetting some internal state of the a11y bridges that we're not, but need to confirm./cc @matthew-carroll in case this impacts the embedding refactor