Bug 1474814: Invalidate the AccessibleHandler cache on focus events. r?MarcoZ
We don't fire a state change for the focused state, since that would be redundant given that we fire a focus event.
However, that also means the handler cache previously didn't get invalidated when there was a focus change without any other update.
That resulted in stale focused states, which could mean an object was exposed as focused when it wasn't.
Invalidating the cache for focus events ensures the focused state is always up to date.
MozReview-Commit-ID: DZTJMbiTwgt
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -1170,16 +1170,17 @@ IsHandlerInvalidationNeeded(uint32_t aEv
// We want to return true for any events that would indicate that something
// in the handler cache is out of date.
switch (aEvent) {
case EVENT_OBJECT_STATECHANGE:
case EVENT_OBJECT_LOCATIONCHANGE:
case EVENT_OBJECT_NAMECHANGE:
case EVENT_OBJECT_DESCRIPTIONCHANGE:
case EVENT_OBJECT_VALUECHANGE:
+ case EVENT_OBJECT_FOCUS:
case IA2_EVENT_ACTION_CHANGED:
case IA2_EVENT_DOCUMENT_LOAD_COMPLETE:
case IA2_EVENT_DOCUMENT_LOAD_STOPPED:
case IA2_EVENT_DOCUMENT_ATTRIBUTE_CHANGED:
case IA2_EVENT_DOCUMENT_CONTENT_CHANGED:
case IA2_EVENT_PAGE_CHANGED:
case IA2_EVENT_TEXT_ATTRIBUTE_CHANGED:
case IA2_EVENT_TEXT_CHANGED: