Bug 754869 - MustPrune should take nsAccessible*, r=surkov
authorXi Yang <vinceyang15@gmail.com>
Tue, 22 May 2012 01:30:53 +0900
changeset 94504 595b826d6d3ac29cdbbdbd62b367ce4531c39d3f
parent 94503 027ed1748c8151c09afc7c750778161f950c6b98
child 94505 1aaec6842f6fc24d93fef020b8f500a04d539954
push id22725
push useremorley@mozilla.com
push dateTue, 22 May 2012 09:50:27 +0000
treeherdermozilla-central@ce618ce8d84a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs754869
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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