зеркало из https://github.com/mozilla/gecko-dev.git
Backing out bug 340672 as a bustage fix.
This commit is contained in:
Родитель
50738c7453
Коммит
8226f61357
|
@ -196,9 +196,10 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireToolkitEvent(PRUint32 aEvent,
|
|||
|
||||
//Perhaps need more cases in the future
|
||||
default:
|
||||
// Old value not used for anything other than state change events
|
||||
g_value_init(&values.new_value, G_TYPE_DOUBLE);
|
||||
g_value_set_double(&values.new_value, pAtkPropChange->newvalue);
|
||||
g_value_init (&values.old_value, G_TYPE_POINTER);
|
||||
g_value_set_pointer (&values.old_value, pAtkPropChange->oldvalue);
|
||||
g_value_init (&values.new_value, G_TYPE_POINTER);
|
||||
g_value_set_pointer (&values.new_value, pAtkPropChange->newvalue);
|
||||
rv = NS_OK;
|
||||
}
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
|
|
@ -111,8 +111,8 @@ enum AtkProperty {
|
|||
|
||||
struct AtkPropertyChange {
|
||||
PRInt32 type; // property type as listed above
|
||||
double oldvalue;
|
||||
double newvalue;
|
||||
void *oldvalue;
|
||||
void *newvalue;
|
||||
};
|
||||
|
||||
struct AtkChildrenChange {
|
||||
|
|
|
@ -805,22 +805,18 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
|
|||
privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_REORDER, accessible, nsnull);
|
||||
}
|
||||
}
|
||||
// Value change events for ATK are done with
|
||||
#if 0
|
||||
// XXX todo: value change events for ATK are done with
|
||||
// AtkPropertyChange, PROP_VALUE. Need the old and new value.
|
||||
// Don't bother sending old value, it's not used.
|
||||
// Not sure how we'll get the old value.
|
||||
// Aaron: I think this is a problem with the ATK API -- its much harder to
|
||||
// grab the old value for all the application developers than it is for
|
||||
// AT's to cache old values when they need to (when would that be!?)
|
||||
else if (eventType.LowerCaseEqualsLiteral("valuechange")) {
|
||||
nsCOMPtr<nsIAccessibleValue> accValue(do_QueryInterface(privAcc));
|
||||
NS_ASSERTION(accValue, "No nsIAccessibleValue for source of value change event");
|
||||
if (accValue) {
|
||||
AtkPropertyChange propChange;
|
||||
propChange.type = PROP_VALUE;
|
||||
propChange.oldValue = 0; // Not used
|
||||
nsresult rv = accValue->GetCurrentValue(&propChange.newValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_ATK_PROPERTY_CHANGE,
|
||||
accessible, &propChange);
|
||||
}
|
||||
privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
|
||||
accessible, nsnull);
|
||||
}
|
||||
#endif
|
||||
else if (eventType.LowerCaseEqualsLiteral("checkboxstatechange") || // it's a XUL <checkbox>
|
||||
eventType.LowerCaseEqualsLiteral("radiostatechange")) { // it's a XUL <radio>
|
||||
accessible->GetFinalState(&stateData.state);
|
||||
|
|
Загрузка…
Ссылка в новой задаче