-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Revert "Remove most uses of CompareInBounds
(#13244)"
#13907
Conversation
This reverts commit f785168.
FYI @DHowett |
thanks a lot @carlos-zamora! What would be the best way to test this? |
@LeonarddeR The simplest way that I've found to test terminal PRs:
|
@carlos-zamora moving the cursor around in a WSL |
Wait, but how am I supposed to remove the To be precise, I don't see how this bufferSize.CompareInBounds(A, B, true) <=> 0 is any different mathematically from this A <=> B since both do the exact same thing. |
Replacing The regression was mainly caused by the |
@msftbot merge this in 10 minutes |
Hello @carlos-zamora! 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:
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". |
This reverts commit f785168 (PR #13244) The error logged to NVDA was caused by the following line of code in `_getTextValue()`: `THROW_HR_IF(E_FAIL, !bufferSize.IsInBounds(_start) || !bufferSize.IsInBounds(_end));` NVDA would expand a text range to encompass the document in the alt buffer. This means that the "end" would be set to the dangling "endExclusive" point (x = left, y = one past the end of the buffer). This is a valid range! However, upon extracting the text, we would hit the code above. The exclusive end doesn't actually point to anything in the buffer, so we would falsly throw `E_FAIL`. Though this could be fixed by adding a special check for the `endExclusive` in the line above, I suspect there are other places throughout the UIA code that hit this problem too. The safest course of action is to revert this commit entirely since it was a code health commit (it doesn't actually close an issue). Closes #13866 (cherry picked from commit bfd5248) Service-Card-Id: 85405833 Service-Version: 1.15
🎉 Handy links: |
🎉 Handy links: |
This reverts commit f785168 (PR #13244)
The error logged to NVDA was caused by the following line of code in
_getTextValue()
:THROW_HR_IF(E_FAIL, !bufferSize.IsInBounds(_start) || !bufferSize.IsInBounds(_end));
NVDA would expand a text range to encompass the document in the alt buffer. This means that the "end" would be set to the dangling "endExclusive" point (x = left, y = one past the end of the buffer). This is a valid range!
However, upon extracting the text, we would hit the code above. The exclusive end doesn't actually point to anything in the buffer, so we would falsly throw
E_FAIL
.Though this could be fixed by adding a special check for the
endExclusive
in the line above, I suspect there are other places throughout the UIA code that hit this problem too. The safest course of action is to revert this commit entirely since it was a code health commit (it doesn't actually close an issue).Closes #13866