Bug 754869 - MustPrune should take nsAccessible*, r=surkov
authorXi Yang <vinceyang15@gmail.com>
Tue, 22 May 2012 01:30:53 +0900
changeset 96771 595b826d6d3ac29cdbbdbd62b367ce4531c39d3f
parent 96770 027ed1748c8151c09afc7c750778161f950c6b98
child 96772 1aaec6842f6fc24d93fef020b8f500a04d539954
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs754869
milestone15.0a1
Bug 754869 - MustPrune should take nsAccessible*, r=surkov
accessible/src/base/nsAccUtils.cpp
accessible/src/base/nsAccUtils.h
--- a/accessible/src/base/nsAccUtils.cpp
+++ b/accessible/src/base/nsAccUtils.cpp
@@ -456,34 +456,34 @@ nsAccUtils::TextLength(nsAccessible *aAc
   // XXX In the future, list bullets may have frame and anon content, so 
   // we should be able to remove this at that point
   nsAutoString text;
   aAccessible->AppendTextTo(text); // Get all the text
   return text.Length();
 }
 
 bool
-nsAccUtils::MustPrune(nsIAccessible *aAccessible)
+nsAccUtils::MustPrune(nsAccessible* aAccessible)
 { 
-  PRUint32 role = nsAccUtils::Role(aAccessible);
+  roles::Role role = aAccessible->Role();
 
   // We don't prune buttons any more however AT don't expect children inside of
   // button in general, we allow menu buttons to have children to make them
   // accessible.
-  return role == nsIAccessibleRole::ROLE_MENUITEM || 
-    role == nsIAccessibleRole::ROLE_COMBOBOX_OPTION ||
-    role == nsIAccessibleRole::ROLE_OPTION ||
-    role == nsIAccessibleRole::ROLE_ENTRY ||
-    role == nsIAccessibleRole::ROLE_FLAT_EQUATION ||
-    role == nsIAccessibleRole::ROLE_PASSWORD_TEXT ||
-    role == nsIAccessibleRole::ROLE_TOGGLE_BUTTON ||
-    role == nsIAccessibleRole::ROLE_GRAPHIC ||
-    role == nsIAccessibleRole::ROLE_SLIDER ||
-    role == nsIAccessibleRole::ROLE_PROGRESSBAR ||
-    role == nsIAccessibleRole::ROLE_SEPARATOR;
+  return role == roles::MENUITEM || 
+    role == roles::COMBOBOX_OPTION ||
+    role == roles::OPTION ||
+    role == roles::ENTRY ||
+    role == roles::FLAT_EQUATION ||
+    role == roles::PASSWORD_TEXT ||
+    role == roles::TOGGLE_BUTTON ||
+    role == roles::GRAPHIC ||
+    role == roles::SLIDER ||
+    role == roles::PROGRESSBAR ||
+    role == roles::SEPARATOR;
 }
 
 nsresult
 nsAccUtils::GetHeaderCellsFor(nsIAccessibleTable *aTable,
                               nsIAccessibleTableCell *aCell,
                               PRInt32 aRowOrColHeaderCells, nsIArray **aCells)
 {
   nsresult rv = NS_OK;
--- a/accessible/src/base/nsAccUtils.h
+++ b/accessible/src/base/nsAccUtils.h
@@ -290,17 +290,17 @@ public:
     if (aState2)
       *aState2 = static_cast<PRUint32>(aState64 >> 31);
   }
 
   /**
    * Return true if the given accessible can't have children. Used when exposing
    * to platform accessibility APIs, should the children be pruned off?
    */
-  static bool MustPrune(nsIAccessible *aAccessible);
+  static bool MustPrune(nsAccessible* aAccessible);
 
   /**
    * Search hint enum constants. Used by GetHeaderCellsFor() method.
    */
   enum {
     // search for row header cells, left direction
     eRowHeaderCells,
     // search for column header cells, top direction