-
Notifications
You must be signed in to change notification settings - Fork 6k
fix selectable text selections are not announced in voice over #24933
Conversation
| end = _node->GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd); | ||
| } | ||
| if (start == -1 && end == -1) { | ||
| return [NSValue valueWithRange:{0, 0}]; |
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.
Is the range here expected to be a zero-length range at position 0? AppKit APIs typically use NSMakeRange(NSNotFound, 0).
cbracken
left a comment
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 with two nits.
| if (start == -1 && end == -1) { | ||
| return [NSValue valueWithRange:{0, 0}]; | ||
| } | ||
| NSAssert(start >= 0 && end >= 0, @"selection is invalid"); |
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.
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.
* 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)
fixes flutter/flutter#77833
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.