Skip to content
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

Properly represent block selections in UIA #4991

Merged
3 commits merged into from
Mar 18, 2020

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Mar 18, 2020

Summary of the Pull Request

Block selections were always read and displayed as line selections in UIA. This fixes that.

PR Checklist

Detailed Description of the Pull Request / Additional comments

  1. Expose IsBlockSelection() via IUiaData
  2. Update the constructor to be able to take in a block selection parameter
  3. Make ScreenInfoUiaProviders pass step 1 output into step 2 constructor
  4. Update all instances of UiaTextRange::GetTextRects() to include this new flag

Validation Steps Performed

Manually tested.
Additional tests would be redundant as GetTextRects() is tested in the text buffer.

@carlos-zamora carlos-zamora added the Area-Accessibility Issues related to accessibility label Mar 18, 2020
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

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

Looks great to me. Thanks!

@DHowett-MSFT
Copy link
Contributor

@msftbot merge this in 5 minutes

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Mar 18, 2020
@ghost
Copy link

ghost commented Mar 18, 2020

Hello @DHowett-MSFT!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Wed, 18 Mar 2020 21:03:20 GMT, which is in 5 minutes

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@ghost ghost merged commit 8627932 into master Mar 18, 2020
@ghost ghost deleted the dev/cazamor/acc/bounding-rect-refactor branch March 18, 2020 21:03
DHowett-MSFT pushed a commit that referenced this pull request Apr 14, 2020
## Summary of the Pull Request
Block selections were always read and displayed as line selections in UIA. This fixes that.

## PR Checklist
* [x] Closes #4509 

## Detailed Description of the Pull Request / Additional comments
1. Expose `IsBlockSelection()` via IUiaData
2. Update the constructor to be able to take in a block selection parameter
3. Make ScreenInfoUiaProviders pass step 1 output into step 2 constructor
4. Update all instances of `UiaTextRange::GetTextRects()` to include this new flag

## Validation Steps Performed
Manually tested.
Additional tests would be redundant as GetTextRects() is tested in the text buffer.
ghost pushed a commit that referenced this pull request Apr 17, 2020
The scroll locking rework that landed with the DxRenderer's partial
invalidation change introduced a deadlock. UIA locks the buffer for
reading before asking it to scroll (which now requires a write lock.)

Scrolling is probably _okay_ to have a little bit of torn state that
might arise from us unlocking the read lock early before triggering the
write lock down the line.

While investigating this, I also noticed that our bounding rects stopped
being viewport-relative (and were instead buffer-relative.) That
regressed with the switch to `GetTextRects` in #4991  

## PR Checklist
* [ ] Closes (issues noticed in investigating the DPI changes)
* [x] CLA signed.
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [x] Core contributor badge

## Validation Steps Performed
Manual pass with inspect.exe
@ghost
Copy link

ghost commented Apr 22, 2020

🎉Windows Terminal Preview v0.11.1121.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost ghost mentioned this pull request Apr 22, 2020
5 tasks
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UIA Providers misrepresent box selections
3 participants