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

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Apr 4, 2022

Removes the Index suffix from kMoveCursorForwardByWord and
kMoveCursorBackwardByWord values in the SemanticsAction enum. These were
erroneously copied as-is from the private class members in the dart:ui
implementation in lib/ui/semantics/semantics.dart where the class
members refer to the enum index here. This removes the trailing Index
for consistency with the other enum members here.

This is also useful in the context of automated testing for API
consistency between these enums, the ones in dart:ui (native and web
implementations) and the embedder API.

Issue: flutter/flutter#101217

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Removes the `Index` suffix from kMoveCursorForwardByWord and
kMoveCursorBackwardByWord values in the SemanticsAction enum. These were
erroneously copied as-is from the private class members in the dart:ui
implementation in lib/ui/semantics/semantics.dart where the class
members refer to the enum index here. This removes the trailing `Index`
for consistency with the other enum members here.

This is also useful in the context of automated testing for API
consistency between these enums, the ones in dart:ui (native and web
implementations) and the embedder API.

Issue: flutter/flutter#101217
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@cbracken
Copy link
Member Author

cbracken commented Apr 4, 2022

No tests since this is just a renaming of a private API. Test will be added in flutter/flutter#101217 which this is pre-factoring for.

Verified offline with @lucasradaelli that the string change is safe for Fuchsia.

@cbracken
Copy link
Member Author

cbracken commented Apr 4, 2022

One might ask who was the one who erroneously added this with Index on the end... let's just say this fix has no effect on the author listed on the blame for those lines.

@cbracken cbracken merged commit 7e5989b into flutter:main Apr 5, 2022
@cbracken cbracken deleted the enum-consistency branch April 5, 2022 00:07
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2022
zanderso pushed a commit to flutter/flutter that referenced this pull request Apr 5, 2022
* 9b3117a Create `ImageFilter.dilate`/`ImageFilter.erode` (flutter/engine#32334)

* 92a6ade Roll Fuchsia Mac SDK from m_-rjFvCk... to hJaq9O7XI... (flutter/engine#32402)

* 31fd1bb Roll Fuchsia Linux SDK from 5abhmXb9Q... to WdxX5Sqix... (flutter/engine#32403)

* f088801 Roll Skia from 5215ec1ab9cd to fd9c66e18030 (1 revision) (flutter/engine#32406)

* ac21195 Fix inconsistent enum/class private member naming (flutter/engine#32409)

* 75e7cfd Fix deltas when selection is active and composing begins on MacOS (flutter/engine#32412)

* 7e5989b Fix SemanticsAction naming consistency (flutter/engine#32411)

* 1b3e9dc Fix a crash when setting clipboardData to null on iOS (flutter/engine#32413)

* ef50b28 Roll Fuchsia Linux SDK from WdxX5Sqix... to PmeDIogNb... (flutter/engine#32422)

* b48d65e Roll Fuchsia Mac SDK from hJaq9O7XI... to WBAQhRswX... (flutter/engine#32423)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants