-
Notifications
You must be signed in to change notification settings - Fork 1k
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 to use Cswin32 IAccessible #10479
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.
Few initial comments, spoke offline.
src/System.Windows.Forms.Primitives/src/Windows/Win32/System/Com/ComSafeArrayScopeExtensions.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Accessibility/AccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Accessibility/AccessibleObject.cs
Outdated
Show resolved
Hide resolved
{ | ||
RuntimeTypeHandle type = GetType().TypeHandle; | ||
return type.Equals(typeof(AccessibleObject).TypeHandle) | ||
|| type.GetModuleHandle().Equals(typeof(AccessibleObject).TypeHandle.GetModuleHandle()); |
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.
One could also check the string name of the module against the known name of the design assembly if that helps.
src/System.Windows.Forms/src/System/Windows/Forms/Accessibility/AccessibleObject.cs
Outdated
Show resolved
Hide resolved
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.
Very nice! Added a few comments.
...ows.Forms/src/System/Windows/Forms/Controls/Buttons/ButtonBase.ButtonBaseAccessibleObject.cs
Outdated
Show resolved
Hide resolved
...Controls/DataGridView/DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs
Outdated
Show resolved
Hide resolved
...Controls/DataGridView/DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs
Outdated
Show resolved
Hide resolved
...orms/Controls/PropertyGrid/PropertyGridInternal/CommandsPane.CommandsPaneAccessibleObject.cs
Outdated
Show resolved
Hide resolved
...s/Forms/Controls/PropertyGrid/PropertyGridToolStrip.PropertyGridToolStripAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Accessibility/AccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/Accessibility/AccessibleObject.cs
Outdated
Show resolved
Hide resolved
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.
Awesome work, @lonitra!
Related: #9795
IAccessibleEx
andILegacyIAccessibleProvider
to Cswin32 definition in dedicated commitsCanXDirectly
> Determines whether native type should be grabbed directly since it avoids new allocationsGetXInternal()
> Grabs the native type of interestThe idea is that our internal objects should not need to move between native and managed types so much. They should use the native types all the way through if they can. Objects that overrides our public facing IAccessible properties/methods (e.g.
Parent
, GetSelected()`) need to be checked for whether they are subclassed, if they are not then this is another chance where we can avoid allocations by using the optimized path (native types).IManagedWrapper
to AccessibleObjectMicrosoft Reviewers: Open in CodeFlow