Restore new live region announcement implementation for mshtml#11875
Merged
Conversation
LeonarddeR
commented
Nov 27, 2020
| break; | ||
| } | ||
| void MshtmlVBufStorage_controlFieldNode_t::reportLiveText(wstring& text, wstring& politeness) { | ||
| if(!all_of(text.cbegin(), text.cend(), iswspace)) { |
Collaborator
Author
There was a problem hiding this comment.
note, all_of returns true for an empty string, which is exactly what we want.
feerrenrut
approved these changes
Nov 30, 2020
| this->ariaLivePoliteness = this->ariaLiveNode->ariaLivePoliteness; | ||
| } else { | ||
| this->ariaLivePoliteness = nullptr; | ||
| this->ariaLivePoliteness = L""; |
Contributor
There was a problem hiding this comment.
Annoyingly this would have been captured by the visual studio '/analyze' option.
Collaborator
Author
There was a problem hiding this comment.
Is there a reason why we can't use this?
Contributor
There was a problem hiding this comment.
I think it was because there are too many other problems. We would either need to fix all the existing issues (which are likely false positives), or create a system to filter the noise and only show new issues.
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:
Reverts #11838
Fixes #11834
Summary of the issue:
#11838 reverted #9079 that causes a crash in mshtml documents, reproducible when pressing NVDA+F twice to open formatting info in a browseable message. I was able to pinpoint it to a needless setting of live politeness to nullptr instead of an empty string, which is the default when politeness is not set, based on the behavior of the default constructor of wstring.
Description of how this pull request fixes the issue:
Fixed the issue. Also optimized some code while at it.
Testing performed:
Opening a browseable message by pressing NVDA+F twice in a document.
Known issues with pull request:
None known
Change log entry:
In pr
Secti