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

Conversation

@chunhtai
Copy link
Contributor

fixes flutter/flutter#77833

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.
  • The reviewer has submitted any presubmit flakes in this PR using the engine presubmit flakes form before re-triggering the failure.

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

@google-cla google-cla bot added the cla: yes label Mar 10, 2021
@chunhtai chunhtai changed the title fix selectable test selections are not announced in voice over fix selectable text selections are not announced in voice over Mar 11, 2021
@chunhtai chunhtai marked this pull request as ready for review March 11, 2021 19:17
@chunhtai chunhtai requested a review from cbracken March 11, 2021 19:17
end = _node->GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd);
}
if (start == -1 && end == -1) {
return [NSValue valueWithRange:{0, 0}];
Copy link
Member

@cbracken cbracken Mar 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the range here expected to be a zero-length range at position 0? AppKit APIs typically use NSMakeRange(NSNotFound, 0).

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with two nits.

if (start == -1 && end == -1) {
return [NSValue valueWithRange:{0, 0}];
}
NSAssert(start >= 0 && end >= 0, @"selection is invalid");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move this check right above the preceding block and check for both >= 0 or both < 0 to declare the invariant you expect at the first moment it should hold, then change this check to an || bailout. In practice, it probably doesn't matter since IIRC we don't set NS_BLOCK_ASSERTIONS in our release build config.

@chunhtai chunhtai added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Mar 15, 2021
@fluttergithubbot fluttergithubbot merged commit aa83691 into flutter:master Mar 15, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 16, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 16, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 16, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 16, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 16, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Mar 16, 2021
* b2d02f7 Roll Fuchsia Linux SDK from GsRYVri0-... to aRqEDMjwC... (flutter/engine#24990)

* 3a1a3e6 Roll Skia from 7854da39b3c1 to 4fb13e026b6b (20 revisions) (flutter/engine#24993)

* e3a84f9 Fixed issue where the gpu disable syncswitch was being overridden after init. (flutter/engine#24958)

* aa83691 fix selectable text selections are not announced in voice over (flutter/engine#24933)

* 04b0451 fixes reference retaining issue in flutter text input plugin (flutter/engine#24768)

* 1ea7dc6 Set automatic simulator rotation in scenario test (flutter/engine#24985)

* 38977a5 Implement AXPlatformNodeBase::GetInstanceCountForTesting (flutter/engine#24999)

* a25b0de Roll Fuchsia Mac SDK from xOxFrRRO6... to pmsuWkRQA... (flutter/engine#24997)

* 3270c87 Roll Skia from 4fb13e026b6b to 1aa25c3217b6 (25 revisions) (flutter/engine#25001)

* 96d5104 [deferred components] Handle base module loading units (flutter/engine#24983)

* 6a3d8c7 Roll Skia from 1aa25c3217b6 to ead52dc068d5 (1 revision) (flutter/engine#25005)

* 0f52360 Hardware Keyboard: macOS (flutter/engine#23469)
hjfreyer pushed a commit to hjfreyer/engine that referenced this pull request Mar 22, 2021
chriscraws pushed a commit to chriscraws/engine that referenced this pull request Mar 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS] selectable text does not announce the selection correctly in voice over

3 participants