Bug 375452 URL bar entry acc is firing object:property-change:accessible-valuepatch by aaronleventhal r=ginn.chen

This commit is contained in:
ginn.chen@sun.com 2007-03-27 19:10:25 -07:00
parent 9c3474cffb
commit 5e0d1d97d5

View File

@ -45,6 +45,7 @@
#include "nsRootAccessible.h"
#include "nsDocAccessibleWrap.h"
#include "nsAccessibleEventData.h"
#include "nsIAccessibleValue.h"
#include <atk/atk.h>
#include <glib.h>
@ -150,7 +151,12 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireToolkitEvent(PRUint32 aEvent,
case nsIAccessibleEvent::EVENT_VALUE_CHANGE :
{
g_object_notify( (GObject*)atkObj, "accessible-value" );
nsCOMPtr<nsIAccessibleValue> value(do_QueryInterface(aAccessible));
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" );
}
}
break;