bug 659018 - nsIAccessibleEvent::EVENT_NAME_CHANGED not handled for atk r=surkov
authorTrevor Saunders <trev.saunders@gmail.com>
Wed, 15 Jun 2011 22:12:32 -0700
changeset 72002 b7a93f1279b734d5c185b15dc8ea53a71100ddba
parent 72001 56b2068a28ea86a7477fc08d858c44f4989fb491
child 72003 433a6c04a18da82d01cc75711952308cd682fa42
child 72023 7a64d66531ca6d7e93e6ef06f4f98b214b72bf49
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs659018
milestone7.0a1
first release with
nightly linux32
b7a93f1279b7 / 7.0a1 / 20110622030844 / files
nightly linux64
b7a93f1279b7 / 7.0a1 / 20110622030844 / files
nightly mac
b7a93f1279b7 / 7.0a1 / 20110622030844 / files
nightly win32
b7a93f1279b7 / 7.0a1 / 20110622030844 / files
nightly win64
b7a93f1279b7 / 7.0a1 / 20110622030205 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 659018 - nsIAccessibleEvent::EVENT_NAME_CHANGED not handled for atk r=surkov From 783c75c83cee406c15b962f5ac10582f7ab9b354 Mon Sep 17 00:00:00 2001 --- accessible/src/atk/nsAccessibleWrap.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
accessible/src/atk/nsAccessibleWrap.cpp
--- a/accessible/src/atk/nsAccessibleWrap.cpp
+++ b/accessible/src/atk/nsAccessibleWrap.cpp
@@ -1072,16 +1072,26 @@ nsAccessibleWrap::FirePlatformEvent(AccE
             atk_focus_tracker_notify(atkObj);
             // Fire state change event for focus
             nsRefPtr<AccEvent> stateChangeEvent =
               new AccStateChangeEvent(accessible, states::FOCUSED, PR_TRUE);
             return FireAtkStateChangeEvent(stateChangeEvent, atkObj);
         }
       } break;
 
+    case nsIAccessibleEvent::EVENT_NAME_CHANGE:
+      {
+        nsString newName;
+        accessible->GetName(newName);
+        NS_ConvertUTF16toUTF8 utf8Name(newName);
+        if (!utf8Name.Equals(atkObj->name))
+          atk_object_set_name(atkObj, utf8Name.get());
+
+        break;
+      }
     case nsIAccessibleEvent::EVENT_VALUE_CHANGE:
       {
         MAI_LOG_DEBUG(("\n\nReceived: EVENT_VALUE_CHANGE\n"));
         nsCOMPtr<nsIAccessibleValue> value(do_QueryObject(accessible));
         if (value) {    // Make sure this is a numeric value
             // Don't fire for MSAA string value changes (e.g. text editing)
             // ATK values are always numeric
             g_object_notify( (GObject*)atkObj, "accessible-value" );