Bug 801356 - LeafAccessible needs to override Append/InsertChild, r=surkov, f=tbsaunde
authorJoey Blacksmith <joey.blacksmith@gmail.com>
Wed, 14 Nov 2012 16:08:45 +0900
changeset 113204 fdc8ef449613b24890248afa43e3576c01f9987c
parent 113203 51fa971d228095bb9d9402477be2966aa1cbc413
child 113205 c61e84effb7b0223193e1af54f61c16a6c609312
push idunknown
push userunknown
push dateunknown
reviewerssurkov
bugs801356
milestone19.0a1
Bug 801356 - LeafAccessible needs to override Append/InsertChild, r=surkov, f=tbsaunde
accessible/src/generic/BaseAccessibles.cpp
accessible/src/generic/BaseAccessibles.h
--- a/accessible/src/generic/BaseAccessibles.cpp
+++ b/accessible/src/generic/BaseAccessibles.cpp
@@ -38,16 +38,37 @@ NS_IMPL_ISUPPORTS_INHERITED0(LeafAccessi
 Accessible*
 LeafAccessible::ChildAtPoint(int32_t aX, int32_t aY,
                              EWhichChildAtPoint aWhichChild)
 {
   // Don't walk into leaf accessibles.
   return this;
 }
 
+bool
+LeafAccessible::AppendChild(Accessible* aChild)
+{
+  NS_NOTREACHED("AppendChild called on leaf accessible!");
+  return false;
+}
+
+bool
+LeafAccessible::InsertChildAt(uint32_t aIndex, Accessible* aChild)
+{
+  NS_NOTREACHED("InsertChildAt called on leaf accessible!");
+  return false;
+}
+
+bool
+LeafAccessible::RemoveChild(Accessible* aChild)
+{
+  NS_NOTREACHED("RemoveChild called on leaf accessible!");
+  return false;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // LeafAccessible: Accessible private
 
 void
 LeafAccessible::CacheChildren()
 {
   // No children for leaf accessible.
 }
--- a/accessible/src/generic/BaseAccessibles.h
+++ b/accessible/src/generic/BaseAccessibles.h
@@ -29,16 +29,20 @@ public:
   LeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
   virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
                                    EWhichChildAtPoint aWhichChild);
+  
+  virtual bool AppendChild(Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
+  virtual bool InsertChildAt(uint32_t aIndex, Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
+  virtual bool RemoveChild(Accessible* aChild) MOZ_OVERRIDE MOZ_FINAL;
 
 protected:
 
   // Accessible
   virtual void CacheChildren();
 };
 
 /**