-
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
Accessibility: Refactor Providers #2414
Conversation
3b39fe9
to
1bf9a38
Compare
return E_OUTOFMEMORY; | ||
} | ||
|
||
#if defined(_DEBUG) && defined(UiaTextRangeBase_DEBUG_MSGS) |
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.
? did you add this?
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.
Nope. There's a bunch of these in UiaTextRangeBase
. Should I move the tracing and debugging stuff to UiaTextRangeBase
and have the UiaTextRange
implementations call that at the end?
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.
Yea I want some answers to these questions before I sign off
UiaTextRange now has a com_ptr reference to its parent ScreenInfoUiaProvider's CreateUTRs and GetSelectionRangeUTRs got renamed WindowUiaProvider TODO comment fixes + remove layering violation
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.
Overall much happier with this. Did we ever figure out why there were all those mysterious extra AddRef
/ Release
s? I'm a little worried they're being removed if we didn't understand fully why they were there originally. If they were there originally completely as an oversight and should never have been, the no worries.
Originally, we were manually keeping track of the refs. @DHowett-MSFT suggests that we should switch over to |
Fix merge conflicts regarding refacroting of IRenderData # Conflicts: # src/cascadia/TerminalControl/TermControlAutomationPeer.cpp # src/cascadia/TerminalCore/Terminal.hpp # src/cascadia/TerminalCore/terminalrenderdata.cpp # src/host/renderData.cpp # src/host/renderData.hpp # src/interactivity/win32/ut_interactivity_win32/UiaTextRangeTests.cpp # src/interactivity/win32/windowUiaProvider.cpp # src/renderer/inc/IRenderData.hpp # src/types/ScreenInfoUiaProviderBase.cpp # src/types/ScreenInfoUiaProviderBase.h # src/types/UiaTextRangeBase.cpp # src/types/UiaTextRangeBase.hpp
- RETURN_HR_IF(E_INVALIDARG, ppProvider == nullptr) checks
I trust the Mikes more than myself here.
Summary of the Pull Request
Refactors the accessibility providers (
ScreenInfoUiaProvider
andUiaTextRange
) into a better separated model between ConHost and Windows Terminal.ScreenInfoUiaProviderBase
andUiaTextRangeBase
are introduced. ConHost and Windows Terminal implement their own versions ofScreenInfoUiaProvider
andUiaTextRange
that inherit from their respective base classes.References
PR Checklist
Tests added/passedold tests still validRequires documentation to be updatedN/ADetailed Description of the Pull Request / Additional comments
Types
now hasScreenInfoUiaProviderBase
andUiaTextRangeBase
to allow for shared codeUiaTextRange
Create
s are used to properly create itselfChangeViewport
,TranslatePointToScreen
, andTranslatePointFromScreen
are unique to CH vs WT (helper functions)Clone
andFindText
are unique to CH vs WT (public interactions)ScreenInfoUiaProvider
CreateUTR
s are used to properly createUiaTextRanges
Navigate
,get_BoundingRectangle
, andget_FragmentRoot
are unique to CH vs WTNow that we know if we're calling
FindText
from WT or CH, we don't need it in IRenderData. So that got moved.🚨NOTE: There will be some conflicts with #2296. Notably, the issue mentioned above. resolving that merge conflict will be pretty easy though.
Validation Steps Performed
Used inspect on ConHost and WT. Bounding rects still appear as expected in each model