-
Notifications
You must be signed in to change notification settings - Fork 962
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
Fix ANE in the "ListViewSubItemAccessibleObjectin " constructor #4744
Fix ANE in the "ListViewSubItemAccessibleObjectin " constructor #4744
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4744 +/- ##
===================================================
+ Coverage 97.96231% 97.96348% +0.00117%
===================================================
Files 547 547
Lines 266036 266189 +153
Branches 5109 5109
===================================================
+ Hits 260615 260768 +153
Misses 4531 4531
Partials 890 890
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
👍 with a small suggestion
src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ListViewSubItemCollectionTests.cs
Outdated
Show resolved
Hide resolved
a196638
to
55d9f02
Compare
src/System.Windows.Forms/src/System/Windows/Forms/ListViewItem.ListViewSubItemCollection.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/ListViewItem.ListViewSubItemCollection.cs
Outdated
Show resolved
Hide resolved
… ArgumentNullException dotnet#4742 The problem is reproduced because when getting an accessibility object for a ListViewSubItem, the ListViewSubItem may not have an owner. This is because we have several ways to create and add an unowned ListViewSubItem to an ListViewItem. Added missing logic for adding and removing owner. Added/updated unit tests
55d9f02
to
d8fde13
Compare
…et#4744) Added missing logic for adding and removing owner. The problem is reproduced because when getting an accessibility object for a ListViewSubItem, the ListViewSubItem may not have an owner. This is because we have several ways to create and add an unowned ListViewSubItem to an ListViewItem. Added/updated unit tests
… (#4764) Added missing logic for adding and removing owner. The problem is reproduced because when getting an accessibility object for a ListViewSubItem, the ListViewSubItem may not have an owner. This is because we have several ways to create and add an unowned ListViewSubItem to an ListViewItem. Added/updated unit tests
Fixes #4742
Proposed changes
ListViewSubItem
, theListViewSubItem
may not have an owner. This is because we have several ways to create and add an unownedListViewSubItem
to anListViewItem
.Customer Impact
An app crash upon clicking on a listview subitem.
Before fix:
![Issue-4742-BeforeFix](https://user-images.githubusercontent.com/23376742/113000113-34086300-9178-11eb-8378-4990c11449c8.gif)
After fix:
![Issue-4742-AfterFix](https://user-images.githubusercontent.com/23376742/113000176-3f5b8e80-9178-11eb-88d6-23780f2697b3.gif)
Regression?
Risk
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow