Comment 43 for bug 948788

Revision history for this message
In , Trevor Saunders (trev-saunders) wrote :

Comment on attachment 725350
Implement setNameCB() in AccessibleWrap.cpp and use it in getNameCB() instead of atk_object_set_name()

>@@ -644,11 +644,40 @@ getNameCB(AtkObject* aAtkObj)
>
> NS_ConvertUTF8toUTF16 objName(aAtkObj->name);
> if (!uniName.Equals(objName))
>- atk_object_set_name(aAtkObj, NS_ConvertUTF16toUTF8(uniName).get());
>+ setNameCB(aAtkObj, NS_ConvertUTF16toUTF8(uniName).get());

you don't need to implement SetNameCB() or deal with atkobj->name at all you should be able to just do g_object_notify(blah);

>@@ -1011,6 +1040,7 @@ AccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
> accessible->Name(newName);
> NS_ConvertUTF16toUTF8 utf8Name(newName);
> if (!atkObj->name || !utf8Name.Equals(atkObj->name))
>+ /* XXX also use setNameCB() here? */
> atk_object_set_name(atkObj, utf8Name.get());

just change here too. Note we should do the same thing for atk_object_set_parent() and atk_object_set_description()

btw I don't really care but most people around here like 8 lines of context in diffs.