Bug 510441 - Add support for nsIAccessibleEvent::OBJECT_ATTRIBUTE_CHANGED. r=MarcoZ,surkov a1.9.2=bsmedberg
authorDavid Bolter <dbolter@mozilla.com>
Wed, 16 Sep 2009 13:13:10 -0400
changeset 31778 b210bc305de8599a3d1b505a094b0133b6e36526
parent 31777 0ee58a54c5d6ae878533ae5c6c38f4f8549fc1fd
child 31779 c0a6463fac5d14db5ddcd77448178a4be92b1219
push id166
push userdbolter@mozilla.com
push dateWed, 16 Sep 2009 17:17:41 +0000
reviewersMarcoZ, surkov
bugs510441
milestone1.9.2a2pre
Bug 510441 - Add support for nsIAccessibleEvent::OBJECT_ATTRIBUTE_CHANGED. r=MarcoZ,surkov a1.9.2=bsmedberg
accessible/src/base/nsDocAccessible.cpp
accessible/tests/mochitest/Makefile.in
--- 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 \