Bug 510441 - Add support for nsIAccessibleEvent::OBJECT_ATTRIBUTE_CHANGED. r=MarcoZ,surkov a1.9.2=bsmedberg
--- a/accessible/src/base/nsDocAccessible.cpp
+++ b/accessible/src/base/nsDocAccessible.cpp
@@ -1346,16 +1346,25 @@ nsDocAccessible::ARIAAttributeChanged(ns
}
if (aAttribute == nsAccessibilityAtoms::aria_multiselectable &&
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
// This affects whether the accessible supports nsIAccessibleSelectable.
// COM says we cannot change what interfaces are supported on-the-fly,
// so invalidate this object. A new one will be created on demand.
InvalidateCacheSubtree(aContent, nsIAccessibleEvent::EVENT_DOM_SIGNIFICANT_CHANGE);
+ return;
+ }
+
+ // For aria drag and drop changes we fire a generic attribute change event;
+ // at least until native API comes up with a more meaningful event.
+ if (aAttribute == nsAccessibilityAtoms::aria_grabbed ||
+ aAttribute == nsAccessibilityAtoms::aria_dropeffect) {
+ FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED,
+ targetNode);
}
}
void nsDocAccessible::ContentAppended(nsIDocument *aDocument,
nsIContent* aContainer,
PRInt32 aNewIndexInContainer)
{
if ((!mIsContentLoaded || !mDocument) && mAccessNodeCache.Count() <= 1) {
--- a/accessible/tests/mochitest/Makefile.in
+++ b/accessible/tests/mochitest/Makefile.in
@@ -86,16 +86,17 @@ include $(topsrcdir)/config/rules.mk
test_cssattrs.html \
test_descr.html \
test_elm_filectrl.html \
$(warning test_elm_media.html temporarily disabled) \
test_elm_table.html \
test_elm_txtcntnr.html \
test_events_caretmove.html \
test_events_doc.html \
+ test_events_draganddrop.html \
test_events_focus.xul \
test_events_mutation.html \
test_events_tree.xul \
test_events_valuechange.html \
test_groupattrs.xul \
test_groupattrs.html \
test_name.html \
test_name.xul \