-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Reland (#167738) but with some flags updated to use enum #170505
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
Merged
auto-submit
merged 7 commits into
flutter:master
from
hannah-hyj:semanticsflags-embedder-2
Jun 13, 2025
Merged
Reland (#167738) but with some flags updated to use enum #170505
auto-submit
merged 7 commits into
flutter:master
from
hannah-hyj:semanticsflags-embedder-2
Jun 13, 2025
+363
−110
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
issue: flutter#166101, overall goal is to update semantics flag to be a struct/class to support more than 32 flags. step 1: flutter#167421 updated semantics_node.h and dart:ui step 2(this PR): Update Embedder part to use a struct instead of a int bit mask. step 3: flutter#167771 Update Framework use the SemanticsFlags class instead of bitmask step 4 flutter#168852 Update web engine to use the new class and update SemanticsUpdateBuilder.updateNode to pass the new class instead of bitmask ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Chris Bracken <[email protected]> Co-authored-by: Loïc Sharma <[email protected]>
004f39e
to
b600529
Compare
Update embedder.h 1
b600529
to
53b72ee
Compare
loic-sharma
reviewed
Jun 12, 2025
engine/src/flutter/shell/platform/embedder/embedder_semantics_update.cc
Outdated
Show resolved
Hide resolved
loic-sharma
reviewed
Jun 12, 2025
loic-sharma
reviewed
Jun 12, 2025
engine/src/flutter/shell/platform/common/accessibility_bridge.cc
Outdated
Show resolved
Hide resolved
loic-sharma
reviewed
Jun 12, 2025
engine/src/flutter/shell/platform/embedder/embedder_semantics_update.cc
Outdated
Show resolved
Hide resolved
loic-sharma
approved these changes
Jun 12, 2025
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.
Thanks for doing this, it's a nice improvement! :)
…update.cc Co-authored-by: Loïc Sharma <[email protected]>
…update.cc Co-authored-by: Loïc Sharma <[email protected]>
…update.cc Co-authored-by: Loïc Sharma <[email protected]>
lint
chunhtai
approved these changes
Jun 12, 2025
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
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jun 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jun 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jun 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: accessibility
Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)
a: desktop
Running on desktop
engine
flutter/engine repository. See also e: labels.
platform-linux
Building on or for Linux specifically
platform-macos
platform-windows
Building on or for Windows specifically
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reland (#167738) : [a11y] Semantics flag refactor step 2: embedder part with some updates
The original PR was reverted because the changes to embedder should be in one PR to avoid introducing breaking changes.
This PR contains 2 commits, one commit of re-landing #167738 and one commit of new enum updates.
new Updates :
Add new enum FlutterTristate and FlutterCheckState in embedder.h for 7 flags.
For CheckState, it used to use 3 bools (hasCheck, isChecked, isCheckStateMixed) to represent check states, replace them with a FlutterCheckState enum.
For other 6 flags, each has 2 bools (hasXXState and isXX), replace them with a FlutterTristate enum.
TODO:
Will also update these flags in dart:ui and framework to be tristate too in another PR, this PR is only for embedder.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.