-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Move Terminal UIA provider into Types & hook it up to the WPF control #4548
Conversation
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.
This seems reasonable, but I have some minor questions and I need @carlos-zamora and @miniksa to take a good long look at it. I'll red-x for now, but I love where it's going.
2027c0a
to
9e54c16
Compare
Can someone help me with this Edit: Nevermind, figured out the issue, I had something |
I think I hit some new static analysis issues with code that wasn't covered before. |
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.
Just some comments. Looks pretty alright to me.
|
||
double HwndTerminal::GetScaleFactor() const | ||
{ | ||
return static_cast<double>(_currentDpi) / static_cast<double>(USER_DEFAULT_SCREEN_DPI); |
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.
nit: you could probably use base::ClampDiv()
here.
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.
-
I get why we moved UiaTextRange to Types. But can we keep the same name? At least to reduce merge conflicts? We can probably take on the renaming once we merge
IControlAccessibilityInfo
withUiaTextRangeBase
. -
Would you be able to just have
IControlAccessibilityInfo
needed at theScreenInfoUiaProviderBase
layer instead of theTermControlUiaProvider
?
If we keep the same name wouldn't it conflict with the names in As for the |
Ugh. Yeah. Win32 is the problem here. That'll all have to be fixed as a part of resolving the "merge |
It looks like, by rights, these issues should have tripped up SA before your PR. Hmm. |
f8710f0
to
ad7d72d
Compare
df8fcdc
to
ac4f4a1
Compare
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.
Alright, this looks good to me. Thanks so much for abstracting the things that made it TerminalControl-specific. This'll be a good platform on which we can re-merge the disparate UiaTextRangeBase derivations into a single class.
We should eventually crush together all the interfaces, where possible, but I won't ask you to do that.
virtual COORD GetFontSize() const override; | ||
virtual RECT GetBounds() const override; | ||
virtual RECT GetPadding() const override; | ||
virtual double GetScaleFactor() const override; | ||
virtual void ChangeViewport(SMALL_RECT NewWindow) override; | ||
virtual HRESULT GetHostUiaProvider(IRawElementProviderSimple** provider) override; |
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.
nit: SA would complain about the virtual
here because override
implies it
Hello @DHowett-MSFT! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
PR #4548 inadvertantly broke mouse button input in the WPF control. This happened due to the extra layer of HWND indirection. The fix is to move the mouse button handling down into the native control where the window messages are now being sent.
This PR hooks up the existing UIA implementation to the WPF control. Some existing code that was specific to the UWP terminal control could be shared so that has been refactored to a common location as well.
Validation Steps Performed
WPF control was brought up in UISpy and the UIA tree was verified. NVDA was then used to check that screen readers were operating properly.