Bug 1627765 - Rename firePlatformEvent to handleAccessibleEvent. r=morgan
authorEitan Isaacson <eitan@monotonous.org>
Thu, 09 Apr 2020 22:57:47 +0000
changeset 523420 9ab7c3a66d87b0d7770dc5db93ee95bd1be8afed
parent 523419 02cb9beaae7d9c27b1ed9c10a7350fcd67ecb0a9
child 523421 3987a054cda9f108e2dd66694b8baafaebf215cf
push id37302
push usercbrindusan@mozilla.com
push dateSat, 11 Apr 2020 09:34:41 +0000
treeherdermozilla-central@06ee15775ba8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmorgan
bugs1627765
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1627765 - Rename firePlatformEvent to handleAccessibleEvent. r=morgan The latter seems more accurate to what that method does, since we don't necessarily forward that event to the OS, but might instead use it to update cached properties. Differential Revision: https://phabricator.services.mozilla.com/D69878
accessible/mac/AccessibleWrap.mm
accessible/mac/Platform.mm
accessible/mac/mozAccessible.h
accessible/mac/mozAccessible.mm
accessible/mac/mozActionElements.mm
accessible/mac/mozTextAccessible.mm
--- a/accessible/mac/AccessibleWrap.mm
+++ b/accessible/mac/AccessibleWrap.mm
@@ -140,17 +140,17 @@ nsresult AccessibleWrap::HandleAccEvent(
         }
       }
       break;
     default:
       break;
   }
 
   if (nativeAcc) {
-    [nativeAcc firePlatformEvent:eventType];
+    [nativeAcc handleAccessibleEvent:eventType];
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 bool AccessibleWrap::InsertChildAt(uint32_t aIdx, Accessible* aAccessible) {
--- a/accessible/mac/Platform.mm
+++ b/accessible/mac/Platform.mm
@@ -122,42 +122,42 @@ void ProxyEvent(ProxyAccessible* aProxy,
       aEventType != nsIAccessibleEvent::EVENT_VALUE_CHANGE &&
       aEventType != nsIAccessibleEvent::EVENT_TEXT_VALUE_CHANGE &&
       aEventType != nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED &&
       aEventType != nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED)
     return;
 
   mozAccessible* wrapper = GetNativeFromProxy(aProxy);
   if (wrapper) {
-    [wrapper firePlatformEvent:aEventType];
+    [wrapper handleAccessibleEvent:aEventType];
   }
 }
 
 void ProxyStateChangeEvent(ProxyAccessible* aProxy, uint64_t aState, bool aEnabled) {
   mozAccessible* wrapper = GetNativeFromProxy(aProxy);
   if (wrapper) {
     [wrapper stateChanged:aState isEnabled:aEnabled];
   }
 }
 
 void ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset) {
   mozAccessible* wrapper = GetNativeFromProxy(aTarget);
   if (wrapper) {
-    [wrapper firePlatformEvent:nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED];
+    [wrapper handleAccessibleEvent:nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED];
   }
 }
 
 void ProxyTextChangeEvent(ProxyAccessible*, const nsString&, int32_t, uint32_t, bool, bool) {}
 
 void ProxyShowHideEvent(ProxyAccessible*, ProxyAccessible*, bool, bool) {}
 
 void ProxySelectionEvent(ProxyAccessible* aTarget, ProxyAccessible* aWidget, uint32_t aEventType) {
   mozAccessible* wrapper = GetNativeFromProxy(aWidget);
   if (wrapper) {
-    [wrapper firePlatformEvent:aEventType];
+    [wrapper handleAccessibleEvent:aEventType];
   }
 }
 }  // namespace a11y
 }  // namespace mozilla
 
 @interface GeckoNSApplication (a11y)
 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute;
 @end
--- a/accessible/mac/mozAccessible.h
+++ b/accessible/mac/mozAccessible.h
@@ -121,17 +121,17 @@ static const uintptr_t IS_PROXY = 1;
 - (BOOL)isFocused;
 - (BOOL)canBeFocused;
 
 // returns NO if for some reason we were unable to focus the element.
 - (BOOL)focus;
 
 // Given a gecko accessibility event type, post the relevant
 // system accessibility notification.
-- (void)firePlatformEvent:(uint32_t)eventType;
+- (void)handleAccessibleEvent:(uint32_t)eventType;
 
 // Post the given accessibility system notification
 - (void)postNotification:(NSString*)notification;
 
 // internal method to retrieve a child at a given index.
 - (id)childAt:(uint32_t)i;
 
 // Get gecko accessible's state.
--- a/accessible/mac/mozAccessible.mm
+++ b/accessible/mac/mozAccessible.mm
@@ -1204,17 +1204,17 @@ struct RoleDescrComparator {
 
   return YES;
 }
 
 - (BOOL)isEnabled {
   return [self stateWithMask:states::UNAVAILABLE] == 0;
 }
 
-- (void)firePlatformEvent:(uint32_t)eventType {
+- (void)handleAccessibleEvent:(uint32_t)eventType {
   switch (eventType) {
     case nsIAccessibleEvent::EVENT_FOCUS:
       [self postNotification:NSAccessibilityFocusedUIElementChangedNotification];
       break;
     case nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE:
       [self postNotification:NSAccessibilityFocusedUIElementChangedNotification];
       [self postNotification:@"AXLoadComplete"];
       [self postNotification:@"AXLayoutComplete"];
--- a/accessible/mac/mozActionElements.mm
+++ b/accessible/mac/mozActionElements.mm
@@ -215,20 +215,20 @@ enum CheckboxValue {
     if (newVal >= proxy->MinValue() && newVal <= proxy->MaxValue()) {
       proxy->SetCurValue(newVal);
     }
   }
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
-- (void)firePlatformEvent:(uint32_t)eventType {
+- (void)handleAccessibleEvent:(uint32_t)eventType {
   switch (eventType) {
     case nsIAccessibleEvent::EVENT_VALUE_CHANGE:
       [self postNotification:NSAccessibilityValueChangedNotification];
       break;
     default:
-      [super firePlatformEvent:eventType];
+      [super handleAccessibleEvent:eventType];
       break;
   }
 }
 
 @end
--- a/accessible/mac/mozTextAccessible.mm
+++ b/accessible/mac/mozTextAccessible.mm
@@ -519,28 +519,28 @@ inline NSString* ToNSString(id aValue) {
   ProxyAccessible* proxy = [self getProxyAccessible];
   HyperTextAccessible* textAcc = accWrap ? accWrap->AsHyperText() : nullptr;
   if (!textAcc && !proxy) return 0;
 
   return [NSValue
       valueWithRange:NSMakeRange(0, textAcc ? textAcc->CharacterCount() : proxy->CharacterCount())];
 }
 
-- (void)firePlatformEvent:(uint32_t)eventType {
+- (void)handleAccessibleEvent:(uint32_t)eventType {
   switch (eventType) {
     case nsIAccessibleEvent::EVENT_VALUE_CHANGE:
     case nsIAccessibleEvent::EVENT_TEXT_VALUE_CHANGE:
       [self postNotification:NSAccessibilityValueChangedNotification];
       break;
     case nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED:
     case nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED:
       [self postNotification:NSAccessibilitySelectedTextChangedNotification];
       break;
     default:
-      [super firePlatformEvent:eventType];
+      [super handleAccessibleEvent:eventType];
       break;
   }
 }
 
 - (NSString*)stringFromRange:(NSRange*)range {
   MOZ_ASSERT(range, "no range");
 
   AccessibleWrap* accWrap = [self getGeckoAccessible];