vbuf backend: If a node has been marked allowReuseInAncestorUpdate, ensure we propagate alwaysRerenderDescendants if appropriate before returning.#14269
Merged
Conversation
Contributor
Author
|
It's also worth noting that a stale NVDA vbuf tree can potentially lead to crashes or infinite loops, since accessible ids can eventually be reused and we might end up reusing a subtree which creates a loop in the tree. There are several bugs about crashes and freezes in NVDA vbuf code; https://bugzilla.mozilla.org/show_bug.cgi?id=1786676, https://bugzilla.mozilla.org/show_bug.cgi?id=1737688, https://bugzilla.mozilla.org/show_bug.cgi?id=1691928, #13540. |
seanbudd
reviewed
Oct 18, 2022
…nsure we propagate alwaysRerenderDescendants if appropriate before returning. Previously, the check for allowReuseInAncestorUpdate was before alwaysRerenderDescendants. This meant that if the node had allowReuseInAncestorUpdate and its parent had alwaysRerenderDescendants, we wouldn't propagate alwaysRerenderDescendants down the tree. That meant that we might not pick up changes in a subtree which was moved at the same time as descendants were mutated. This caused intermittent broken controls and other weirdness on GitHub issue pages.
7a18fb5 to
62f07ac
Compare
See test results for failed build of commit 94b71b27a4 |
michaelDCurran
approved these changes
Oct 19, 2022
michaelDCurran
left a comment
Member
There was a problem hiding this comment.
This logic looks correct to me.
I'll still leave this to @seanbudd to approve and merge if he is happy.
Member
|
For reference, some examples where alwaysRerenderDescendants is set to true are:
|
seanbudd
approved these changes
Oct 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None.
Summary of the issue:
With the Firefox accessibility cache enabled, the "Show options" button above GitHub issue comments sometimes doesn't render correctly in browse mode. Pressing enter on it won't open the menu. Sometimes, completely irrelevant text (potentially even from other tabs) gets rendered instead of that button.
Description of user facing changes
Fixes the above issues.
Description of development approach
Previously, the vbuf backend check for allowReuseInAncestorUpdate was before alwaysRerenderDescendants. This meant that if the node had allowReuseInAncestorUpdate and its parent had alwaysRerenderDescendants, we wouldn't propagate alwaysRerenderDescendants down the tree. That meant that we might not pick up changes in a subtree which was moved at the same time as descendants were mutated. I fixed this by moving the check and propagation of alwaysRerenderDescendants before the allowReuseInAncestorUpdate check.
This still results in an early null return. It just ensures we propagate alwaysRerenderDescendants before we do.
Testing strategy:
Notes:
Known issues with pull request:
None known.
Change log entries:
Bug fixes
In Firefox, activating the Show options button on GitHub issue pages now works reliably.
Code Review Checklist: