bug 1262563 - make FireShowHideEvent() return void r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Tue, 05 Apr 2016 19:52:35 -0400
changeset 332228 c75cf06452fb1cc88ae092b00f5e9167f73efd4e
parent 332227 78140cef0896a72aedc20935e7e328d4e34dfea1
child 332229 b94b668c0b94c9cd3c1131060a74dac91f96c698
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1262563
milestone48.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 1262563 - make FireShowHideEvent() return void r=davidb
accessible/atk/AccessibleWrap.cpp
accessible/atk/AccessibleWrap.h
--- a/accessible/atk/AccessibleWrap.cpp
+++ b/accessible/atk/AccessibleWrap.cpp
@@ -1353,34 +1353,36 @@ AccessibleWrap::HandleAccEvent(AccEvent*
         g_signal_emit_by_name(atkObj, "visible_data_changed");
         break;
 
     case nsIAccessibleEvent::EVENT_SHOW:
       {
         AccMutationEvent* event = downcast_accEvent(aEvent);
         Accessible* parentAcc = event ? event->Parent() : accessible->Parent();
         AtkObject* parent = AccessibleWrap::GetAtkObject(parentAcc);
-        return FireAtkShowHideEvent(atkObj, parent, true,
-                                    aEvent->IsFromUserInput());
+        NS_ENSURE_STATE(parent);
+        FireAtkShowHideEvent(atkObj, parent, true, aEvent->IsFromUserInput());
+        return NS_OK;
       }
 
     case nsIAccessibleEvent::EVENT_HIDE:
       {
         // XXX - Handle native dialog accessibles.
         if (!accessible->IsRoot() && accessible->HasARIARole() &&
             accessible->ARIARole() == roles::DIALOG) {
           guint id = g_signal_lookup("deactivate", MAI_TYPE_ATK_OBJECT);
           g_signal_emit(atkObj, id, 0);
         }
 
         AccMutationEvent* event = downcast_accEvent(aEvent);
         Accessible* parentAcc = event ? event->Parent() : accessible->Parent();
         AtkObject* parent = AccessibleWrap::GetAtkObject(parentAcc);
-        return FireAtkShowHideEvent(atkObj, parent, false,
-                                    aEvent->IsFromUserInput());
+        NS_ENSURE_STATE(parent);
+        FireAtkShowHideEvent(atkObj, parent, false, aEvent->IsFromUserInput());
+        return NS_OK;
       }
 
         /*
          * Because dealing with menu is very different between nsIAccessible
          * and ATK, and the menu activity is important, specially transfer the
          * following two event.
          * Need more verification by AT test.
          */
@@ -1584,27 +1586,23 @@ MaiAtkObject::FireTextChangeEvent(const 
 #define ADD_EVENT "children_changed::add"
 #define HIDE_EVENT "children_changed::remove"
 
 static const char *kMutationStrings[2][2] = {
   { HIDE_EVENT NON_USER_EVENT, ADD_EVENT NON_USER_EVENT },
   { HIDE_EVENT, ADD_EVENT },
 };
 
-nsresult
+void
 AccessibleWrap::FireAtkShowHideEvent(AtkObject* aObject, AtkObject* aParent,
                                      bool aIsAdded, bool aFromUser)
 {
     int32_t indexInParent = getIndexInParentCB(aObject);
-    NS_ENSURE_STATE(aParent);
-
     const char *signal_name = kMutationStrings[aFromUser][aIsAdded];
     g_signal_emit_by_name(aParent, signal_name, indexInParent, aObject, nullptr);
-
-    return NS_OK;
 }
 
 // static
 void
 AccessibleWrap::GetKeyBinding(Accessible* aAccessible, nsAString& aResult)
 {
   // Return all key bindings including access key and keyboard shortcut.
 
--- a/accessible/atk/AccessibleWrap.h
+++ b/accessible/atk/AccessibleWrap.h
@@ -74,18 +74,18 @@ public:
   static Accessible* GetColumnHeader(TableAccessible* aAccessible,
                                      int32_t aColIdx);
   static Accessible* GetRowHeader(TableAccessible* aAccessible,
                                   int32_t aRowIdx);
 protected:
 
   nsresult FireAtkStateChangeEvent(AccEvent* aEvent, AtkObject *aObject);
   nsresult FireAtkTextChangedEvent(AccEvent* aEvent, AtkObject *aObject);
-  nsresult FireAtkShowHideEvent(AtkObject *aObject, AtkObject* aParent,
-                                bool aIsAdded, bool aFromUser);
+  void FireAtkShowHideEvent(AtkObject *aObject, AtkObject* aParent,
+                            bool aIsAdded, bool aFromUser);
 
   AtkObject *mAtkObject;
 
 private:
   uint16_t CreateMaiInterfaces();
 };
 
 } // namespace a11y