Bug 1474814: Invalidate the AccessibleHandler cache on focus events. r=MarcoZ a=lizzard
authorJames Teh <jteh@mozilla.com>
Wed, 11 Jul 2018 16:26:19 +1000
changeset 477952 825a33b82f47
parent 477951 f31b2ce16942
child 477953 f98d084dff6c
push id9475
push userarchaeopteryx@coole-files.de
push date2018-07-13 21:33 +0000
treeherdermozilla-beta@d7ab2f3df084 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMarcoZ, lizzard
bugs1474814
milestone62.0
Bug 1474814: Invalidate the AccessibleHandler cache on focus events. r=MarcoZ a=lizzard 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
accessible/windows/msaa/AccessibleWrap.cpp
--- 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: