c53fe1c2bf
## Summary of the Pull Request Follow-up for #10886. The new UIA movement tests found some failing cases. This PR fixes UiaTextRangeBase to have movement match that of MS Word. In total, this fixes 64 tests. ## PR Checklist * [X] Closes #10924 * [X] Tests added/passed ## Detailed Description of the Pull Request / Additional comments Root causes include... 1. if we were a non-degenerate range and we failed to move, we should still expand to enclose the unit 2. non-degenerate ranges are treated as if they already encompassed their given unit. - this one is a bit difficult to explain. Consider these examples: 1. document movement - state: you have a 1-cell wide range on the buffer, and you try to move by document - result: move by 0 (there is no next/prev document), but the range now encompasses the entire document 2. line movement - state: you have a 1-cell wide range on a line, and you try to move back by a line - result: you go to the previous line (not the beginning of this line) - conversely, a degenerate range successfully moves to the beginning/end of the current unit (i.e. document/line) - this (bizarre) behavior was confirmed using MS Word As a bonus, occasionally, Narrator would get stuck when navigating by line. This issue now seems to be fixed. ## Updates to existing tests - `CanMoveByCharacter` - `can't move backward from (0, 0)` --> misauthored, result should be one character wide. - `can't move past the last column in the last row` --> misauthored and already covered in generated tests - `CanMoveByLine` - `can't move backward from top row` --> misauthored, end should be on next line. Already covered by generated tests - `can't move forward from bottom row` --> misauthored, end should be on next line - `can't move backward when part of the top row is in the range` --> misauthored, should expand - `can't move forward when part of the bottom row is in the range` --> misauthored, degenerate range moves to end of buffer - `MovementAtExclusiveEnd` - populate the text buffer _before_ we do a move by word operation - update to match the now fixed behavior |
||
---|---|---|
.. | ||
inc | ||
lib | ||
ut_types | ||
CodepointWidthDetector.cpp | ||
colorTable.cpp | ||
convert.cpp | ||
dirs | ||
Environment.cpp | ||
FocusEvent.cpp | ||
GlyphWidth.cpp | ||
IBaseData.h | ||
IControlAccessibilityInfo.h | ||
IInputEvent.cpp | ||
IInputEventStreams.cpp | ||
IUiaData.h | ||
IUiaEventDispatcher.h | ||
IUiaTraceable.h | ||
KeyEvent.cpp | ||
MenuEvent.cpp | ||
ModifierKeyState.cpp | ||
MouseEvent.cpp | ||
precomp.cpp | ||
precomp.h | ||
ScreenInfoUiaProviderBase.cpp | ||
ScreenInfoUiaProviderBase.h | ||
sgrStack.cpp | ||
sources.inc | ||
TermControlUiaProvider.cpp | ||
TermControlUiaProvider.hpp | ||
TermControlUiaTextRange.cpp | ||
TermControlUiaTextRange.hpp | ||
ThemeUtils.cpp | ||
UiaTextRangeBase.cpp | ||
UiaTextRangeBase.hpp | ||
UiaTracing.cpp | ||
UiaTracing.h | ||
unicode_width_overrides.xml | ||
Utf16Parser.cpp | ||
utils.cpp | ||
viewport.cpp | ||
WindowBufferSizeEvent.cpp |