Bug 459973 - rename nsAccUtils to nsCoreUtils, r=aaronlev
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 16 Oct 2008 09:52:58 +0800
changeset 20521 64f038bccb120d79c6f0ed6d3abe9a46ed7007a2
parent 20520 a643ba22ca920c207666dba7bd20a5d0b53cf836
child 20522 776e27d91733d15db4014080a277fb77a2fe9397
push idunknown
push userunknown
push dateunknown
reviewersaaronlev
bugs459973
milestone1.9.1b2pre
Bug 459973 - rename nsAccUtils to nsCoreUtils, r=aaronlev
accessible/src/atk/nsMaiInterfaceComponent.cpp
accessible/src/base/Makefile.in
accessible/src/base/nsAccessNode.cpp
accessible/src/base/nsAccessNode.h
accessible/src/base/nsAccessibilityService.cpp
accessible/src/base/nsAccessibilityUtils.cpp
accessible/src/base/nsAccessibilityUtils.h
accessible/src/base/nsAccessible.cpp
accessible/src/base/nsAccessibleEventData.cpp
accessible/src/base/nsBaseWidgetAccessible.cpp
accessible/src/base/nsCoreUtils.cpp
accessible/src/base/nsCoreUtils.h
accessible/src/base/nsDocAccessible.cpp
accessible/src/base/nsRootAccessible.cpp
accessible/src/base/nsTextUtils.cpp
accessible/src/html/nsHTMLFormControlAccessible.cpp
accessible/src/html/nsHTMLImageAccessible.cpp
accessible/src/html/nsHTMLLinkAccessible.cpp
accessible/src/html/nsHTMLSelectAccessible.cpp
accessible/src/html/nsHTMLTableAccessible.cpp
accessible/src/html/nsHyperTextAccessible.cpp
accessible/src/msaa/nsAccessibleWrap.cpp
accessible/src/msaa/nsDocAccessibleWrap.cpp
accessible/src/msaa/nsTextAccessibleWrap.cpp
accessible/src/xul/nsXULFormControlAccessible.cpp
accessible/src/xul/nsXULMenuAccessible.cpp
accessible/src/xul/nsXULSelectAccessible.cpp
accessible/src/xul/nsXULTabAccessible.cpp
accessible/src/xul/nsXULTextAccessible.cpp
accessible/src/xul/nsXULTreeAccessible.cpp
--- a/accessible/src/atk/nsMaiInterfaceComponent.cpp
+++ b/accessible/src/atk/nsMaiInterfaceComponent.cpp
@@ -71,17 +71,17 @@ refAccessibleAtPointCB(AtkComponent *aCo
     nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
     if (!accWrap || nsAccessibleWrap::MustPrune(accWrap))
         return nsnull;
 
     // nsIAccessible getChildAtPoint (x,y) is in screen pixels.
     if (aCoordType == ATK_XY_WINDOW) {
         nsCOMPtr<nsIDOMNode> domNode;
         accWrap->GetDOMNode(getter_AddRefs(domNode));
-        nsIntPoint winCoords = nsAccUtils::GetScreenCoordsForWindow(domNode);
+        nsIntPoint winCoords = nsCoreUtils::GetScreenCoordsForWindow(domNode);
         aAccX += winCoords.x;
         aAccY += winCoords.y;
     }
 
     nsCOMPtr<nsIAccessible> pointAcc;
     accWrap->GetChildAtPoint(aAccX, aAccY, getter_AddRefs(pointAcc));
     if (!pointAcc) {
         return nsnull;
@@ -112,17 +112,17 @@ getExtentsCB(AtkComponent *aComponent,
     // Returned in screen coordinates
     nsresult rv = accWrap->GetBounds(&nsAccX, &nsAccY,
                                      &nsAccWidth, &nsAccHeight);
     if (NS_FAILED(rv))
         return;
     if (aCoordType == ATK_XY_WINDOW) {
         nsCOMPtr<nsIDOMNode> domNode;
         accWrap->GetDOMNode(getter_AddRefs(domNode));
-        nsIntPoint winCoords = nsAccUtils::GetScreenCoordsForWindow(domNode);
+        nsIntPoint winCoords = nsCoreUtils::GetScreenCoordsForWindow(domNode);
         nsAccX -= winCoords.x;
         nsAccY -= winCoords.y;
     }
 
     *aAccX = nsAccX;
     *aAccY = nsAccY;
     *aAccWidth = nsAccWidth;
     *aAccHeight = nsAccHeight;
--- a/accessible/src/base/Makefile.in
+++ b/accessible/src/base/Makefile.in
@@ -74,17 +74,17 @@ REQUIRES	= appshell \
 
 CPPSRCS = \
   nsAccessNode.cpp \
   nsAccessibleEventData.cpp \
   nsARIAMap.cpp \
   nsDocAccessible.cpp \
   nsOuterDocAccessible.cpp \
   nsAccessibilityAtoms.cpp \
-  nsAccessibilityUtils.cpp \
+  nsCoreUtils.cpp \
   nsAccessibilityService.cpp \
   nsAccessible.cpp \
   nsAccessibleRelation.cpp \
   nsAccessibleTreeWalker.cpp \
   nsBaseWidgetAccessible.cpp \
   nsFormControlAccessible.cpp \
   nsRootAccessible.cpp \
   nsApplicationAccessible.cpp \
--- a/accessible/src/base/nsAccessNode.cpp
+++ b/accessible/src/base/nsAccessNode.cpp
@@ -373,17 +373,17 @@ nsPresContext* nsAccessNode::GetPresCont
 already_AddRefed<nsIAccessibleDocument> nsAccessNode::GetDocAccessible()
 {
   return GetDocAccessibleFor(mWeakShell); // Addref'd
 }
 
 already_AddRefed<nsRootAccessible> nsAccessNode::GetRootAccessible()
 {
   nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   NS_ASSERTION(docShellTreeItem, "No docshell tree item for mDOMNode");
   if (!docShellTreeItem) {
     return nsnull;
   }
   nsCOMPtr<nsIDocShellTreeItem> root;
   docShellTreeItem->GetRootTreeItem(getter_AddRefs(root));
   NS_ASSERTION(root, "No root content tree item");
   if (!root) {
@@ -464,35 +464,35 @@ nsAccessNode::ScrollTo(PRUint32 aScrollT
 
   nsIFrame *frame = GetFrame();
   NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIContent> content = frame->GetContent();
   NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
 
   PRInt16 vPercent, hPercent;
-  nsAccUtils::ConvertScrollTypeToPercents(aScrollType, &vPercent, &hPercent);
+  nsCoreUtils::ConvertScrollTypeToPercents(aScrollType, &vPercent, &hPercent);
   return shell->ScrollContentIntoView(content, vPercent, hPercent);
 }
 
 NS_IMETHODIMP
 nsAccessNode::ScrollToPoint(PRUint32 aCoordinateType, PRInt32 aX, PRInt32 aY)
 {
   nsIFrame *frame = GetFrame();
   if (!frame)
     return NS_ERROR_FAILURE;
 
   nsIntPoint coords;
-  nsresult rv = nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordinateType,
-                                                  this, &coords);
+  nsresult rv = nsCoreUtils::ConvertToScreenCoords(aX, aY, aCoordinateType,
+                                                   this, &coords);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsIFrame *parentFrame = frame;
   while ((parentFrame = parentFrame->GetParent()))
-    nsAccUtils::ScrollFrameToPoint(parentFrame, frame, coords);
+    nsCoreUtils::ScrollFrameToPoint(parentFrame, frame, coords);
 
   return NS_OK;
 }
 
 nsresult
 nsAccessNode::MakeAccessNode(nsIDOMNode *aNode, nsIAccessNode **aAccessNode)
 {
   *aAccessNode = nsnull;
@@ -647,17 +647,17 @@ nsAccessNode::GetComputedStyleCSSValue(c
 
 void
 nsAccessNode::GetComputedStyleDeclaration(const nsAString& aPseudoElt,
                                           nsIDOMNode *aNode,
                                           nsIDOMCSSStyleDeclaration **aCssDecl)
 {
   *aCssDecl = nsnull;
 
-  nsCOMPtr<nsIDOMElement> domElement = nsAccUtils::GetDOMElementFor(aNode);
+  nsCOMPtr<nsIDOMElement> domElement = nsCoreUtils::GetDOMElementFor(aNode);
   if (!domElement)
     return;
 
   // Returns number of items in style declaration
   nsCOMPtr<nsIContent> content = do_QueryInterface(domElement);
   nsCOMPtr<nsIDocument> doc = content->GetDocument();
   if (!doc)
     return;
@@ -881,17 +881,17 @@ nsAccessNode::GetLanguage(nsAString& aLa
         content = do_QueryInterface(docElement);
       }
     }
     if (!content) {
       return NS_ERROR_FAILURE;
     }
   }
 
-  nsAccUtils::GetLanguageFor(content, nsnull, aLanguage);
+  nsCoreUtils::GetLanguageFor(content, nsnull, aLanguage);
 
   if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
     nsIDocument *doc = content->GetOwnerDoc();
     if (doc) {
       doc->GetHeaderData(nsAccessibilityAtoms::headerContentLanguage, aLanguage);
     }
   }
  
--- a/accessible/src/base/nsAccessNode.h
+++ b/accessible/src/base/nsAccessNode.h
@@ -40,17 +40,17 @@
  * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
  */
 
 #ifndef _nsAccessNode_H_
 #define _nsAccessNode_H_
 
 #include "nsCOMPtr.h"
 #include "nsAccessibilityAtoms.h"
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 
 #include "nsIAccessibleTypes.h"
 #include "nsIAccessNode.h"
 #include "nsIContent.h"
 #include "nsPIAccessNode.h"
 #include "nsIDOMNode.h"
 #include "nsINameSpaceManager.h"
 #include "nsIStringBundle.h"
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -34,17 +34,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // NOTE: alphabetically ordered
 #include "nsAccessibilityAtoms.h"
 #include "nsAccessibilityService.h"
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 #include "nsARIAMap.h"
 #include "nsIContentViewer.h"
 #include "nsCURILoader.h"
 #include "nsDocAccessible.h"
 #include "nsHTMLImageAccessibleWrap.h"
 #include "nsHTMLLinkAccessible.h"
 #include "nsHTMLSelectAccessible.h"
 #include "nsHTMLTableAccessibleWrap.h"
@@ -448,17 +448,17 @@ nsAccessibilityService::CreateRootAccess
   else {
     *aRootAcc = new nsRootAccessibleWrap(rootNode, weakShell);
   }
   if (!*aRootAcc)
     return NS_ERROR_OUT_OF_MEMORY;
 
   nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(*aRootAcc));
   privateAccessNode->Init();
-  nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(rootNode);
+  nsRoleMapEntry *roleMapEntry = nsCoreUtils::GetRoleMapEntry(rootNode);
   nsCOMPtr<nsPIAccessible> privateAccessible =
     do_QueryInterface(privateAccessNode);
   privateAccessible->SetRoleMapEntry(roleMapEntry);
 
   NS_ADDREF(*aRootAcc);
 
   return NS_OK;
 }
@@ -586,17 +586,17 @@ nsAccessibilityService::CreateHyperTextA
   nsCOMPtr<nsIWeakReference> weakShell;
   nsresult rv = GetInfo(aFrame, &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
   if (NS_FAILED(rv))
     return rv;
 
   nsCOMPtr<nsIContent> content(do_QueryInterface(node));
   NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
   
-  if (nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"))) {
+  if (nsCoreUtils::HasListener(content, NS_LITERAL_STRING("click"))) {
     // nsLinkableAccessible inherits from nsHyperTextAccessible, but
     // it also includes code for dealing with the onclick
     *aAccessible = new nsLinkableAccessible(node, weakShell);
   }
   else {
     *aAccessible = new nsHyperTextAccessibleWrap(node, weakShell);
   }
   if (nsnull == *aAccessible)
@@ -1265,26 +1265,27 @@ nsresult nsAccessibilityService::InitAcc
     NS_ADDREF(*aAccessibleOut = aAccessibleIn);
   }
   return rv;
 }
 
 static PRBool HasRelatedContent(nsIContent *aContent)
 {
   nsAutoString id;
-  if (!aContent || !nsAccUtils::GetID(aContent, id) || id.IsEmpty()) {
+  if (!aContent || !nsCoreUtils::GetID(aContent, id) || id.IsEmpty()) {
     return PR_FALSE;
   }
 
   nsIAtom *relationAttrs[] = {nsAccessibilityAtoms::aria_labelledby,
                               nsAccessibilityAtoms::aria_describedby,
                               nsAccessibilityAtoms::aria_owns,
                               nsAccessibilityAtoms::aria_controls,
                               nsAccessibilityAtoms::aria_flowto};
-  if (nsAccUtils::FindNeighbourPointingToNode(aContent, relationAttrs, NS_ARRAY_LENGTH(relationAttrs))) {
+  if (nsCoreUtils::FindNeighbourPointingToNode(aContent, relationAttrs,
+                                               NS_ARRAY_LENGTH(relationAttrs))) {
     return PR_TRUE;
   }
 
   nsIContent *ancestorContent = aContent;
   while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
     if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
         // ancestor has activedescendant property, this content could be active
       return PR_TRUE;
@@ -1474,17 +1475,17 @@ NS_IMETHODIMP nsAccessibilityService::Ge
       *aIsHidden = PR_TRUE;
       return NS_OK;
     }
     
     nsresult rv = CreateHyperTextAccessible(frame, getter_AddRefs(newAcc));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aNode);
+  nsRoleMapEntry *roleMapEntry = nsCoreUtils::GetRoleMapEntry(aNode);
   if (roleMapEntry && !nsCRT::strcmp(roleMapEntry->roleString, "presentation") &&
       !content->IsFocusable()) { // For presentation only
     // Only create accessible for role of "presentation" if it is focusable --
     // in that case we need an accessible in case it gets focused, we
     // don't want focus ever to be 'lost'
     return NS_OK;
   }
 
@@ -1522,17 +1523,18 @@ NS_IMETHODIMP nsAccessibilityService::Ge
         if (!tableFrame)
           continue;
         if (tableFrame->GetType() == nsAccessibilityAtoms::tableOuterFrame) {
           nsCOMPtr<nsIDOMNode> tableNode(do_QueryInterface(tableContent));
           nsCOMPtr<nsIAccessible> tableAccessible;
           GetAccessibleInShell(tableNode, aPresShell, getter_AddRefs(tableAccessible));
           if (!tableAccessible && !content->IsFocusable()) {
 #ifdef DEBUG
-            nsRoleMapEntry *tableRoleMapEntry = nsAccUtils::GetRoleMapEntry(tableNode);
+            nsRoleMapEntry *tableRoleMapEntry =
+              nsCoreUtils::GetRoleMapEntry(tableNode);
             NS_ASSERTION(tableRoleMapEntry &&
                          !nsCRT::strcmp(tableRoleMapEntry->roleString, "presentation"),
                          "No accessible for parent table and it didn't have role of presentation");
 #endif
             // Table-related descendants of presentation table are also presentation
             // Don't create accessibles for them unless they need to fire focus events
             return NS_OK;
           }
@@ -1589,19 +1591,19 @@ NS_IMETHODIMP nsAccessibilityService::Ge
   }
 
   // If no accessible, see if we need to create a generic accessible because
   // of some property that makes this object interesting
   // We don't do this for <body>, <html>, <window>, <dialog> etc. which 
   // correspond to the doc accessible and will be created in any case
   if (!newAcc && content->Tag() != nsAccessibilityAtoms::body && content->GetParent() && 
       (frame->IsFocusable() ||
-       (isHTML && nsAccUtils::HasListener(content, NS_LITERAL_STRING("click"))) ||
+       (isHTML && nsCoreUtils::HasListener(content, NS_LITERAL_STRING("click"))) ||
        HasUniversalAriaProperty(content, aWeakShell) || roleMapEntry ||
-       HasRelatedContent(content) || nsAccUtils::IsXLink(content))) {
+       HasRelatedContent(content) || nsCoreUtils::IsXLink(content))) {
     // This content is focusable or has an interesting dynamic content accessibility property.
     // If it's interesting we need it in the accessibility hierarchy so that events or
     // other accessibles can point to it, or so that it can hold a state, etc.
     if (isHTML) {
       // Interesting HTML container which may have selectable text and/or embedded objects
       CreateHyperTextAccessible(frame, getter_AddRefs(newAcc));
     }
     else {  // XUL, SVG, MathML etc.
--- a/accessible/src/base/nsAccessible.cpp
+++ b/accessible/src/base/nsAccessible.cpp
@@ -336,18 +336,19 @@ NS_IMETHODIMP nsAccessible::GetDescripti
   if (!content->IsNodeOfType(nsINode::eTEXT)) {
     nsAutoString description;
     nsresult rv = GetTextFromRelationID(nsAccessibilityAtoms::aria_describedby, description);
     if (NS_FAILED(rv)) {
       PRBool isXUL = content->IsNodeOfType(nsINode::eXUL);
       if (isXUL) {
         // Try XUL <description control="[id]">description text</description>
         nsIContent *descriptionContent =
-          nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::control,
-                                                  nsAccessibilityAtoms::description);
+          nsCoreUtils::FindNeighbourPointingToNode(content,
+                                                   nsAccessibilityAtoms::control,
+                                                   nsAccessibilityAtoms::description);
 
         if (descriptionContent) {
           // We have a description content node
           AppendFlatStringFromSubtree(descriptionContent, &description);
         }
       }
       if (description.IsEmpty()) {
         nsIAtom *descAtom = isXUL ? nsAccessibilityAtoms::tooltiptext :
@@ -431,24 +432,24 @@ NS_IMETHODIMP
 nsAccessible::GetKeyboardShortcut(nsAString& aAccessKey)
 {
   aAccessKey.Truncate();
 
   nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
   if (!content)
     return NS_ERROR_FAILURE;
 
-  PRUint32 key = nsAccUtils::GetAccessKeyFor(content);
+  PRUint32 key = nsCoreUtils::GetAccessKeyFor(content);
   if (!key && content->IsNodeOfType(nsIContent::eELEMENT)) {
     // Copy access key from label node unless it is labeled
     // via an ancestor <label>, in which case that would be redundant
     nsCOMPtr<nsIContent> labelContent(GetLabelContent(content));
     nsCOMPtr<nsIDOMNode> labelNode = do_QueryInterface(labelContent);
-    if (labelNode && !nsAccUtils::IsAncestorOf(labelNode, mDOMNode))
-      key = nsAccUtils::GetAccessKeyFor(labelContent);
+    if (labelNode && !nsCoreUtils::IsAncestorOf(labelNode, mDOMNode))
+      key = nsCoreUtils::GetAccessKeyFor(labelContent);
   }
 
   if (!key)
     return NS_OK;
 
   nsAutoString accesskey(key);
 
   // Append the modifiers in reverse order, result: Control+Alt+Shift+Meta+<key>
@@ -1065,17 +1066,17 @@ nsAccessible::GetState(PRUint32 *aState,
     *aState |= nsIAccessibleStates::STATE_OFFSCREEN;
   }
 
   nsIFrame *frame = GetFrame();
   if (frame && (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW))
     *aState |= nsIAccessibleStates::STATE_FLOATING;
 
   // Add 'linked' state for simple xlink.
-  if (nsAccUtils::IsXLink(content))
+  if (nsCoreUtils::IsXLink(content))
     *aState |= nsIAccessibleStates::STATE_LINKED;
 
   return NS_OK;
 }
 
   /* readonly attribute boolean focusedChild; */
 NS_IMETHODIMP nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild) 
 { 
@@ -1490,17 +1491,17 @@ nsAccessible::TakeFocus()
   NS_ENSURE_STATE(frame);
 
   // If the current element can't take real DOM focus and if it has an ID and
   // ancestor with a the aria-activedescendant attribute present, then set DOM
   // focus to that ancestor and set aria-activedescendant on the ancestor to
   // the ID of the desired element.
   if (!frame->IsFocusable()) {
     nsAutoString id;
-    if (content && nsAccUtils::GetID(content, id)) {
+    if (content && nsCoreUtils::GetID(content, id)) {
 
       nsCOMPtr<nsIContent> ancestorContent = content;
       while ((ancestorContent = ancestorContent->GetParent()) &&
              !ancestorContent->HasAttr(kNameSpaceID_None,
                                        nsAccessibilityAtoms::aria_activedescendant));
 
       if (ancestorContent) {
         nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
@@ -1763,18 +1764,18 @@ nsAccessible::AppendFlatStringFromSubtre
   }
 
   return NS_OK;
 }
 
 nsIContent *nsAccessible::GetLabelContent(nsIContent *aForNode)
 {
   if (aForNode->IsNodeOfType(nsINode::eXUL))
-    return nsAccUtils::FindNeighbourPointingToNode(aForNode, nsAccessibilityAtoms::control,
-                                                   nsAccessibilityAtoms::label);
+    return nsCoreUtils::FindNeighbourPointingToNode(aForNode, nsAccessibilityAtoms::control,
+                                                    nsAccessibilityAtoms::label);
 
   return GetHTMLLabelContent(aForNode);
 }
 
 nsIContent* nsAccessible::GetHTMLLabelContent(nsIContent *aForNode)
 {
   // Get either <label for="[id]"> element which explictly points to aForNode, or 
   // <label> ancestor which implicitly point to it
@@ -1788,22 +1789,22 @@ nsIContent* nsAccessible::GetHTMLLabelCo
     }
     if (tag == nsAccessibilityAtoms::form ||
         tag == nsAccessibilityAtoms::body) {
       // Reached top ancestor in form
       // There can be a label targeted at this control using the 
       // for="control_id" attribute. To save computing time, only 
       // look for those inside of a form element
       nsAutoString forId;
-      if (!nsAccUtils::GetID(aForNode, forId)) {
+      if (!nsCoreUtils::GetID(aForNode, forId)) {
         break;
       }
       // Actually we'll be walking down the content this time, with a depth first search
-      return nsAccUtils::FindDescendantPointingToID(&forId, walkUpContent,
-                                                    nsAccessibilityAtoms::_for);
+      return nsCoreUtils::FindDescendantPointingToID(&forId, walkUpContent,
+                                                     nsAccessibilityAtoms::_for);
     }
   }
 
   return nsnull;
 }
 
 nsresult nsAccessible::GetTextFromRelationID(nsIAtom *aIDProperty, nsString &aName)
 {
@@ -1945,18 +1946,18 @@ nsresult nsAccessible::GetXULName(nsAStr
   // CASES #2 and #3 ------ label as a child or <label control="id" ... > </label>
   nsCOMPtr<nsIContent> content = GetRoleContent(mDOMNode);
   if (!content)
     return NS_OK;
 
   if (NS_FAILED(rv) || label.IsEmpty()) {
     label.Truncate();
     nsIContent *labelContent =
-      nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::control,
-                                              nsAccessibilityAtoms::label);
+      nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::control,
+                                               nsAccessibilityAtoms::label);
 
     nsCOMPtr<nsIDOMXULLabelElement> xulLabel(do_QueryInterface(labelContent));
     // Check if label's value attribute is used
     if (xulLabel && NS_SUCCEEDED(xulLabel->GetValue(label)) && label.IsEmpty()) {
       // If no value attribute, a non-empty label must contain
       // children that define its text -- possibly using HTML
       AppendFlatStringFromSubtree(labelContent, &label);
     }
@@ -2120,17 +2121,17 @@ nsAccessible::GetAttributes(nsIPersisten
     NS_ADDREF(*aAttributes = attributes);
   }
  
   nsresult rv = GetAttributesInternal(attributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString id;
   nsAutoString oldValueUnused;
-  if (nsAccUtils::GetID(content, id)) {
+  if (nsCoreUtils::GetID(content, id)) {
     // Expose ID. If an <iframe id> exists override the one on the <body> of the source doc,
     // because the specific instance is what makes the ID useful for scripts
     attributes->SetStringProperty(NS_LITERAL_CSTRING("id"), id, oldValueUnused);
   }
   
   nsAutoString xmlRoles;
   if (content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, xmlRoles)) {
     attributes->SetStringProperty(NS_LITERAL_CSTRING("xml-roles"),  xmlRoles, oldValueUnused);          
@@ -2163,17 +2164,17 @@ nsAccessible::GetAttributes(nsIPersisten
     if (state & nsIAccessibleStates::STATE_CHECKABLE) {
       // No official state for checkable, so use object attribute to expose that
       attributes->SetStringProperty(NS_LITERAL_CSTRING("checkable"), NS_LITERAL_STRING("true"),
                                     oldValueUnused);
     }
   }
 
   // Level/setsize/posinset
-  if (!nsAccUtils::HasAccGroupAttrs(attributes)) {
+  if (!nsCoreUtils::HasAccGroupAttrs(attributes)) {
     // The role of an accessible can be pointed by ARIA attribute but ARIA
     // posinset, level, setsize may be skipped. Therefore we calculate here
     // these properties to map them into description.
 
     // If accessible is invisible we don't want to calculate group ARIA
     // attributes for it.
     if ((role == nsIAccessibleRole::ROLE_LISTITEM ||
          role == nsIAccessibleRole::ROLE_MENUITEM ||
@@ -2248,32 +2249,32 @@ nsAccessible::GetAttributes(nsIPersisten
           if (role == nsIAccessibleRole::ROLE_GROUPING)
             ++ groupLevel;
 
           parent->GetParent(getter_AddRefs(nextParent));
           parent.swap(nextParent);
         }
       }
 
-      nsAccUtils::SetAccGroupAttrs(attributes, groupLevel, positionInGroup,
-                                   setSize);
+      nsCoreUtils::SetAccGroupAttrs(attributes, groupLevel, positionInGroup,
+                                    setSize);
     }
   }
 
   // Expose all ARIA attributes
   PRUint32 numAttrs = content->GetAttrCount();
   for (PRUint32 count = 0; count < numAttrs; count ++) {
     const nsAttrName *attr = content->GetAttrNameAt(count);
     if (attr && attr->NamespaceEquals(kNameSpaceID_None)) {
       nsIAtom *attrAtom = attr->Atom();
       const char *attrStr;
       attrAtom->GetUTF8String(&attrStr);
       if (PL_strncmp(attrStr, "aria-", 5)) 
         continue; // Not ARIA
-      if (!nsAccUtils::IsARIAPropForObjectAttr(attrAtom))
+      if (!nsCoreUtils::IsARIAPropForObjectAttr(attrAtom))
         continue; // No need to expose obj attribute -- will be exposed some other way
       nsAutoString value;
       if (content->GetAttr(kNameSpaceID_None, attrAtom, value)) {
         attributes->SetStringProperty(nsDependentCString(attrStr + 5), value, oldValueUnused);
       }
     }
   }
 
@@ -2298,34 +2299,35 @@ nsAccessible::GetAttributesInternal(nsIP
   }
 
   nsAccEvent::GetLastEventAttributes(mDOMNode, aAttributes);
  
   // Expose class because it may have useful microformat information
   // Let the class from an iframe's document be exposed, don't override from <iframe class>
   nsAutoString _class;
   if (content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::_class, _class))
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::_class, _class);
+    nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::_class, _class);
 
   // Get container-foo computed live region properties based on the closest container with
   // the live region attribute. 
   // Inner nodes override outer nodes within the same document --
   //   The inner nodes can be used to override live region behavior on more general outer nodes
   // However, nodes in outer documents override nodes in inner documents:
   //   Outer doc author may want to override properties on a widget they used in an iframe
   nsCOMPtr<nsIDOMNode> startNode = mDOMNode;
   nsIContent *startContent = content;
   while (PR_TRUE) {
     NS_ENSURE_STATE(startContent);
     nsIDocument *doc = startContent->GetDocument();
     nsCOMPtr<nsIDOMNode> docNode = do_QueryInterface(doc);
     NS_ENSURE_STATE(docNode);
     nsIContent *topContent = GetRoleContent(docNode);
     NS_ENSURE_STATE(topContent);
-    nsAccUtils::GetLiveContainerAttributes(aAttributes, startContent, topContent);
+    nsCoreUtils::GetLiveContainerAttributes(aAttributes, startContent,
+                                            topContent);
     // Allow ARIA live region markup from outer documents to override
     nsCOMPtr<nsISupports> container = doc->GetContainer();
     nsIDocShellTreeItem *docShellTreeItem = nsnull;
     if (container)
       CallQueryInterface(container, &docShellTreeItem);
     if (!docShellTreeItem)
       break;
     nsIDocShellTreeItem *sameTypeParent = nsnull;
@@ -2339,18 +2341,18 @@ nsAccessible::GetAttributesInternal(nsIP
   }
 
   // Expose 'display' attribute.
   nsAutoString displayValue;
   nsresult rv = GetComputedStyleValue(EmptyString(),
                                       NS_LITERAL_STRING("display"),
                                       displayValue);
   if (NS_SUCCEEDED(rv))
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::display,
-                           displayValue);
+    nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::display,
+                            displayValue);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAccessible::GroupPosition(PRInt32 *aGroupLevel,
                             PRInt32 *aSimilarItemsInGroup,
                             PRInt32 *aPositionInGroup)
 {
@@ -2371,17 +2373,17 @@ nsAccessible::GroupPosition(PRInt32 *aGr
 
   nsCOMPtr<nsIPersistentProperties> attributes;
   nsresult rv = GetAttributes(getter_AddRefs(attributes));
   NS_ENSURE_SUCCESS(rv, rv);
   if (!attributes) {
     return NS_ERROR_FAILURE;
   }
   PRInt32 level, posInSet, setSize;
-  nsAccUtils::GetAccGroupAttrs(attributes, &level, &posInSet, &setSize);
+  nsCoreUtils::GetAccGroupAttrs(attributes, &level, &posInSet, &setSize);
 
   if (!posInSet && !setSize)
     return NS_OK;
 
   *aGroupLevel = level;
 
   *aPositionInGroup = posInSet;
   *aSimilarItemsInGroup = setSize;
@@ -2439,17 +2441,17 @@ nsAccessible::GetFinalState(PRUint32 *aS
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (tabPanel && Role(tabPanel) == nsIAccessibleRole::ROLE_PROPERTYPAGE) {
         nsCOMPtr<nsIAccessNode> tabPanelAccessNode(do_QueryInterface(tabPanel));
         nsCOMPtr<nsIDOMNode> tabPanelNode;
         tabPanelAccessNode->GetDOMNode(getter_AddRefs(tabPanelNode));
         NS_ENSURE_STATE(tabPanelNode);
 
-        if (nsAccUtils::IsAncestorOf(tabPanelNode, gLastFocusedNode))
+        if (nsCoreUtils::IsAncestorOf(tabPanelNode, gLastFocusedNode))
           *aState |= nsIAccessibleStates::STATE_SELECTED;
       }
     }
   }
 
   const PRUint32 kExpandCollapseStates =
     nsIAccessibleStates::STATE_COLLAPSED | nsIAccessibleStates::STATE_EXPANDED;
   if ((*aState & kExpandCollapseStates) == kExpandCollapseStates) {
@@ -2476,17 +2478,17 @@ nsAccessible::GetFinalState(PRUint32 *aS
 
   if (mRoleMapEntry) {
     // If an object has an ancestor with the activedescendant property
     // pointing at it, we mark it as ACTIVE even if it's not currently focused.
     // This allows screen reader virtual buffer modes to know which descendant
     // is the current one that would get focus if the user navigates to the container widget.
     nsCOMPtr<nsIContent> content = do_QueryInterface(mDOMNode);
     nsAutoString id;
-    if (content && nsAccUtils::GetID(content, id)) {
+    if (content && nsCoreUtils::GetID(content, id)) {
       nsIContent *ancestorContent = content;
       nsAutoString activeID;
       while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
         if (ancestorContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant, activeID)) {
           if (id == activeID) {
             *aExtraState |= nsIAccessibleStates::EXT_STATE_ACTIVE;
           }
           break;
@@ -2636,17 +2638,17 @@ nsAccessible::GetValue(nsAString& aValue
       content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_valuenow, aValue);
     }
   }
 
   if (!aValue.IsEmpty())
     return NS_OK;
 
   // Check if it's a simple xlink.
-  if (nsAccUtils::IsXLink(content)) {
+  if (nsCoreUtils::IsXLink(content)) {
     nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
     if (presShell)
       return presShell->GetLinkLocation(mDOMNode, aValue);
   }
 
   return NS_OK;
 }
 
@@ -2750,17 +2752,17 @@ NS_IMETHODIMP nsAccessible::GetRole(PRUi
 {
   NS_ENSURE_ARG_POINTER(aRole);
   *aRole = nsIAccessibleRole::ROLE_NOTHING;
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
-  if (nsAccUtils::IsXLink(content))
+  if (nsCoreUtils::IsXLink(content))
     *aRole = nsIAccessibleRole::ROLE_LINK;
 
   return NS_OK;
 }
 
 // readonly attribute PRUint8 numActions
 NS_IMETHODIMP
 nsAccessible::GetNumActions(PRUint8 *aNumActions)
@@ -2933,57 +2935,57 @@ NS_IMETHODIMP nsAccessible::GetAccessibl
     {
       if (content->Tag() == nsAccessibilityAtoms::label) {
         nsIAtom *relatedIDAttr = content->IsNodeOfType(nsINode::eHTML) ?
           nsAccessibilityAtoms::_for : nsAccessibilityAtoms::control;
         content->GetAttr(kNameSpaceID_None, relatedIDAttr, relatedID);
       }
       if (relatedID.IsEmpty()) {
         relatedNode =
-          do_QueryInterface(nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_labelledby));
+          do_QueryInterface(nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_labelledby));
       }
       break;
     }
   case nsIAccessibleRelation::RELATION_LABELLED_BY:
     {
       if (!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_labelledby, relatedID)) {
         relatedNode = do_QueryInterface(GetLabelContent(content));
       }
       break;
     }
   case nsIAccessibleRelation::RELATION_DESCRIBED_BY:
     {
       if (!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_describedby, relatedID)) {
         relatedNode = do_QueryInterface(
-          nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::control, nsAccessibilityAtoms::description));
+          nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::control, nsAccessibilityAtoms::description));
       }
       break;
     }
   case nsIAccessibleRelation::RELATION_DESCRIPTION_FOR:
     {
       relatedNode =
-        do_QueryInterface(nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_describedby));
+        do_QueryInterface(nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_describedby));
 
       if (!relatedNode && content->Tag() == nsAccessibilityAtoms::description &&
           content->IsNodeOfType(nsINode::eXUL)) {
         // This affectively adds an optional control attribute to xul:description,
         // which only affects accessibility, by allowing the description to be
         // tied to a control.
         content->GetAttr(kNameSpaceID_None,
                          nsAccessibilityAtoms::control, relatedID);
       }
       break;
     }
   case nsIAccessibleRelation::RELATION_NODE_CHILD_OF:
     {
       relatedNode =
-        do_QueryInterface(nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_owns));
+        do_QueryInterface(nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_owns));
       if (!relatedNode && mRoleMapEntry && mRoleMapEntry->role == nsIAccessibleRole::ROLE_OUTLINEITEM) {
         // This is an ARIA tree that doesn't use owns, so we need to get the parent the hard way
-        nsAccUtils::GetARIATreeItemParent(this, content, aRelated);
+        nsCoreUtils::GetARIATreeItemParent(this, content, aRelated);
         return NS_OK;
       }
       // If accessible is in its own Window then we should provide NODE_CHILD_OF relation
       // so that MSAA clients can easily get to true parent instead of getting to oleacc's
       // ROLE_WINDOW accessible which will prevent us from going up further (because it is
       // system generated and has no idea about the hierarchy above it).
       nsIFrame *frame = GetFrame();
       if (frame) {
@@ -2996,33 +2998,33 @@ NS_IMETHODIMP nsAccessible::GetAccessibl
           }
         }
       }
       break;
     }
   case nsIAccessibleRelation::RELATION_CONTROLLED_BY:
     {
       relatedNode =
-        do_QueryInterface(nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_controls));
+        do_QueryInterface(nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_controls));
       break;
     }
   case nsIAccessibleRelation::RELATION_CONTROLLER_FOR:
     {
       content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_controls, relatedID);
       break;
     }
   case nsIAccessibleRelation::RELATION_FLOWS_TO:
     {
       content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_flowto, relatedID);
       break;
     }
   case nsIAccessibleRelation::RELATION_FLOWS_FROM:
     {
       relatedNode =
-        do_QueryInterface(nsAccUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_flowto));
+        do_QueryInterface(nsCoreUtils::FindNeighbourPointingToNode(content, nsAccessibilityAtoms::aria_flowto));
       break;
     }
   case nsIAccessibleRelation::RELATION_DEFAULT_BUTTON:
     {
       if (content->IsNodeOfType(nsINode::eHTML)) {
         // HTML form controls implements nsIFormControl interface.
         nsCOMPtr<nsIFormControl> control(do_QueryInterface(content));
         if (control) {
@@ -3194,22 +3196,22 @@ void nsAccessible::DoCommandCallback(nsI
 
   nsCOMPtr<nsIPresShell> presShell = doc->GetPrimaryShell();
 
   // Scroll into view.
   presShell->ScrollContentIntoView(content, NS_PRESSHELL_SCROLL_ANYWHERE,
                                    NS_PRESSHELL_SCROLL_ANYWHERE);
 
   // Fire mouse down and mouse up events.
-  PRBool res = nsAccUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, presShell,
-                                              content);
+  PRBool res = nsCoreUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, presShell,
+                                               content);
   if (!res)
     return;
 
-  nsAccUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_UP, presShell, content);
+  nsCoreUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_UP, presShell, content);
 }
 
 /*
  * Use Timer to execute "Click" command of XUL/HTML element (e.g. menuitem, button...).
  *
  * When "Click" is to open a "modal" dialog/window, it won't return untill the
  * dialog/window is closed. If executing "Click" command directly in
  * nsXXXAccessible::DoAction, it will block AT-Tools(e.g. GOK) that invoke
@@ -3440,17 +3442,17 @@ nsAccessible::GetURI(PRInt32 aIndex, nsI
   NS_ENSURE_ARG_POINTER(aURI);
   *aURI = nsnull;
 
   if (aIndex != 0)
     return NS_ERROR_INVALID_ARG;
 
   // Check if it's a simple xlink.
   nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
-  if (nsAccUtils::IsXLink(content)) {
+  if (nsCoreUtils::IsXLink(content)) {
     nsAutoString href;
     content->GetAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href, href);
 
     nsCOMPtr<nsIURI> baseURI = content->GetBaseURI();
     nsCOMPtr<nsIDocument> document = content->GetOwnerDoc();
     return NS_NewURI(aURI, href,
                      document ? document->GetDocumentCharacterSet().get() : nsnull,
                      baseURI);
@@ -3709,22 +3711,22 @@ nsAccessible::GetAttrValue(nsIAtom *aPro
 PRUint32
 nsAccessible::GetActionRule(PRUint32 aStates)
 {
   if (aStates & nsIAccessibleStates::STATE_UNAVAILABLE)
     return eNoAction;
 
   // Check if it's simple xlink.
   nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
-  if (nsAccUtils::IsXLink(content))
+  if (nsCoreUtils::IsXLink(content))
     return eJumpAction;
 
   // Has registered 'click' event handler.
-  PRBool isOnclick = nsAccUtils::HasListener(content,
-                                             NS_LITERAL_STRING("click"));
+  PRBool isOnclick = nsCoreUtils::HasListener(content,
+                                              NS_LITERAL_STRING("click"));
 
   if (isOnclick)
     return eClickAction;
 
   // Get an action based on ARIA role.
   if (mRoleMapEntry)
     return mRoleMapEntry->actionRule;
 
--- a/accessible/src/base/nsAccessibleEventData.cpp
+++ b/accessible/src/base/nsAccessibleEventData.cpp
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessibleEventData.h"
 #include "nsAccessibilityAtoms.h"
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 #include "nsIAccessibilityService.h"
 #include "nsIAccessNode.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
 #include "nsIEventStateManager.h"
 #include "nsIPersistentProperties2.h"
 #include "nsIServiceManager.h"
 #ifdef MOZ_XUL
@@ -317,28 +317,28 @@ nsAccEvent::ApplyEventRules(nsCOMArray<n
               thisEvent->mEventRule == nsAccEvent::eDoNotEmit)
             continue; //  Do not need to check
 
           if (thisEvent->mDOMNode == tailEvent->mDOMNode) {
             // Dupe
             thisEvent->mEventRule = nsAccEvent::eDoNotEmit;
             continue;
           }
-          if (nsAccUtils::IsAncestorOf(tailEvent->mDOMNode,
-                                       thisEvent->mDOMNode)) {
+          if (nsCoreUtils::IsAncestorOf(tailEvent->mDOMNode,
+                                        thisEvent->mDOMNode)) {
             // thisDOMNode is a descendant of tailDOMNode
             // Do not emit thisEvent, also apply this result to sibling
             // nodes of thisDOMNode.
             thisEvent->mEventRule = nsAccEvent::eDoNotEmit;
             ApplyToSiblings(aEventsToFire, 0, index, thisEvent->mEventType,
                             thisEvent->mDOMNode, nsAccEvent::eDoNotEmit);
             continue;
           }
-          if (nsAccUtils::IsAncestorOf(thisEvent->mDOMNode,
-                                       tailEvent->mDOMNode)) {
+          if (nsCoreUtils::IsAncestorOf(thisEvent->mDOMNode,
+                                        tailEvent->mDOMNode)) {
             // tailDOMNode is a descendant of thisDOMNode
             // Do not emit tailEvent, also apply this result to sibling
             // nodes of tailDOMNode.
             tailEvent->mEventRule = nsAccEvent::eDoNotEmit;
             ApplyToSiblings(aEventsToFire, 0, tail, tailEvent->mEventType,
                             tailEvent->mDOMNode, nsAccEvent::eDoNotEmit);
             break;
           }
@@ -376,17 +376,17 @@ nsAccEvent::ApplyToSiblings(nsCOMArray<n
                             PRUint32 aStart, PRUint32 aEnd,
                              PRUint32 aEventType, nsIDOMNode* aDOMNode,
                              EEventRule aEventRule)
 {
   for (PRUint32 index = aStart; index < aEnd; index ++) {
     nsRefPtr<nsAccEvent> accEvent = GetAccEventPtr(aEventsToFire[index]);
     if (accEvent->mEventType == aEventType &&
         accEvent->mEventRule != nsAccEvent::eDoNotEmit &&
-        nsAccUtils::AreSiblings(accEvent->mDOMNode, aDOMNode)) {
+        nsCoreUtils::AreSiblings(accEvent->mDOMNode, aDOMNode)) {
       accEvent->mEventRule = aEventRule;
     }
   }
 }
 
 // nsAccStateChangeEvent
 NS_IMPL_ISUPPORTS_INHERITED1(nsAccStateChangeEvent, nsAccEvent,
                              nsIAccessibleStateChangeEvent)
--- a/accessible/src/base/nsBaseWidgetAccessible.cpp
+++ b/accessible/src/base/nsBaseWidgetAccessible.cpp
@@ -37,17 +37,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsBaseWidgetAccessible.h"
 #include "nsAccessibilityAtoms.h"
 #include "nsIAccessibilityService.h"
 #include "nsIAccessibleDocument.h"
 #include "nsAccessibleWrap.h"
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 #include "nsIDOMNSHTMLElement.h"
 #include "nsGUIEvent.h"
 #include "nsHyperTextAccessibleWrap.h"
 #include "nsILink.h"
 #include "nsIFrame.h"
 #include "nsINameSpaceManager.h"
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
@@ -251,28 +251,28 @@ nsLinkableAccessible::Shutdown()
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsLinkableAccessible
 
 void
 nsLinkableAccessible::CacheActionContent()
 {
   nsCOMPtr<nsIContent> walkUpContent(do_QueryInterface(mDOMNode));
-  PRBool isOnclick = nsAccUtils::HasListener(walkUpContent,
-                                             NS_LITERAL_STRING("click"));
+  PRBool isOnclick = nsCoreUtils::HasListener(walkUpContent,
+                                              NS_LITERAL_STRING("click"));
 
   if (isOnclick) {
     mActionContent = walkUpContent;
     mIsOnclick = PR_TRUE;
     return;
   }
 
   while ((walkUpContent = walkUpContent->GetParent())) {
-    isOnclick = nsAccUtils::HasListener(walkUpContent,
-                                        NS_LITERAL_STRING("click"));
+    isOnclick = nsCoreUtils::HasListener(walkUpContent,
+                                         NS_LITERAL_STRING("click"));
   
     nsCOMPtr<nsIDOMNode> walkUpNode(do_QueryInterface(walkUpContent));
 
     nsCOMPtr<nsIAccessible> walkUpAcc;
     GetAccService()->GetAccessibleInWeakShell(walkUpNode, mWeakShell,
                                               getter_AddRefs(walkUpAcc));
 
     if (walkUpAcc && Role(walkUpAcc) == nsIAccessibleRole::ROLE_LINK &&
rename from accessible/src/base/nsAccessibilityUtils.cpp
rename to accessible/src/base/nsCoreUtils.cpp
--- a/accessible/src/base/nsAccessibilityUtils.cpp
+++ b/accessible/src/base/nsCoreUtils.cpp
@@ -31,17 +31,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 
 #include "nsIAccessibleStates.h"
 #include "nsIAccessibleTypes.h"
 #include "nsPIAccessible.h"
 #include "nsPIAccessNode.h"
 #include "nsAccessibleEventData.h"
 
 #include "nsAccessible.h"
@@ -72,41 +72,41 @@
 #include "nsContentCID.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsWhitespaceTokenizer.h"
 
 static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
 
 void
-nsAccUtils::GetAccAttr(nsIPersistentProperties *aAttributes, nsIAtom *aAttrName,
-                       nsAString& aAttrValue)
+nsCoreUtils::GetAccAttr(nsIPersistentProperties *aAttributes,
+                        nsIAtom *aAttrName, nsAString& aAttrValue)
 {
   aAttrValue.Truncate();
 
   nsCAutoString attrName;
   aAttrName->ToUTF8String(attrName);
   aAttributes->GetStringProperty(attrName, aAttrValue);
 }
 
 void
-nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes, nsIAtom *aAttrName,
-                       const nsAString& aAttrValue)
+nsCoreUtils::SetAccAttr(nsIPersistentProperties *aAttributes,
+                        nsIAtom *aAttrName, const nsAString& aAttrValue)
 {
   nsAutoString oldValue;
   nsCAutoString attrName;
 
   aAttrName->ToUTF8String(attrName);
   aAttributes->SetStringProperty(attrName, aAttrValue, oldValue);
 }
 
 void
-nsAccUtils::GetAccGroupAttrs(nsIPersistentProperties *aAttributes,
-                             PRInt32 *aLevel, PRInt32 *aPosInSet,
-                             PRInt32 *aSetSize)
+nsCoreUtils::GetAccGroupAttrs(nsIPersistentProperties *aAttributes,
+                              PRInt32 *aLevel, PRInt32 *aPosInSet,
+                              PRInt32 *aSetSize)
 {
   *aLevel = 0;
   *aPosInSet = 0;
   *aSetSize = 0;
 
   nsAutoString value;
   PRInt32 error = NS_OK;
 
@@ -128,33 +128,33 @@ nsAccUtils::GetAccGroupAttrs(nsIPersiste
   if (!value.IsEmpty()) {
     PRInt32 sizeSet = value.ToInteger(&error);
     if (NS_SUCCEEDED(error))
       *aSetSize = sizeSet;
   }
 }
 
 PRBool
-nsAccUtils::HasAccGroupAttrs(nsIPersistentProperties *aAttributes)
+nsCoreUtils::HasAccGroupAttrs(nsIPersistentProperties *aAttributes)
 {
   nsAutoString value;
 
   GetAccAttr(aAttributes, nsAccessibilityAtoms::setsize, value);
   if (!value.IsEmpty()) {
     GetAccAttr(aAttributes, nsAccessibilityAtoms::posinset, value);
     return !value.IsEmpty();
   }
 
   return PR_FALSE;
 }
 
 void
-nsAccUtils::SetAccGroupAttrs(nsIPersistentProperties *aAttributes,
-                             PRInt32 aLevel, PRInt32 aPosInSet,
-                             PRInt32 aSetSize)
+nsCoreUtils::SetAccGroupAttrs(nsIPersistentProperties *aAttributes,
+                              PRInt32 aLevel, PRInt32 aPosInSet,
+                              PRInt32 aSetSize)
 {
   nsAutoString value;
 
   if (aLevel) {
     value.AppendInt(aLevel);
     SetAccAttr(aAttributes, nsAccessibilityAtoms::level, value);
   }
 
@@ -165,18 +165,18 @@ nsAccUtils::SetAccGroupAttrs(nsIPersiste
 
     value.Truncate();
     value.AppendInt(aSetSize);
     SetAccAttr(aAttributes, nsAccessibilityAtoms::setsize, value);
   }
 }
 
 void
-nsAccUtils::SetAccAttrsForXULSelectControlItem(nsIDOMNode *aNode,
-                                               nsIPersistentProperties *aAttributes)
+nsCoreUtils::SetAccAttrsForXULSelectControlItem(nsIDOMNode *aNode,
+                                                nsIPersistentProperties *aAttributes)
 {
   nsCOMPtr<nsIDOMXULSelectControlItemElement> item(do_QueryInterface(aNode));
   if (!item)
     return;
 
   nsCOMPtr<nsIDOMXULSelectControlElement> control;
   item->GetControl(getter_AddRefs(control));
   if (!control)
@@ -204,18 +204,18 @@ nsAccUtils::SetAccAttrsForXULSelectContr
         posInSet--;
     }
   }
 
   SetAccGroupAttrs(aAttributes, 0, posInSet + 1, setSize);
 }
 
 void
-nsAccUtils::SetAccAttrsForXULContainerItem(nsIDOMNode *aNode,
-                                           nsIPersistentProperties *aAttributes)
+nsCoreUtils::SetAccAttrsForXULContainerItem(nsIDOMNode *aNode,
+                                            nsIPersistentProperties *aAttributes)
 {
   nsCOMPtr<nsIDOMXULContainerItemElement> item(do_QueryInterface(aNode));
   if (!item)
     return;
 
   nsCOMPtr<nsIDOMXULContainerElement> container;
   item->GetParentContainer(getter_AddRefs(container));
   if (!container)
@@ -280,29 +280,29 @@ nsAccUtils::SetAccAttrsForXULContainerIt
     container->GetParentContainer(getter_AddRefs(parentContainer));
     parentContainer.swap(container);
   }
   
   SetAccGroupAttrs(aAttributes, level, posInSet, setSize);
 }
 
 PRBool
-nsAccUtils::HasListener(nsIContent *aContent, const nsAString& aEventType)
+nsCoreUtils::HasListener(nsIContent *aContent, const nsAString& aEventType)
 {
   NS_ENSURE_TRUE(aContent, PR_FALSE);
   nsCOMPtr<nsIEventListenerManager> listenerManager;
   aContent->GetListenerManager(PR_FALSE, getter_AddRefs(listenerManager));
 
   return listenerManager && listenerManager->HasListenersFor(aEventType);  
 }
 
 PRBool
-nsAccUtils::DispatchMouseEvent(PRUint32 aEventType,
-                               nsIPresShell *aPresShell,
-                               nsIContent *aContent)
+nsCoreUtils::DispatchMouseEvent(PRUint32 aEventType,
+                                nsIPresShell *aPresShell,
+                                nsIContent *aContent)
 {
   nsIFrame *frame = aPresShell->GetPrimaryFrameFor(aContent);
   if (!frame)
     return PR_FALSE;
 
   nsIFrame* rootFrame = aPresShell->GetRootFrame();
   if (!rootFrame)
     return PR_FALSE;
@@ -332,17 +332,17 @@ nsAccUtils::DispatchMouseEvent(PRUint32 
   
   nsEventStatus status = nsEventStatus_eIgnore;
   aPresShell->HandleEventWithTarget(&event, frame, aContent, &status);
 
   return PR_TRUE;
 }
 
 PRUint32
-nsAccUtils::GetAccessKeyFor(nsIContent *aContent)
+nsCoreUtils::GetAccessKeyFor(nsIContent *aContent)
 {
   if (!aContent)
     return 0;
 
   // Accesskeys are registered by @accesskey attribute only. At first check
   // whether it is presented on the given element to avoid the slow
   // nsIEventStateManager::GetRegisteredAccessKey() method.
   if (!aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::accesskey))
@@ -365,33 +365,33 @@ nsAccUtils::GetAccessKeyFor(nsIContent *
     return 0;
 
   PRUint32 key = 0;
   esm->GetRegisteredAccessKey(aContent, &key);
   return key;
 }
 
 nsresult
-nsAccUtils::FireAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible,
-                         PRBool aIsAsynch)
+nsCoreUtils::FireAccEvent(PRUint32 aEventType, nsIAccessible *aAccessible,
+                          PRBool aIsAsynch)
 {
   NS_ENSURE_ARG(aAccessible);
 
   nsCOMPtr<nsPIAccessible> pAccessible(do_QueryInterface(aAccessible));
   NS_ASSERTION(pAccessible, "Accessible doesn't implement nsPIAccessible");
 
   nsCOMPtr<nsIAccessibleEvent> event =
     new nsAccEvent(aEventType, aAccessible, aIsAsynch);
   NS_ENSURE_TRUE(event, NS_ERROR_OUT_OF_MEMORY);
 
   return pAccessible->FireAccessibleEvent(event);
 }
 
 already_AddRefed<nsIDOMElement>
-nsAccUtils::GetDOMElementFor(nsIDOMNode *aNode)
+nsCoreUtils::GetDOMElementFor(nsIDOMNode *aNode)
 {
   nsCOMPtr<nsINode> node(do_QueryInterface(aNode));
   nsIDOMElement *element = nsnull;
 
   if (node->IsNodeOfType(nsINode::eELEMENT))
     CallQueryInterface(node, &element);
 
   else if (node->IsNodeOfType(nsINode::eTEXT))
@@ -411,50 +411,50 @@ nsAccUtils::GetDOMElementFor(nsIDOMNode 
     nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(node));
     domDoc->GetDocumentElement(&element);
   }
 
   return element;
 }
 
 PRBool
-nsAccUtils::IsAncestorOf(nsIDOMNode *aPossibleAncestorNode,
-                         nsIDOMNode *aPossibleDescendantNode)
+nsCoreUtils::IsAncestorOf(nsIDOMNode *aPossibleAncestorNode,
+                          nsIDOMNode *aPossibleDescendantNode)
 {
   NS_ENSURE_TRUE(aPossibleAncestorNode && aPossibleDescendantNode, PR_FALSE);
 
   nsCOMPtr<nsIDOMNode> loopNode = aPossibleDescendantNode;
   nsCOMPtr<nsIDOMNode> parentNode;
   while (NS_SUCCEEDED(loopNode->GetParentNode(getter_AddRefs(parentNode))) &&
          parentNode) {
     if (parentNode == aPossibleAncestorNode) {
       return PR_TRUE;
     }
     loopNode.swap(parentNode);
   }
   return PR_FALSE;
 }
 
 PRBool
-nsAccUtils::AreSiblings(nsIDOMNode *aDOMNode1,
-                       nsIDOMNode *aDOMNode2)
+nsCoreUtils::AreSiblings(nsIDOMNode *aDOMNode1,
+                        nsIDOMNode *aDOMNode2)
 {
   NS_ENSURE_TRUE(aDOMNode1 && aDOMNode2, PR_FALSE);
 
   nsCOMPtr<nsIDOMNode> parentNode1, parentNode2;
   if (NS_SUCCEEDED(aDOMNode1->GetParentNode(getter_AddRefs(parentNode1))) &&
       NS_SUCCEEDED(aDOMNode2->GetParentNode(getter_AddRefs(parentNode2))) &&
       parentNode1 == parentNode2) {
     return PR_TRUE;
   }
   return PR_FALSE;
 }
 
 already_AddRefed<nsIAccessible>
-nsAccUtils::GetAncestorWithRole(nsIAccessible *aDescendant, PRUint32 aRole)
+nsCoreUtils::GetAncestorWithRole(nsIAccessible *aDescendant, PRUint32 aRole)
 {
   nsCOMPtr<nsIAccessible> parentAccessible = aDescendant, testRoleAccessible;
   while (NS_SUCCEEDED(parentAccessible->GetParent(getter_AddRefs(testRoleAccessible))) &&
          testRoleAccessible) {
     PRUint32 testRole;
     testRoleAccessible->GetFinalRole(&testRole);
     if (testRole == aRole) {
       nsIAccessible *returnAccessible = testRoleAccessible;
@@ -466,18 +466,19 @@ nsAccUtils::GetAncestorWithRole(nsIAcces
       break;
     }
     parentAccessible.swap(testRoleAccessible);
   }
   return nsnull;
 }
 
 void
-nsAccUtils::GetARIATreeItemParent(nsIAccessible *aStartTreeItem, nsIContent *aStartContent,
-                                  nsIAccessible **aTreeItemParentResult)
+nsCoreUtils::GetARIATreeItemParent(nsIAccessible *aStartTreeItem,
+                                   nsIContent *aStartContent,
+                                   nsIAccessible **aTreeItemParentResult)
 {
   *aTreeItemParentResult = nsnull;
   nsAutoString levelStr;
   PRInt32 level = 0;
   if (aStartContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_level, levelStr)) {
     // This is a tree that uses aria-level to define levels, so find the first previous
     // sibling accessible where level is defined to be less than the current level
     PRInt32 success;
@@ -541,33 +542,33 @@ nsAccUtils::GetARIATreeItemParent(nsIAcc
   }
   if (role == nsIAccessibleRole::ROLE_OUTLINEITEM) {
     // Previous sibling of parent group is a tree item -- this is the conceptual tree item parent
     NS_ADDREF(*aTreeItemParentResult = prevAccessible);
   }
 }
 
 nsresult
-nsAccUtils::ScrollSubstringTo(nsIFrame *aFrame,
-                              nsIDOMNode *aStartNode, PRInt32 aStartIndex,
-                              nsIDOMNode *aEndNode, PRInt32 aEndIndex,
-                              PRUint32 aScrollType)
+nsCoreUtils::ScrollSubstringTo(nsIFrame *aFrame,
+                               nsIDOMNode *aStartNode, PRInt32 aStartIndex,
+                               nsIDOMNode *aEndNode, PRInt32 aEndIndex,
+                               PRUint32 aScrollType)
 {
   PRInt16 vPercent, hPercent;
   ConvertScrollTypeToPercents(aScrollType, &vPercent, &hPercent);
 
   return ScrollSubstringTo(aFrame, aStartNode, aStartIndex, aEndNode, aEndIndex,
                            vPercent, hPercent);
 }
 
 nsresult
-nsAccUtils::ScrollSubstringTo(nsIFrame *aFrame,
-                              nsIDOMNode *aStartNode, PRInt32 aStartIndex,
-                              nsIDOMNode *aEndNode, PRInt32 aEndIndex,
-                              PRInt16 aVPercent, PRInt16 aHPercent)
+nsCoreUtils::ScrollSubstringTo(nsIFrame *aFrame,
+                               nsIDOMNode *aStartNode, PRInt32 aStartIndex,
+                               nsIDOMNode *aEndNode, PRInt32 aEndIndex,
+                               PRInt16 aVPercent, PRInt16 aHPercent)
 {
   if (!aFrame || !aStartNode || !aEndNode)
     return NS_ERROR_FAILURE;
 
   nsPresContext *presContext = aFrame->PresContext();
 
   nsCOMPtr<nsIDOMRange> scrollToRange = do_CreateInstance(kRangeCID);
   NS_ENSURE_TRUE(scrollToRange, NS_ERROR_FAILURE);
@@ -593,19 +594,19 @@ nsAccUtils::ScrollSubstringTo(nsIFrame *
 
     selection->CollapseToStart();
   }
 
   return NS_OK;
 }
 
 void
-nsAccUtils::ScrollFrameToPoint(nsIFrame *aScrollableFrame,
-                               nsIFrame *aFrame,
-                               const nsIntPoint& aPoint)
+nsCoreUtils::ScrollFrameToPoint(nsIFrame *aScrollableFrame,
+                                nsIFrame *aFrame,
+                                const nsIntPoint& aPoint)
 {
   nsIScrollableFrame *scrollableFrame = nsnull;
   CallQueryInterface(aScrollableFrame, &scrollableFrame);
   if (!scrollableFrame)
     return;
 
   nsPresContext *presContext = aFrame->PresContext();
 
@@ -619,19 +620,19 @@ nsAccUtils::ScrollFrameToPoint(nsIFrame 
 
   nsPoint scrollPoint = scrollableFrame->GetScrollPosition();
   scrollPoint -= deltaPoint;
 
   scrollableFrame->ScrollTo(scrollPoint);
 }
 
 void
-nsAccUtils::ConvertScrollTypeToPercents(PRUint32 aScrollType,
-                                        PRInt16 *aVPercent,
-                                        PRInt16 *aHPercent)
+nsCoreUtils::ConvertScrollTypeToPercents(PRUint32 aScrollType,
+                                         PRInt16 *aVPercent,
+                                         PRInt16 *aHPercent)
 {
   switch (aScrollType)
   {
     case nsIAccessibleScrollType::SCROLL_TYPE_TOP_LEFT:
       *aVPercent = NS_PRESSHELL_SCROLL_TOP;
       *aHPercent = NS_PRESSHELL_SCROLL_LEFT;
       break;
     case nsIAccessibleScrollType::SCROLL_TYPE_BOTTOM_RIGHT:
@@ -656,20 +657,20 @@ nsAccUtils::ConvertScrollTypeToPercents(
       break;
     default:
       *aVPercent = NS_PRESSHELL_SCROLL_ANYWHERE;
       *aHPercent = NS_PRESSHELL_SCROLL_ANYWHERE;
   }
 }
 
 nsresult
-nsAccUtils::ConvertToScreenCoords(PRInt32 aX, PRInt32 aY,
-                                  PRUint32 aCoordinateType,
-                                  nsIAccessNode *aAccessNode,
-                                  nsIntPoint *aCoords)
+nsCoreUtils::ConvertToScreenCoords(PRInt32 aX, PRInt32 aY,
+                                   PRUint32 aCoordinateType,
+                                   nsIAccessNode *aAccessNode,
+                                   nsIntPoint *aCoords)
 {
   NS_ENSURE_ARG_POINTER(aCoords);
 
   aCoords->MoveTo(aX, aY);
 
   switch (aCoordinateType) {
     case nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE:
       break;
@@ -691,19 +692,19 @@ nsAccUtils::ConvertToScreenCoords(PRInt3
     default:
       return NS_ERROR_INVALID_ARG;
   }
 
   return NS_OK;
 }
 
 nsresult
-nsAccUtils::ConvertScreenCoordsTo(PRInt32 *aX, PRInt32 *aY,
-                                  PRUint32 aCoordinateType,
-                                  nsIAccessNode *aAccessNode)
+nsCoreUtils::ConvertScreenCoordsTo(PRInt32 *aX, PRInt32 *aY,
+                                   PRUint32 aCoordinateType,
+                                   nsIAccessNode *aAccessNode)
 {
   switch (aCoordinateType) {
     case nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE:
       break;
 
     case nsIAccessibleCoordinateType::COORDTYPE_WINDOW_RELATIVE:
     {
       NS_ENSURE_ARG(aAccessNode);
@@ -725,17 +726,17 @@ nsAccUtils::ConvertScreenCoordsTo(PRInt3
     default:
       return NS_ERROR_INVALID_ARG;
   }
 
   return NS_OK;
 }
 
 nsIntPoint
-nsAccUtils::GetScreenCoordsForWindow(nsIDOMNode *aNode)
+nsCoreUtils::GetScreenCoordsForWindow(nsIDOMNode *aNode)
 {
   nsIntPoint coords(0, 0);
   nsCOMPtr<nsIDocShellTreeItem> treeItem(GetDocShellTreeItemFor(aNode));
   if (!treeItem)
     return coords;
 
   nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
   treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
@@ -751,28 +752,28 @@ nsAccUtils::GetScreenCoordsForWindow(nsI
     return coords;
 
   windowInter->GetScreenX(&coords.x);
   windowInter->GetScreenY(&coords.y);
   return coords;
 }
 
 nsIntPoint
-nsAccUtils::GetScreenCoordsForWindow(nsIAccessNode *aAccessNode)
+nsCoreUtils::GetScreenCoordsForWindow(nsIAccessNode *aAccessNode)
 {
   nsCOMPtr<nsIDOMNode> DOMNode;
   aAccessNode->GetDOMNode(getter_AddRefs(DOMNode));
   if (DOMNode)
     return GetScreenCoordsForWindow(DOMNode);
 
   return nsIntPoint(0, 0);
 }
 
 nsIntPoint
-nsAccUtils::GetScreenCoordsForParent(nsIAccessNode *aAccessNode)
+nsCoreUtils::GetScreenCoordsForParent(nsIAccessNode *aAccessNode)
 {
   nsCOMPtr<nsPIAccessNode> parent;
   nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(aAccessNode));
   if (accessible) {
     nsCOMPtr<nsIAccessible> parentAccessible;
     accessible->GetParent(getter_AddRefs(parentAccessible));
     parent = do_QueryInterface(parentAccessible);
   } else {
@@ -788,17 +789,17 @@ nsAccUtils::GetScreenCoordsForParent(nsI
   if (!parentFrame)
     return nsIntPoint(0, 0);
 
   nsIntRect parentRect = parentFrame->GetScreenRectExternal();
   return nsIntPoint(parentRect.x, parentRect.y);
 }
 
 already_AddRefed<nsIDocShellTreeItem>
-nsAccUtils::GetDocShellTreeItemFor(nsIDOMNode *aNode)
+nsCoreUtils::GetDocShellTreeItemFor(nsIDOMNode *aNode)
 {
   if (!aNode)
     return nsnull;
 
   nsCOMPtr<nsIDOMDocument> domDoc;
   aNode->GetOwnerDocument(getter_AddRefs(domDoc));
   nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
   if (!doc)
@@ -811,65 +812,65 @@ nsAccUtils::GetDocShellTreeItemFor(nsIDO
   nsIDocShellTreeItem *docShellTreeItem = nsnull;
   if (container)
     CallQueryInterface(container, &docShellTreeItem);
 
   return docShellTreeItem;
 }
 
 nsIFrame*
-nsAccUtils::GetFrameFor(nsIDOMElement *aElm)
+nsCoreUtils::GetFrameFor(nsIDOMElement *aElm)
 {
   nsCOMPtr<nsIPresShell> shell = nsAccessNode::GetPresShellFor(aElm);
   if (!shell)
     return nsnull;
   
   nsCOMPtr<nsIContent> content(do_QueryInterface(aElm));
   if (!content)
     return nsnull;
   
   return shell->GetPrimaryFrameFor(content);
 }
 
 PRBool
-nsAccUtils::GetID(nsIContent *aContent, nsAString& aID)
+nsCoreUtils::GetID(nsIContent *aContent, nsAString& aID)
 {
   nsIAtom *idAttribute = aContent->GetIDAttributeName();
   return idAttribute ? aContent->GetAttr(kNameSpaceID_None, idAttribute, aID) : PR_FALSE;
 }
 
 PRBool
-nsAccUtils::IsXLink(nsIContent *aContent)
+nsCoreUtils::IsXLink(nsIContent *aContent)
 {
   if (!aContent)
     return PR_FALSE;
 
   return aContent->AttrValueIs(kNameSpaceID_XLink, nsAccessibilityAtoms::type,
                                nsAccessibilityAtoms::simple, eCaseMatters) &&
          aContent->HasAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href);
 }
 
 nsIContent*
-nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode, 
-                                        nsIAtom *aRelationAttr,
-                                        nsIAtom *aTagName,
-                                        PRUint32 aAncestorLevelsToSearch)
+nsCoreUtils::FindNeighbourPointingToNode(nsIContent *aForNode, 
+                                         nsIAtom *aRelationAttr,
+                                         nsIAtom *aTagName,
+                                         PRUint32 aAncestorLevelsToSearch)
 {
   return FindNeighbourPointingToNode(aForNode, &aRelationAttr, 1, aTagName, aAncestorLevelsToSearch);
 }
 
 nsIContent*
-nsAccUtils::FindNeighbourPointingToNode(nsIContent *aForNode, 
-                                        nsIAtom **aRelationAttrs,
-                                        PRUint32 aAttrNum,
-                                        nsIAtom *aTagName,
-                                        PRUint32 aAncestorLevelsToSearch)
+nsCoreUtils::FindNeighbourPointingToNode(nsIContent *aForNode, 
+                                         nsIAtom **aRelationAttrs,
+                                         PRUint32 aAttrNum,
+                                         nsIAtom *aTagName,
+                                         PRUint32 aAncestorLevelsToSearch)
 {
   nsAutoString controlID;
-  if (!nsAccUtils::GetID(aForNode, controlID)) {
+  if (!nsCoreUtils::GetID(aForNode, controlID)) {
     if (!aForNode->IsInAnonymousSubtree())
       return nsnull;
 
     aForNode->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::anonid, controlID);
     if (controlID.IsEmpty())
       return nsnull;
   }
 
@@ -926,49 +927,49 @@ nsAccUtils::FindNeighbourPointingToNode(
     prevSearched = aForNode;
   }
 
   return labelContent;
 }
 
 // Pass in aAriaProperty = null and aRelationAttr == nsnull if any <label> will do
 nsIContent*
-nsAccUtils::FindDescendantPointingToID(const nsString *aId,
-                                       nsIContent *aLookContent,
-                                       nsIAtom **aRelationAttrs,
-                                       PRUint32 aAttrNum,
-                                       nsIContent *aExcludeContent,
-                                       nsIAtom *aTagType)
+nsCoreUtils::FindDescendantPointingToID(const nsString *aId,
+                                        nsIContent *aLookContent,
+                                        nsIAtom **aRelationAttrs,
+                                        PRUint32 aAttrNum,
+                                        nsIContent *aExcludeContent,
+                                        nsIAtom *aTagType)
 {
   // Surround id with spaces for search
   nsCAutoString idWithSpaces(' ');
   LossyAppendUTF16toASCII(*aId, idWithSpaces);
   idWithSpaces += ' ';
   return FindDescendantPointingToIDImpl(idWithSpaces, aLookContent,
                                         aRelationAttrs, aAttrNum,
                                         aExcludeContent, aTagType);
 }
 
 nsIContent*
-nsAccUtils::FindDescendantPointingToID(const nsString *aId,
-                                       nsIContent *aLookContent,
-                                       nsIAtom *aRelationAttr,
-                                       nsIContent *aExcludeContent,
-                                       nsIAtom *aTagType)
+nsCoreUtils::FindDescendantPointingToID(const nsString *aId,
+                                        nsIContent *aLookContent,
+                                        nsIAtom *aRelationAttr,
+                                        nsIContent *aExcludeContent,
+                                        nsIAtom *aTagType)
 {
   return FindDescendantPointingToID(aId, aLookContent, &aRelationAttr, 1, aExcludeContent, aTagType);
 }
 
 nsIContent*
-nsAccUtils::FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
-                                           nsIContent *aLookContent,
-                                           nsIAtom **aRelationAttrs,
-                                           PRUint32 aAttrNum,
-                                           nsIContent *aExcludeContent,
-                                           nsIAtom *aTagType)
+nsCoreUtils::FindDescendantPointingToIDImpl(nsCString& aIdWithSpaces,
+                                            nsIContent *aLookContent,
+                                            nsIAtom **aRelationAttrs,
+                                            PRUint32 aAttrNum,
+                                            nsIContent *aExcludeContent,
+                                            nsIAtom *aTagType)
 {
   NS_ENSURE_TRUE(aLookContent, nsnull);
   NS_ENSURE_TRUE(aRelationAttrs && *aRelationAttrs, nsnull);
 
   if (!aTagType || aLookContent->Tag() == aTagType) {
     // Tag matches
     // Check for ID in the attributes aRelationAttrs, which can be a list
     for (PRUint32 i = 0; i < aAttrNum; i++) {
@@ -1005,30 +1006,30 @@ nsAccUtils::FindDescendantPointingToIDIm
         return labelContent;
       }
     }
   }
   return nsnull;
 }
 
 void
-nsAccUtils::GetLanguageFor(nsIContent *aContent, nsIContent *aRootContent,
-                           nsAString& aLanguage)
+nsCoreUtils::GetLanguageFor(nsIContent *aContent, nsIContent *aRootContent,
+                            nsAString& aLanguage)
 {
   aLanguage.Truncate();
 
   nsIContent *walkUp = aContent;
   while (walkUp && walkUp != aRootContent &&
          !walkUp->GetAttr(kNameSpaceID_None,
                           nsAccessibilityAtoms::lang, aLanguage))
     walkUp = walkUp->GetParent();
 }
 
 nsRoleMapEntry*
-nsAccUtils::GetRoleMapEntry(nsIDOMNode *aNode)
+nsCoreUtils::GetRoleMapEntry(nsIDOMNode *aNode)
 {
   nsIContent *content = nsAccessible::GetRoleContent(aNode);
   nsAutoString roleString;
   if (!content || !content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString)) {
     return nsnull;
   }
 
   nsWhitespaceTokenizer tokenizer(roleString);
@@ -1054,17 +1055,17 @@ nsAccUtils::GetRoleMapEntry(nsIDOMNode *
   }
 
   // Always use some entry if there is a role string
   // To ensure an accessible object is created
   return &nsARIAMap::gLandmarkRoleMap;
 }
 
 PRBool
-nsAccUtils::IsARIAPropForObjectAttr(nsIAtom *aAtom)
+nsCoreUtils::IsARIAPropForObjectAttr(nsIAtom *aAtom)
 {
   return aAtom != nsAccessibilityAtoms::aria_activedescendant &&
          aAtom != nsAccessibilityAtoms::aria_checked &&
          aAtom != nsAccessibilityAtoms::aria_controls &&
          aAtom != nsAccessibilityAtoms::aria_describedby &&
          aAtom != nsAccessibilityAtoms::aria_disabled &&
          aAtom != nsAccessibilityAtoms::aria_expanded &&
          aAtom != nsAccessibilityAtoms::aria_flowto &&
@@ -1080,18 +1081,19 @@ nsAccUtils::IsARIAPropForObjectAttr(nsIA
          aAtom != nsAccessibilityAtoms::aria_required &&
          aAtom != nsAccessibilityAtoms::aria_selected &&
          aAtom != nsAccessibilityAtoms::aria_valuemax &&
          aAtom != nsAccessibilityAtoms::aria_valuemin &&
          aAtom != nsAccessibilityAtoms::aria_valuenow &&
          aAtom != nsAccessibilityAtoms::aria_valuetext;
 }
 
-void nsAccUtils::GetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
-                                                nsIContent *aStartContent, nsIContent *aTopContent)
+void nsCoreUtils::GetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
+                                             nsIContent *aStartContent,
+                                             nsIContent *aTopContent)
 {
   nsAutoString atomic, live, relevant, channel, busy;
   nsIContent *ancestor = aStartContent;
   while (ancestor) {
     if (relevant.IsEmpty() &&
         ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_relevant, relevant))
       SetAccAttr(aAttributes, nsAccessibilityAtoms::containerRelevant, relevant);
     if (live.IsEmpty() &&
rename from accessible/src/base/nsAccessibilityUtils.h
rename to accessible/src/base/nsCoreUtils.h
--- a/accessible/src/base/nsAccessibilityUtils.h
+++ b/accessible/src/base/nsCoreUtils.h
@@ -31,33 +31,33 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef nsAccessibilityUtils_h_
-#define nsAccessibilityUtils_h_
+#ifndef nsCoreUtils_h_
+#define nsCoreUtils_h_
 
 #include "nsAccessibilityAtoms.h"
 #include "nsIAccessible.h"
 #include "nsIAccessNode.h"
 #include "nsARIAMap.h"
 
 #include "nsIDOMNode.h"
 #include "nsIPersistentProperties2.h"
 #include "nsIContent.h"
 #include "nsIFrame.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsPoint.h"
 #include "nsIAccessibleDocument.h"
 
-class nsAccUtils
+class nsCoreUtils
 {
 public:
   /**
    * Returns value of attribute from the given attributes container.
    *
    * @param aAttributes - attributes container
    * @param aAttrName - the name of requested attribute
    * @param aAttrValue - value of attribute
--- a/accessible/src/base/nsDocAccessible.cpp
+++ b/accessible/src/base/nsDocAccessible.cpp
@@ -112,17 +112,17 @@ nsDocAccessible::nsDocAccessible(nsIDOMN
       }
     }
   }
 
   // XXX aaronl should we use an algorithm for the initial cache size?
   mAccessNodeCache.Init(kDefaultCacheSize);
 
   nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(docShellTreeItem);
   if (docShell) {
     PRUint32 busyFlags;
     docShell->GetBusyFlags(&busyFlags);
     if (busyFlags == nsIDocShell::BUSY_FLAGS_NONE) {
       mIsContentLoaded = PR_TRUE;                                               
     }
   }
@@ -198,17 +198,17 @@ nsDocAccessible::GetName(nsAString& aNam
   return rv;
 }
 
 NS_IMETHODIMP nsDocAccessible::GetRole(PRUint32 *aRole)
 {
   *aRole = nsIAccessibleRole::ROLE_PANE; // Fall back
 
   nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   if (docShellTreeItem) {
     nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
     docShellTreeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
     PRInt32 itemType;
     docShellTreeItem->GetItemType(&itemType);
     if (sameTypeRoot == docShellTreeItem) {
       // Root of content or chrome tree
       if (itemType == nsIDocShellTreeItem::typeChrome) {
@@ -242,17 +242,17 @@ NS_IMETHODIMP nsDocAccessible::SetRoleMa
   mRoleMapEntry = aRoleMapEntry;
 
   // Allow use of ARIA role from outer to override
   nsIDocument *parentDoc = mDocument->GetParentDocument();
   NS_ENSURE_TRUE(parentDoc, NS_ERROR_FAILURE);
   nsIContent *ownerContent = parentDoc->FindContentForSubDocument(mDocument);
   nsCOMPtr<nsIDOMNode> ownerNode(do_QueryInterface(ownerContent));
   if (ownerNode) {
-    nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(ownerNode);
+    nsRoleMapEntry *roleMapEntry = nsCoreUtils::GetRoleMapEntry(ownerNode);
     if (roleMapEntry)
       mRoleMapEntry = roleMapEntry; // Override
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP 
@@ -366,17 +366,17 @@ NS_IMETHODIMP nsDocAccessible::TakeFocus
   NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
   PRUint32 state;
   GetState(&state, nsnull);
   if (0 == (state & nsIAccessibleStates::STATE_FOCUSABLE)) {
     return NS_ERROR_FAILURE; // Not focusable
   }
 
   nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(treeItem);
   NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIPresShell> shell(GetPresShell());
   if (!shell) {
     NS_WARNING("Was not shutdown properly via InvalidateCacheSubtree()");
     return NS_ERROR_FAILURE;
   }
@@ -502,17 +502,17 @@ NS_IMETHODIMP nsDocAccessible::GetAssoci
   if (!mDocument)
     return NS_ERROR_FAILURE;
 
   // Check if document is editable (designMode="on" case). Otherwise check if
   // the html:body (for HTML document case) or document element is editable.
   if (!mDocument->HasFlag(NODE_IS_EDITABLE)) {
     nsCOMPtr<nsIDOMNode> DOMDocument(do_QueryInterface(mDocument));
     nsCOMPtr<nsIDOMElement> DOMElement =
-      nsAccUtils::GetDOMElementFor(DOMDocument);
+      nsCoreUtils::GetDOMElementFor(DOMDocument);
     nsCOMPtr<nsIContent> content(do_QueryInterface(DOMElement));
 
     if (!content->HasFlag(NODE_IS_EDITABLE))
       return NS_OK;
   }
 
   nsCOMPtr<nsISupports> container = mDocument->GetContainer();
   nsCOMPtr<nsIEditingSession> editingSession(do_GetInterface(container));
@@ -612,17 +612,17 @@ NS_IMETHODIMP nsDocAccessible::Init()
 
 NS_IMETHODIMP nsDocAccessible::Shutdown()
 {
   if (!mWeakShell) {
     return NS_OK;  // Already shutdown
   }
 
   nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   ShutdownChildDocuments(treeItem);
 
   RemoveEventListeners();
 
   mWeakShell = nsnull;  // Avoid reentrancy
 
   ClearCache(mAccessNodeCache);
 
@@ -868,17 +868,17 @@ NS_IMETHODIMP nsDocAccessible::FireDocLo
   mIsContentLoaded = isFinished;
   if (isFinished) {
     if (mIsLoadCompleteFired)
       return NS_OK;
     mIsLoadCompleteFired = PR_TRUE;
   }
 
   nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   if (!treeItem) {
     return NS_OK;
   }
   nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
   treeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
 
   if (isFinished) {
     // Need to wait until scrollable view is available
@@ -892,17 +892,17 @@ NS_IMETHODIMP nsDocAccessible::FireDocLo
     if (sameTypeRoot != treeItem) {
       // Fire show/hide events to indicate frame/iframe content is new, rather than
       // doc load event which causes screen readers to act is if entire page is reloaded
       InvalidateCacheSubtree(nsnull, nsIAccessibleEvent::EVENT_DOM_SIGNIFICANT_CHANGE);
     }
     // Fire STATE_CHANGE event for doc load finish if focus is in same doc tree
     if (gLastFocusedNode) {
       nsCOMPtr<nsIDocShellTreeItem> focusedTreeItem =
-        nsAccUtils::GetDocShellTreeItemFor(gLastFocusedNode);
+        nsCoreUtils::GetDocShellTreeItemFor(gLastFocusedNode);
       if (focusedTreeItem) {
         nsCOMPtr<nsIDocShellTreeItem> sameTypeRootOfFocus;
         focusedTreeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRootOfFocus));
         if (sameTypeRoot == sameTypeRootOfFocus) {
           nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent =
             new nsAccStateChangeEvent(this, nsIAccessibleStates::STATE_BUSY, PR_FALSE, PR_FALSE);
           FireAccessibleEvent(accEvent);
           FireAnchorJumpEvent();
@@ -917,32 +917,32 @@ NS_IMETHODIMP nsDocAccessible::FireDocLo
       // Fire state change event to set STATE_BUSY when document is loading. For
       // example, Window-Eyes expects to get it.
       nsCOMPtr<nsIAccessibleStateChangeEvent> accEvent =
         new nsAccStateChangeEvent(this, nsIAccessibleStates::STATE_BUSY,
                                   PR_FALSE, PR_TRUE);
       FireAccessibleEvent(accEvent);
     }
 
-    nsAccUtils::FireAccEvent(aEventType, this);
+    nsCoreUtils::FireAccEvent(aEventType, this);
   }
   return NS_OK;
 }
 
 void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
 {
   nsDocAccessible *docAcc = reinterpret_cast<nsDocAccessible*>(aClosure);
 
   if (docAcc && docAcc->mScrollPositionChangedTicks &&
       ++docAcc->mScrollPositionChangedTicks > 2) {
     // Whenever scroll position changes, mScrollPositionChangeTicks gets reset to 1
     // We only want to fire accessibilty scroll event when scrolling stops or pauses
     // Therefore, we wait for no scroll events to occur between 2 ticks of this timer
     // That indicates a pause in scrolling, so we fire the accessibilty scroll event
-    nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SCROLLING_END, docAcc);
+    nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SCROLLING_END, docAcc);
 
     docAcc->mScrollPositionChangedTicks = 0;
     if (docAcc->mScrollWatchTimer) {
       docAcc->mScrollWatchTimer->Cancel();
       docAcc->mScrollWatchTimer = nsnull;
       NS_RELEASE(docAcc); // Release kung fu death grip
     }
   }
@@ -1475,17 +1475,17 @@ nsDocAccessible::CreateTextChangeEventFo
       return nsnull; // No descendant content that represents any text in the hypertext parent
     }
     nsCOMPtr<nsIAccessible> child = changeAccessible;
     while (PR_TRUE) {
       nsCOMPtr<nsIAccessNode> childAccessNode =
         do_QueryInterface(changeAccessible);
       nsCOMPtr<nsIDOMNode> childNode;
       childAccessNode->GetDOMNode(getter_AddRefs(childNode));
-      if (!nsAccUtils::IsAncestorOf(aChangeNode, childNode)) {
+      if (!nsCoreUtils::IsAncestorOf(aChangeNode, childNode)) {
         break;  // We only want accessibles with DOM nodes as children of this node
       }
       length += TextLength(child);
       child->GetNextSibling(getter_AddRefs(changeAccessible));
       if (!changeAccessible) {
         break;
       }
       child.swap(changeAccessible);
@@ -1672,30 +1672,30 @@ NS_IMETHODIMP nsDocAccessible::FlushPend
           accessibleText->GetCharacterAtOffset(caretOffset, &chAtOffset);
           printf("\nCaret moved to %d with char %c", caretOffset, chAtOffset);
 #endif
 #ifdef DEBUG_CARET
           // Test caret line # -- fire an EVENT_ALERT on the focused node so we can watch the
           // line-number object attribute on it
           nsCOMPtr<nsIAccessible> accForFocus;
           GetAccService()->GetAccessibleFor(gLastFocusedNode, getter_AddRefs(accForFocus));
-          nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_ALERT, accForFocus);
+          nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_ALERT, accForFocus);
 #endif
           nsCOMPtr<nsIAccessibleCaretMoveEvent> caretMoveEvent =
             new nsAccCaretMoveEvent(accessible, caretOffset);
           if (!caretMoveEvent)
             break; // Out of memory, break out to release kung fu death grip
 
           FireAccessibleEvent(caretMoveEvent);
 
           PRInt32 selectionCount;
           accessibleText->GetSelectionCount(&selectionCount);
           if (selectionCount) {  // There's a selection so fire selection change as well
-            nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED,
-                                     accessible, PR_TRUE);
+            nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED,
+                                      accessible, PR_TRUE);
           }
         } 
       }
       else {
         // The input state was previously stored with the nsIAccessibleEvent,
         // so use that state now when firing the event
         nsAccEvent::PrepareForEvent(accessibleEvent);
         FireAccessibleEvent(accessibleEvent);
@@ -1768,18 +1768,18 @@ void nsDocAccessible::RefreshNodes(nsIDO
     PRUint32 role = Role(accessible);
     if (role == nsIAccessibleRole::ROLE_MENUPOPUP) {
       nsCOMPtr<nsIDOMNode> domNode;
       accessNode->GetDOMNode(getter_AddRefs(domNode));
       nsCOMPtr<nsIDOMXULPopupElement> popup(do_QueryInterface(domNode));
       if (!popup) {
         // Popup elements already fire these via DOMMenuInactive
         // handling in nsRootAccessible::HandleEvent
-        nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
-                                 accessible);
+        nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
+                                  accessible);
       }
     }
     nsCOMPtr<nsPIAccessible> privateAccessible = do_QueryInterface(accessible);
     NS_ASSERTION(privateAccessible, "No nsPIAccessible for nsIAccessible");
 
     nsCOMPtr<nsIAccessible> childAccessible;
     // we only need to shutdown the accessibles here if one of them has been created
     privateAccessible->GetCachedFirstChild(getter_AddRefs(childAccessible));
@@ -2008,17 +2008,17 @@ NS_IMETHODIMP nsDocAccessible::Invalidat
     PRUint32 additionEvent = isAsynch ? nsIAccessibleEvent::EVENT_ASYNCH_SHOW :
                                         nsIAccessibleEvent::EVENT_DOM_CREATE;
     FireDelayedToolkitEvent(additionEvent, childNode,
                             nsAccEvent::eCoalesceFromSameSubtree,
                             isAsynch);
 
     // Check to see change occured in an ARIA menu, and fire
     // an EVENT_MENUPOPUP_START if it did.
-    nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(childNode);
+    nsRoleMapEntry *roleMapEntry = nsCoreUtils::GetRoleMapEntry(childNode);
     if (roleMapEntry && roleMapEntry->role == nsIAccessibleRole::ROLE_MENUPOPUP) {
       FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_START,
                               childNode, nsAccEvent::eRemoveDupes,
                               isAsynch);
     }
 
     // Check to see if change occured inside an alert, and fire an EVENT_ALERT if it did
     nsIContent *ancestor = aChild;
@@ -2029,17 +2029,17 @@ NS_IMETHODIMP nsDocAccessible::Invalidat
                                 nsAccEvent::eRemoveDupes, isAsynch);
         break;
       }
       ancestor = ancestor->GetParent();
       nsCOMPtr<nsIDOMNode> ancestorNode = do_QueryInterface(ancestor);
       if (!ancestorNode) {
         break;
       }
-      roleMapEntry = nsAccUtils::GetRoleMapEntry(ancestorNode);
+      roleMapEntry = nsCoreUtils::GetRoleMapEntry(ancestorNode);
     }
   }
 
   FireValueChangeForTextFields(containerAccessible);
 
   if (childAccessible) {
     // Fire an event so the MSAA clients know the children have changed. Also
     // the event is used internally by MSAA part.
--- a/accessible/src/base/nsRootAccessible.cpp
+++ b/accessible/src/base/nsRootAccessible.cpp
@@ -130,17 +130,17 @@ nsRootAccessible::GetName(nsAString& aNa
   if (mRoleMapEntry) {
     nsAccessible::GetName(aName);
     if (!aName.IsEmpty()) {
       return NS_OK;
     }
   }
 
   nsCOMPtr<nsIDocShellTreeItem> docShellAsItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   NS_ENSURE_TRUE(docShellAsItem, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
   docShellAsItem->GetTreeOwner(getter_AddRefs(treeOwner));
 
   nsCOMPtr<nsIBaseWindow> baseWindow(do_QueryInterface(treeOwner));
   if (baseWindow) {
     nsXPIDLString title;
@@ -190,17 +190,17 @@ NS_IMETHODIMP nsRootAccessible::GetRole(
 
 #ifdef MOZ_XUL
 PRUint32 nsRootAccessible::GetChromeFlags()
 {
   // Return the flag set for the top level window as defined 
   // by nsIWebBrowserChrome::CHROME_WINDOW_[FLAGNAME]
   // Not simple: nsIXULWindow is not just a QI from nsIDOMWindow
   nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   NS_ENSURE_TRUE(treeItem, 0);
   nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
   treeItem->GetTreeOwner(getter_AddRefs(treeOwner));
   NS_ENSURE_TRUE(treeOwner, 0);
   nsCOMPtr<nsIXULWindow> xulWin(do_GetInterface(treeOwner));
   if (!xulWin) {
     return 0;
   }
@@ -381,17 +381,17 @@ void nsRootAccessible::TryFireEarlyLoadE
 
   // Note, we don't fire any page load finished events for chrome or for
   // frame/iframe page loads during the initial complete page load -- that page
   // load event for the entire content pane needs to stand alone.
 
   // This also works for firing events for error pages
 
   nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    nsAccUtils::GetDocShellTreeItemFor(aDocNode);
+    nsCoreUtils::GetDocShellTreeItemFor(aDocNode);
   NS_ASSERTION(treeItem, "No docshelltreeitem for aDocNode");
   if (!treeItem) {
     return;
   }
   PRInt32 itemType;
   treeItem->GetItemType(&itemType);
   if (itemType != nsIDocShellTreeItem::typeContent) {
     return;
@@ -493,22 +493,24 @@ PRBool nsRootAccessible::FireAccessibleF
   gLastFocusedAccessiblesState = State(finalFocusAccessible);
   PRUint32 role = Role(finalFocusAccessible);
   if (role == nsIAccessibleRole::ROLE_MENUITEM) {
     if (!mCurrentARIAMenubar) {  // Entering menus
       PRUint32 naturalRole; // The natural role is the role that this type of element normally has
       finalFocusAccessible->GetRole(&naturalRole);
       if (role != naturalRole) { // Must be a DHTML menuitem
         nsCOMPtr<nsIAccessible> menuBarAccessible =
-          nsAccUtils::GetAncestorWithRole(finalFocusAccessible, nsIAccessibleRole::ROLE_MENUBAR);
+          nsCoreUtils::GetAncestorWithRole(finalFocusAccessible,
+                                           nsIAccessibleRole::ROLE_MENUBAR);
         nsCOMPtr<nsIAccessNode> menuBarAccessNode = do_QueryInterface(menuBarAccessible);
         if (menuBarAccessNode) {
           menuBarAccessNode->GetDOMNode(getter_AddRefs(mCurrentARIAMenubar));
           if (mCurrentARIAMenubar) {
-            nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENU_START, menuBarAccessible);
+            nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENU_START,
+                                      menuBarAccessible);
           }
         }
       }
     }
   }
   else if (mCurrentARIAMenubar) {
     nsCOMPtr<nsIAccessibleEvent> menuEndEvent =
       new nsAccEvent(nsIAccessibleEvent::EVENT_MENU_END, mCurrentARIAMenubar,
@@ -648,17 +650,17 @@ nsresult nsRootAccessible::HandleEventWi
   if (eventType.EqualsLiteral("popuphiding")) {
     // If accessible focus was on or inside popup that closes,
     // then restore it to true current focus.
     // This is the case when we've been getting DOMMenuItemActive events
     // inside of a combo box that closes. The real focus is on the combo box.
     // It's also the case when a popup gets focus in ATK -- when it closes
     // we need to fire an event to restore focus to where it was
     if (!gLastFocusedNode ||
-        !nsAccUtils::IsAncestorOf(aTargetNode, gLastFocusedNode)) {
+        !nsCoreUtils::IsAncestorOf(aTargetNode, gLastFocusedNode)) {
       return NS_OK;  // And was not focused on an item inside the popup
     }
     // Focus was on or inside of a popup that's being hidden
     FireCurrentFocusEvent();
   }
 
   nsCOMPtr<nsIAccessible> accessible;
   accService->GetAccessibleInShell(aTargetNode, eventShell,
@@ -763,22 +765,22 @@ nsresult nsRootAccessible::HandleEventWi
         do_QueryInterface(aTargetNode);
       nsAutoString selType;
       multiSel->GetSelType(selType);
       if (selType.IsEmpty() || !selType.EqualsLiteral("single")) {
         // XXX: We need to fire EVENT_SELECTION_ADD and EVENT_SELECTION_REMOVE
         // for each tree item. Perhaps each tree item will need to cache its
         // selection state and fire an event after a DOM "select" event when
         // that state changes. nsXULTreeAccessible::UpdateTreeSelection();
-        return nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
-                                        accessible);
+        return nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
+                                         accessible);
       }
 
-      return nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SELECTION,
-                                      treeItemAccessible);
+      return nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SELECTION,
+                                       treeItemAccessible);
     }
   }
   else
 #endif
   if (eventType.EqualsLiteral("focus")) {
     if (aTargetNode == mDOMNode && mDOMNode != gLastFocusedNode) {
       // Got focus event for the window, we will make sure that an accessible
       // focus event for initial focus is fired. We do this on a short timer
@@ -819,40 +821,40 @@ nsresult nsRootAccessible::HandleEventWi
           if (!accessible)
             return NS_OK;
         }
       }
     }
     FireAccessibleFocusEvent(accessible, focusedItem, aEvent);
   }
   else if (eventType.EqualsLiteral("AlertActive")) { 
-    nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
+    nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
   }
   else if (eventType.EqualsLiteral("popupshown")) {
     // Don't fire menupopup events for combobox and autocomplete lists
     PRUint32 role = Role(accessible);
     PRInt32 event = 0;
     if (role == nsIAccessibleRole::ROLE_MENUPOPUP) {
       event = nsIAccessibleEvent::EVENT_MENUPOPUP_START;
     }
     else if (role == nsIAccessibleRole::ROLE_TOOLTIP) {
       // There is a single <xul:tooltip> node which Mozilla moves around.
       // The accessible for it stays the same no matter where it moves. 
       // AT's expect to get an EVENT_SHOW for the tooltip. 
       // In event callback the tooltip's accessible will be ready.
       event = nsIAccessibleEvent::EVENT_ASYNCH_SHOW;
     }
     if (event) {
-      nsAccUtils::FireAccEvent(event, accessible);
+      nsCoreUtils::FireAccEvent(event, accessible);
     }
   }
   else if (eventType.EqualsLiteral("DOMMenuInactive")) {
     if (Role(accessible) == nsIAccessibleRole::ROLE_MENUPOPUP) {
-      nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
-                               accessible);
+      nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
+                                accessible);
     }
   }
   else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
     PRBool fireFocus = PR_FALSE;
     if (!treeItemAccessible) {
 #ifdef MOZ_XUL
       if (isTree) {
         return NS_OK; // Tree with nothing selected
@@ -907,29 +909,32 @@ nsresult nsRootAccessible::HandleEventWi
     }
     if (fireFocus) {
       nsAccEvent::PrepareForEvent(aTargetNode, PR_TRUE);  // Always asynch, always from user input
       FireAccessibleFocusEvent(accessible, aTargetNode, aEvent, PR_TRUE, PR_TRUE);
     }
   }
   else if (eventType.EqualsLiteral("DOMMenuBarActive")) {  // Always asynch, always from user input
     nsAccEvent::PrepareForEvent(aTargetNode, PR_TRUE);
-    nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENU_START, accessible, PR_TRUE);
+    nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENU_START,
+                              accessible, PR_TRUE);
   }
   else if (eventType.EqualsLiteral("DOMMenuBarInactive")) {  // Always asynch, always from user input
     nsAccEvent::PrepareForEvent(aTargetNode, PR_TRUE);
-    nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENU_END, accessible, PR_TRUE);
+    nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_MENU_END,
+                              accessible, PR_TRUE);
     FireCurrentFocusEvent();
   }
   else if (eventType.EqualsLiteral("ValueChange")) {
     FireDelayedToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE, aTargetNode, nsAccEvent::eRemoveDupes);
   }
 #ifdef DEBUG
   else if (eventType.EqualsLiteral("mouseover")) {
-    nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_DRAGDROP_START, accessible);
+    nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_DRAGDROP_START,
+                              accessible);
   }
 #endif
   return NS_OK;
 }
 
 void nsRootAccessible::GetTargetNode(nsIDOMEvent *aEvent, nsIDOMNode **aTargetNode)
 {
   *aTargetNode = nsnull;
@@ -1052,17 +1057,17 @@ NS_IMETHODIMP nsRootAccessible::GetAcces
 {
   *aRelated = nsnull;
 
   if (!mDOMNode || aRelationType != nsIAccessibleRelation::RELATION_EMBEDS) {
     return nsDocAccessibleWrap::GetAccessibleRelated(aRelationType, aRelated);
   }
 
   nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   nsCOMPtr<nsIDocShellTreeItem> contentTreeItem = GetContentDocShell(treeItem);
   // there may be no content area, so we need a null check
   if (contentTreeItem) {
     nsCOMPtr<nsIAccessibleDocument> accDoc =
       GetDocAccessibleFor(contentTreeItem, PR_TRUE);
     NS_ASSERTION(accDoc, "No EMBEDS document");
     if (accDoc) {
       accDoc->QueryInterface(NS_GET_IID(nsIAccessible), (void**)aRelated);
@@ -1073,17 +1078,17 @@ NS_IMETHODIMP nsRootAccessible::GetAcces
 
 NS_IMETHODIMP nsRootAccessible::FireDocLoadEvents(PRUint32 aEventType)
 {
   if (!mDocument || !mWeakShell) {
     return NS_OK;  // Document has been shut down
   }
 
   nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   NS_ASSERTION(docShellTreeItem, "No doc shell tree item for document");
   NS_ENSURE_TRUE(docShellTreeItem, NS_ERROR_FAILURE);
   PRInt32 contentType;
   docShellTreeItem->GetItemType(&contentType);
   if (contentType == nsIDocShellTreeItem::typeContent) {
     return nsDocAccessibleWrap::FireDocLoadEvents(aEventType); // Content might need to fire event
   }
 
--- a/accessible/src/base/nsTextUtils.cpp
+++ b/accessible/src/base/nsTextUtils.cpp
@@ -34,30 +34,30 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsTextUtils.h"
 
 #include "nsAccessNode.h"
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsLangTextAttr
 
 PRBool
 nsLangTextAttr::Equal(nsIDOMElement *aElm)
 {
   nsCOMPtr<nsIContent> content(do_QueryInterface(aElm));
   if (!content)
     return PR_FALSE;
 
   nsAutoString lang;
-  nsAccUtils::GetLanguageFor(content, mRootContent, lang);
+  nsCoreUtils::GetLanguageFor(content, mRootContent, lang);
 
   return lang == mLang;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsCSSTextAttr
 
 /**
@@ -186,17 +186,17 @@ nsBackgroundTextAttr::nsBackgroundTextAt
                                            nsIFrame *aRootFrame) :
   mFrame(aFrame), mRootFrame(aRootFrame)
 {
 }
 
 PRBool
 nsBackgroundTextAttr::Equal(nsIDOMElement *aElm)
 {
-  nsIFrame *frame = nsAccUtils::GetFrameFor(aElm);
+  nsIFrame *frame = nsCoreUtils::GetFrameFor(aElm);
   if (!frame)
     return PR_FALSE;
 
   return GetColor(mFrame) == GetColor(frame);    
 }
 
 PRBool
 nsBackgroundTextAttr::Get(nsAString& aValue)
--- a/accessible/src/html/nsHTMLFormControlAccessible.cpp
+++ b/accessible/src/html/nsHTMLFormControlAccessible.cpp
@@ -210,17 +210,17 @@ nsHTMLRadioButtonAccessible::GetAttribut
 
       count++;
 
       if (itemNode == mDOMNode)
         indexOf = count;
     }
   }
 
-  nsAccUtils::SetAccGroupAttrs(aAttributes, 0, indexOf, count);
+  nsCoreUtils::SetAccGroupAttrs(aAttributes, 0, indexOf, count);
 
   return  NS_OK;
 }
 
 // ----- Button -----
 
 nsHTMLButtonAccessible::nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell):
 nsHyperTextAccessibleWrap(aNode, aShell)
--- a/accessible/src/html/nsHTMLImageAccessible.cpp
+++ b/accessible/src/html/nsHTMLImageAccessible.cpp
@@ -327,17 +327,17 @@ NS_IMETHODIMP
 nsHTMLImageAccessible::GetImagePosition(PRUint32 aCoordType,
                                         PRInt32 *aX, PRInt32 *aY)
 {
   PRInt32 width, height;
   nsresult rv = GetBounds(aX, aY, &width, &height);
   if (NS_FAILED(rv))
     return rv;
 
-  return nsAccUtils::ConvertScreenCoordsTo(aX, aY, aCoordType, this);
+  return nsCoreUtils::ConvertScreenCoordsTo(aX, aY, aCoordType, this);
 }
 
 NS_IMETHODIMP
 nsHTMLImageAccessible::GetImageSize(PRInt32 *aWidth, PRInt32 *aHeight)
 {
   PRInt32 x, y;
   return GetBounds(&x, &y, aWidth, aHeight);
 }
@@ -371,17 +371,17 @@ nsHTMLImageAccessible::GetAttributesInte
   nsresult rv = nsLinkableAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
 
   nsAutoString src;
   content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::src, src);
   if (!src.IsEmpty())
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::src, src);
+    nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::src, src);
 
   return NS_OK;
 }
 
 already_AddRefed<nsIDOMHTMLCollection>
 nsHTMLImageAccessible::GetAreaCollection()
 {
   if (!mMapElement)
--- a/accessible/src/html/nsHTMLLinkAccessible.cpp
+++ b/accessible/src/html/nsHTMLLinkAccessible.cpp
@@ -105,18 +105,18 @@ nsHTMLLinkAccessible::GetState(PRUint32 
   NS_ENSURE_STATE(link);
 
   nsLinkState linkState;
   link->GetLinkState(linkState);
   if (linkState == eLinkState_NotLink || linkState == eLinkState_Unknown) {
     // This is a either named anchor (a link with also a name attribute) or
     // it doesn't have any attributes. Check if 'click' event handler is
     // registered, otherwise bail out.
-    PRBool isOnclick = nsAccUtils::HasListener(content,
-                                               NS_LITERAL_STRING("click"));
+    PRBool isOnclick = nsCoreUtils::HasListener(content,
+                                                NS_LITERAL_STRING("click"));
     if (!isOnclick)
       return NS_OK;
   }
 
   *aState |= nsIAccessibleStates::STATE_LINKED;
 
   if (linkState == eLinkState_Visited)
     *aState |= nsIAccessibleStates::STATE_TRAVERSED;
--- a/accessible/src/html/nsHTMLSelectAccessible.cpp
+++ b/accessible/src/html/nsHTMLSelectAccessible.cpp
@@ -573,18 +573,18 @@ nsHTMLSelectOptionAccessible::GetAttribu
     siblings->GetLength(&setSize);
     nsCOMPtr<nsIDOMNode> itemNode;
     while (NS_SUCCEEDED(siblings->Item(posInSet ++, getter_AddRefs(itemNode))) &&
            itemNode != mDOMNode) {
       // Keep looping, to increment posInSet
     }
   }
 
-  nsAccUtils::SetAccGroupAttrs(aAttributes, level, posInSet,
-                               static_cast<PRInt32>(setSize));
+  nsCoreUtils::SetAccGroupAttrs(aAttributes, level, posInSet,
+                                static_cast<PRInt32>(setSize));
   return  NS_OK;
 }
 
 nsIFrame* nsHTMLSelectOptionAccessible::GetBoundsFrame()
 {
   PRUint32 state;
   nsCOMPtr<nsIContent> content = GetSelectState(&state);
   if (state & nsIAccessibleStates::STATE_COLLAPSED) {
@@ -856,29 +856,29 @@ void nsHTMLSelectOptionAccessible::Selec
   nsCOMPtr<nsIAccessibilityService> accService = 
     do_GetService("@mozilla.org/accessibilityService;1");
   nsCOMPtr<nsIAccessible> optionAccessible;
   accService->GetAccessibleFor(optionNode, getter_AddRefs(optionAccessible));
   if (!optionAccessible) {
     return;
   }
 
-  nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
-                           multiSelect);
+  nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
+                            multiSelect);
 
   PRUint32 state = State(optionAccessible);
   PRUint32 eventType;
   if (state & nsIAccessibleStates::STATE_SELECTED) {
     eventType = nsIAccessibleEvent::EVENT_SELECTION_ADD;
   }
   else {
     eventType = nsIAccessibleEvent::EVENT_SELECTION_REMOVE;
   }
 
-  nsAccUtils::FireAccEvent(eventType, optionAccessible);
+  nsCoreUtils::FireAccEvent(eventType, optionAccessible);
 }
 
 nsIContent* nsHTMLSelectOptionAccessible::GetSelectState(PRUint32* aState,
                                                          PRUint32* aExtraState)
 {
   nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
   while (content && content->Tag() != nsAccessibilityAtoms::select) {
     content = content->GetParent();
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -119,18 +119,18 @@ nsHTMLTableCellAccessible::GetAttributes
         return NS_OK;
 
       PRInt32 idx = -1;
       rv = tableAcc->GetIndexAt(rowIdx, cellIdx, &idx);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsAutoString stringIdx;
       stringIdx.AppendInt(idx);
-      nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
-                             stringIdx);
+      nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
+                              stringIdx);
       return NS_OK;
     }
 
     parentAcc.swap(childAcc);
     rv = childAcc->GetParent(getter_AddRefs(parentAcc));
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -1196,34 +1196,34 @@ nsHyperTextAccessible::GetDefaultTextAtt
     do_CreateInstance(NS_PERSISTENTPROPERTIES_CONTRACTID);
   NS_ENSURE_TRUE(attributes, NS_ERROR_OUT_OF_MEMORY);
 
   NS_ADDREF(*aAttributes = attributes);
 
   if (!mDOMNode)
     return NS_ERROR_FAILURE;
 
-  nsCOMPtr<nsIDOMElement> element = nsAccUtils::GetDOMElementFor(mDOMNode);
+  nsCOMPtr<nsIDOMElement> element = nsCoreUtils::GetDOMElementFor(mDOMNode);
 
   nsCSSTextAttr textAttr(PR_TRUE, element, nsnull);
   while (textAttr.Iterate()) {
     nsCAutoString name;
     nsAutoString value, oldValue;
     if (textAttr.Get(name, value))
       attributes->SetStringProperty(name, value, oldValue);
   }
 
-  nsIFrame *sourceFrame = nsAccUtils::GetFrameFor(element);
+  nsIFrame *sourceFrame = nsCoreUtils::GetFrameFor(element);
   if (sourceFrame) {
     nsBackgroundTextAttr backgroundTextAttr(sourceFrame, nsnull);
 
     nsAutoString value;
     if (backgroundTextAttr.Get(value)) {
-      nsAccUtils::SetAccAttr(attributes,
-                             nsAccessibilityAtoms::backgroundColor, value);
+      nsCoreUtils::SetAccAttr(attributes,
+                              nsAccessibilityAtoms::backgroundColor, value);
     }
   }
 
   return NS_OK;
 }
 
 nsresult
 nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
@@ -1251,18 +1251,18 @@ nsHyperTextAccessible::GetAttributesInte
   else if (tag == nsAccessibilityAtoms::h5)
     headLevel = 5;
   else if (tag == nsAccessibilityAtoms::h6)
     headLevel = 6;
 
   if (headLevel) {
     nsAutoString strHeadLevel;
     strHeadLevel.AppendInt(headLevel);
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::level,
-                           strHeadLevel);
+    nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::level,
+                            strHeadLevel);
   }
   
   // Indicate when the current object uses block-level formatting
   // via formatting: block
   // XXX: 'formatting' attribute is deprecated and will be removed in Mozilla2,
   // use 'display' attribute instead.
   nsIFrame *frame = GetFrame();
   if (frame && frame->GetType() == nsAccessibilityAtoms::blockFrame) {
@@ -1271,18 +1271,18 @@ nsHyperTextAccessible::GetAttributesInte
                                    oldValueUnused);
   }
 
   if (gLastFocusedNode == mDOMNode) {
     PRInt32 lineNumber = GetCaretLineNumber();
     if (lineNumber >= 1) {
       nsAutoString strLineNumber;
       strLineNumber.AppendInt(lineNumber);
-      nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::lineNumber,
-                             strLineNumber);
+      nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::lineNumber,
+                              strLineNumber);
     }
   }
 
   return  NS_OK;
 }
 
 /*
  * Given an offset, the x, y, width, and height values are filled appropriately.
@@ -1309,17 +1309,17 @@ NS_IMETHODIMP nsHyperTextAccessible::Get
     return NS_ERROR_FAILURE;
   }
 
   *aX = boundsRect.x;
   *aY = boundsRect.y;
   *aWidth = boundsRect.width;
   *aHeight = boundsRect.height;
 
-  return nsAccUtils::ConvertScreenCoordsTo(aX, aY, aCoordType, this);
+  return nsCoreUtils::ConvertScreenCoordsTo(aX, aY, aCoordType, this);
 }
 
 /*
  * Gets the offset of the character located at coordinates x and y. x and y are interpreted as being relative to
  * the screen or this widget's window depending on coords.
  */
 NS_IMETHODIMP
 nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
@@ -1332,18 +1332,18 @@ nsHyperTextAccessible::GetOffsetAtPoint(
   }
   nsIFrame *hyperFrame = GetFrame();
   if (!hyperFrame) {
     return NS_ERROR_FAILURE;
   }
   nsIntRect frameScreenRect = hyperFrame->GetScreenRectExternal();
 
   nsIntPoint coords;
-  nsresult rv = nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordType,
-                                                  this, &coords);
+  nsresult rv = nsCoreUtils::ConvertToScreenCoords(aX, aY, aCoordType,
+                                                   this, &coords);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // coords are currently screen coordinates, and we need to turn them into
   // frame coordinates relative to the current accessible
   if (!frameScreenRect.Contains(coords.x, coords.y)) {
     return NS_OK;   // Not found, will return -1
   }
   nsPoint pointInHyperText(coords.x - frameScreenRect.x,
@@ -1567,17 +1567,17 @@ nsHyperTextAccessible::GetAssociatedEdit
         return ancestorTextAccessible->GetAssociatedEditor(aEditor);
       }
       current = ancestor;
     }
     return NS_OK;
   }
 
   nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
-    nsAccUtils::GetDocShellTreeItemFor(mDOMNode);
+    nsCoreUtils::GetDocShellTreeItemFor(mDOMNode);
   nsCOMPtr<nsIEditingSession> editingSession(do_GetInterface(docShellTreeItem));
   if (!editingSession)
     return NS_OK; // No editing session interface
 
   nsCOMPtr<nsIPresShell> shell = GetPresShell();
   NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIDocument> doc = shell->GetDocument();
@@ -1662,17 +1662,17 @@ PRInt32 nsHyperTextAccessible::GetCaretL
   NS_ENSURE_TRUE(privateSelection, -1);
   nsCOMPtr<nsFrameSelection> frameSelection;
   privateSelection->GetFrameSelection(getter_AddRefs(frameSelection));
   NS_ENSURE_TRUE(frameSelection, -1);
 
   nsCOMPtr<nsIDOMNode> caretNode;
   domSel->GetFocusNode(getter_AddRefs(caretNode));
   nsCOMPtr<nsIContent> caretContent = do_QueryInterface(caretNode);
-  if (!caretContent || !nsAccUtils::IsAncestorOf(mDOMNode, caretNode)) {
+  if (!caretContent || !nsCoreUtils::IsAncestorOf(mDOMNode, caretNode)) {
     return -1;
   }
 
   PRInt32 caretOffset, returnOffsetUnused;
   domSel->GetFocusOffset(&caretOffset);
   nsFrameSelection::HINT hint = frameSelection->GetHint();
   nsIFrame *caretFrame = frameSelection->GetFrameForNodeOffset(caretContent, caretOffset,
                                                                hint, &returnOffsetUnused);
@@ -1982,18 +1982,18 @@ nsHyperTextAccessible::ScrollSubstringTo
 
   nsresult rv = HypertextOffsetsToDOMRange(aStartIndex, aEndIndex,
                                            getter_AddRefs(startNode),
                                            &startOffset,
                                            getter_AddRefs(endNode),
                                            &endOffset);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return nsAccUtils::ScrollSubstringTo(GetFrame(), startNode, startOffset,
-                                       endNode, endOffset, aScrollType);
+  return nsCoreUtils::ScrollSubstringTo(GetFrame(), startNode, startOffset,
+                                        endNode, endOffset, aScrollType);
 }
 
 // void nsIAccessibleText::
 //   scrollSubstringToPoint(in long startIndex, in long endIndex,
 //                          in unsigned long coordinateType,
 //                          in long x, in long y);
 NS_IMETHODIMP
 nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
@@ -2001,18 +2001,18 @@ nsHyperTextAccessible::ScrollSubstringTo
                                               PRUint32 aCoordinateType,
                                               PRInt32 aX, PRInt32 aY)
 {
   nsIFrame *frame = GetFrame();
   if (!frame)
     return NS_ERROR_FAILURE;
 
   nsIntPoint coords;
-  nsresult rv = nsAccUtils::ConvertToScreenCoords(aX, aY, aCoordinateType,
-                                                  this, &coords);
+  nsresult rv = nsCoreUtils::ConvertToScreenCoords(aX, aY, aCoordinateType,
+                                                   this, &coords);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 startOffset, endOffset;
   nsCOMPtr<nsIDOMNode> startNode, endNode;
 
   rv = HypertextOffsetsToDOMRange(aStartIndex, aEndIndex,
                                   getter_AddRefs(startNode), &startOffset,
                                   getter_AddRefs(endNode), &endOffset);
@@ -2023,40 +2023,40 @@ nsHyperTextAccessible::ScrollSubstringTo
   PRBool initialScrolled = PR_FALSE;
   nsIFrame *parentFrame = frame;
   while ((parentFrame = parentFrame->GetParent())) {
     nsIScrollableFrame *scrollableFrame = nsnull;
     CallQueryInterface(parentFrame, &scrollableFrame);
     if (scrollableFrame) {
       if (!initialScrolled) {
         // Scroll substring to the given point. Turn the point into percents
-        // relative scrollable area to use nsAccUtils::ScrollSubstringTo.
+        // relative scrollable area to use nsCoreUtils::ScrollSubstringTo.
         nsIntRect frameRect = parentFrame->GetScreenRectExternal();
         PRInt32 devOffsetX = coords.x - frameRect.x;
         PRInt32 devOffsetY = coords.y - frameRect.y;
 
         nsPoint offsetPoint(presContext->DevPixelsToAppUnits(devOffsetX),
                             presContext->DevPixelsToAppUnits(devOffsetY));
 
         nsSize size(parentFrame->GetSize());
         PRInt16 hPercent = offsetPoint.x * 100 / size.width;
         PRInt16 vPercent = offsetPoint.y * 100 / size.height;
 
-        rv = nsAccUtils::ScrollSubstringTo(GetFrame(), startNode, startOffset,
-                                           endNode, endOffset,
-                                           vPercent, hPercent);
+        rv = nsCoreUtils::ScrollSubstringTo(GetFrame(), startNode, startOffset,
+                                            endNode, endOffset,
+                                            vPercent, hPercent);
         NS_ENSURE_SUCCESS(rv, rv);
 
         initialScrolled = PR_TRUE;
       } else {
         // Substring was scrolled to the given point already inside its closest
         // scrollable area. If there are nested scrollable areas then make
         // sure we scroll lower areas to the given point inside currently
         // traversed scrollable area.
-        nsAccUtils::ScrollFrameToPoint(parentFrame, frame, coords);
+        nsCoreUtils::ScrollFrameToPoint(parentFrame, frame, coords);
       }
     }
     frame = parentFrame;
   }
 
   return NS_OK;
 }
 
@@ -2261,18 +2261,18 @@ nsHyperTextAccessible::GetSpellTextAttri
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (startHTOffset > *aHTStartOffset)
         *aHTStartOffset = startHTOffset;
       if (endHTOffset < *aHTEndOffset)
         *aHTEndOffset = endHTOffset;
 
       if (aAttributes) {
-        nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::invalid,
-                               NS_LITERAL_STRING("spelling"));
+        nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::invalid,
+                                NS_LITERAL_STRING("spelling"));
       }
 
       return NS_OK;
     }
   }
 
   return NS_OK;
 }
@@ -2280,78 +2280,78 @@ nsHyperTextAccessible::GetSpellTextAttri
 // nsHyperTextAccessible
 nsresult
 nsHyperTextAccessible::GetLangTextAttributes(PRBool aIncludeDefAttrs,
                                              nsIDOMNode *aSourceNode,
                                              PRInt32 *aStartHTOffset,
                                              PRInt32 *aEndHTOffset,
                                              nsIPersistentProperties *aAttributes)
 {
-  nsCOMPtr<nsIDOMElement> sourceElm(nsAccUtils::GetDOMElementFor(aSourceNode));
+  nsCOMPtr<nsIDOMElement> sourceElm(nsCoreUtils::GetDOMElementFor(aSourceNode));
 
   nsCOMPtr<nsIContent> content(do_QueryInterface(sourceElm));
   nsCOMPtr<nsIContent> rootContent(do_QueryInterface(mDOMNode));
 
   nsAutoString lang;
-  nsAccUtils::GetLanguageFor(content, rootContent, lang);
+  nsCoreUtils::GetLanguageFor(content, rootContent, lang);
 
   nsAutoString rootLang;
   nsresult rv = GetLanguage(rootLang);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (aAttributes) {
     // Expose 'language' text attribute if the DOM 'lang' attribute is
     // presented and it's different from the 'lang' attribute on the root
     // element or we should include default values of text attribute.
     const nsAString& resultLang = lang.IsEmpty() ? rootLang : lang;
     if (!resultLang.IsEmpty() && (aIncludeDefAttrs || lang != rootLang))
-      nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::language,
-                             resultLang);
+      nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::language,
+                              resultLang);
   }
 
   nsLangTextAttr textAttr(lang, rootContent);
   return GetRangeForTextAttr(aSourceNode, &textAttr,
                              aStartHTOffset, aEndHTOffset);
 }
 
 // nsHyperTextAccessible
 nsresult
 nsHyperTextAccessible::GetCSSTextAttributes(PRBool aIncludeDefAttrs,
                                             nsIDOMNode *aSourceNode,
                                             PRInt32 *aStartHTOffset,
                                             PRInt32 *aEndHTOffset,
                                             nsIPersistentProperties *aAttributes)
 {
-  nsCOMPtr<nsIDOMElement> sourceElm(nsAccUtils::GetDOMElementFor(aSourceNode));
-  nsCOMPtr<nsIDOMElement> rootElm(nsAccUtils::GetDOMElementFor(mDOMNode));
+  nsCOMPtr<nsIDOMElement> sourceElm(nsCoreUtils::GetDOMElementFor(aSourceNode));
+  nsCOMPtr<nsIDOMElement> rootElm(nsCoreUtils::GetDOMElementFor(mDOMNode));
 
   nsCSSTextAttr textAttr(aIncludeDefAttrs, sourceElm, rootElm);
   while (textAttr.Iterate()) {
     nsCAutoString name;
     nsAutoString value, oldValue;
     if (aAttributes && textAttr.Get(name, value))
       aAttributes->SetStringProperty(name, value, oldValue);
 
     nsresult rv = GetRangeForTextAttr(aSourceNode, &textAttr,
                                       aStartHTOffset, aEndHTOffset);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  nsIFrame *sourceFrame = nsAccUtils::GetFrameFor(sourceElm);
+  nsIFrame *sourceFrame = nsCoreUtils::GetFrameFor(sourceElm);
   if (sourceFrame) {
     nsIFrame *rootFrame = nsnull;
 
     if (!aIncludeDefAttrs)
-      rootFrame = nsAccUtils::GetFrameFor(rootElm);
+      rootFrame = nsCoreUtils::GetFrameFor(rootElm);
 
     nsBackgroundTextAttr backgroundTextAttr(sourceFrame, rootFrame);
     nsAutoString value;
     if (backgroundTextAttr.Get(value)) {
-      nsAccUtils::SetAccAttr(aAttributes,
-                             nsAccessibilityAtoms::backgroundColor, value);
+      nsCoreUtils::SetAccAttr(aAttributes,
+                              nsAccessibilityAtoms::backgroundColor, value);
     }
 
     nsresult rv = GetRangeForTextAttr(aSourceNode, &backgroundTextAttr,
                                       aStartHTOffset, aEndHTOffset);
     return rv;
   }
 
   return NS_OK;
@@ -2359,33 +2359,33 @@ nsHyperTextAccessible::GetCSSTextAttribu
 
 // nsHyperTextAccessible
 nsresult
 nsHyperTextAccessible::GetRangeForTextAttr(nsIDOMNode *aNode,
                                            nsTextAttr *aComparer,
                                            PRInt32 *aStartHTOffset,
                                            PRInt32 *aEndHTOffset)
 {
-  nsCOMPtr<nsIDOMElement> rootElm(nsAccUtils::GetDOMElementFor(mDOMNode));
+  nsCOMPtr<nsIDOMElement> rootElm(nsCoreUtils::GetDOMElementFor(mDOMNode));
   NS_ENSURE_STATE(rootElm);
 
   nsCOMPtr<nsIDOMNode> tmpNode(aNode);
   nsCOMPtr<nsIDOMNode> currNode(aNode);
 
   // Navigate backwards and forwards from current node to the root node to
   // calculate range bounds for the text attribute. Navigation sequence is the
   // following:
   // 1. Navigate through the siblings.
   // 2. If the traversed sibling has children then navigate from its leaf child
   //    to it through whole tree of the traversed sibling.
   // 3. Get the parent and cycle algorithm until the root node.
 
   // Navigate backwards (find the start offset).
   while (currNode && currNode != rootElm) {
-    nsCOMPtr<nsIDOMElement> currElm(nsAccUtils::GetDOMElementFor(currNode));
+    nsCOMPtr<nsIDOMElement> currElm(nsCoreUtils::GetDOMElementFor(currNode));
     NS_ENSURE_STATE(currElm);
 
     if (currNode != aNode && !aComparer->Equal(currElm)) {
       PRInt32 startHTOffset = 0;
       nsCOMPtr<nsIAccessible> startAcc;
       nsresult rv = DOMPointToHypertextOffset(tmpNode, -1, &startHTOffset,
                                               getter_AddRefs(startAcc));
       NS_ENSURE_SUCCESS(rv, rv);
@@ -2409,17 +2409,17 @@ nsHyperTextAccessible::GetRangeForTextAt
     currNode->GetParentNode(getter_AddRefs(tmpNode));
     currNode.swap(tmpNode);
   }
 
   // Navigate forwards (find the end offset).
   PRBool moveIntoSubtree = PR_TRUE;
   currNode = aNode;
   while (currNode && currNode != rootElm) {
-    nsCOMPtr<nsIDOMElement> currElm(nsAccUtils::GetDOMElementFor(currNode));
+    nsCOMPtr<nsIDOMElement> currElm(nsCoreUtils::GetDOMElementFor(currNode));
     NS_ENSURE_STATE(currElm);
 
     // Stop new end offset searching if the given text attribute changes its
     // value.
     if (!aComparer->Equal(currElm)) {
       PRInt32 endHTOffset = 0;
       nsresult rv = DOMPointToHypertextOffset(currNode, -1, &endHTOffset);
       NS_ENSURE_SUCCESS(rv, rv);
@@ -2455,17 +2455,17 @@ nsHyperTextAccessible::GetRangeForTextAt
 PRBool
 nsHyperTextAccessible::FindEndOffsetInSubtree(nsIDOMNode *aCurrNode,
                                               nsTextAttr *aComparer,
                                               PRInt32 *aHTOffset)
 {
   if (!aCurrNode)
     return PR_FALSE;
 
-  nsCOMPtr<nsIDOMElement> currElm(nsAccUtils::GetDOMElementFor(aCurrNode));
+  nsCOMPtr<nsIDOMElement> currElm(nsCoreUtils::GetDOMElementFor(aCurrNode));
   NS_ENSURE_STATE(currElm);
 
   // If the given text attribute (pointed by nsTextAttr object) changes its
   // value on the traversed element then fit the end of range.
   if (!aComparer->Equal(currElm)) {
     PRInt32 endHTOffset = 0;
     nsresult rv = DOMPointToHypertextOffset(aCurrNode, -1, &endHTOffset);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2506,17 +2506,17 @@ nsHyperTextAccessible::FindStartOffsetIn
   // Find the closest element back to the traversed element.
   nsCOMPtr<nsIDOMNode> nextNode;
   aCurrNode->GetLastChild(getter_AddRefs(nextNode));
   if (nextNode) {
     if (FindStartOffsetInSubtree(nextNode, aPrevNode, aComparer, aHTOffset))
       return PR_TRUE;
   }
 
-  nsCOMPtr<nsIDOMElement> currElm(nsAccUtils::GetDOMElementFor(aCurrNode));
+  nsCOMPtr<nsIDOMElement> currElm(nsCoreUtils::GetDOMElementFor(aCurrNode));
   NS_ENSURE_STATE(currElm);
 
   // If the given text attribute (pointed by nsTextAttr object) changes its
   // value on the traversed element then fit the start of range.
   if (!aComparer->Equal(currElm)) {
     PRInt32 startHTOffset = 0;
     nsCOMPtr<nsIAccessible> startAcc;
     nsresult rv = DOMPointToHypertextOffset(aPrevNode, -1, &startHTOffset,
--- a/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -374,18 +374,18 @@ nsAccessibleWrap::get_accDescription(VAR
   nsresult rv = xpAccessible->GetAttributes(getter_AddRefs(attributes));
   NS_ENSURE_SUCCESS(rv, rv);
   if (!attributes)
     return NS_ERROR_FAILURE;
 
   PRInt32 groupLevel = 0;
   PRInt32 itemsInGroup = 0;
   PRInt32 positionInGroup = 0;
-  nsAccUtils::GetAccGroupAttrs(attributes, &groupLevel, &positionInGroup,
-                               &itemsInGroup);
+  nsCoreUtils::GetAccGroupAttrs(attributes, &groupLevel, &positionInGroup,
+                                &itemsInGroup);
 
   if (positionInGroup > 0) {
     if (groupLevel > 0) {
       // XXX: How do we calculate the number of children? Now we append
       // " with [numChildren]c" for tree item. In the future we may need to
       // use the ARIA owns property to calculate that if it's present.
       PRInt32 numChildren = 0;
 
--- a/accessible/src/msaa/nsDocAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsDocAccessibleWrap.cpp
@@ -187,18 +187,18 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireA
     }
     domSel->GetFocusNode(getter_AddRefs(focusNode));
   }
   else {
     focusNode = mDOMNode; // Moved to top, so event is for 1st leaf after root
   }
 
   nsCOMPtr<nsIAccessible> accessible = GetFirstAvailableAccessible(focusNode, PR_TRUE);
-  nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SCROLLING_START,
-                           accessible);
+  nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_SCROLLING_START,
+                            accessible);
 
   return NS_OK;
 }
 
 STDMETHODIMP nsDocAccessibleWrap::get_URL(/* [out] */ BSTR __RPC_FAR *aURL)
 {
 __try {
   *aURL = NULL;
--- a/accessible/src/msaa/nsTextAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsTextAccessibleWrap.cpp
@@ -167,19 +167,20 @@ STDMETHODIMP nsTextAccessibleWrap::get_u
 }
 
 
 STDMETHODIMP nsTextAccessibleWrap::scrollToSubstring(
     /* [in] */ unsigned int aStartIndex,
     /* [in] */ unsigned int aEndIndex)
 {
 __try {
-  nsresult rv = nsAccUtils::ScrollSubstringTo(GetFrame(), mDOMNode, aStartIndex,
-                                              mDOMNode, aEndIndex,
-                                              nsIAccessibleScrollType::SCROLL_TYPE_ANYWHERE);
+  nsresult rv =
+    nsCoreUtils::ScrollSubstringTo(GetFrame(), mDOMNode, aStartIndex,
+                                   mDOMNode, aEndIndex,
+                                   nsIAccessibleScrollType::SCROLL_TYPE_ANYWHERE);
   if (NS_FAILED(rv))
     return E_FAIL;
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
   return S_OK;
 }
 
 nsIFrame* nsTextAccessibleWrap::GetPointFromOffset(nsIFrame *aContainingFrame, 
                                                    PRInt32 aOffset, 
--- a/accessible/src/xul/nsXULFormControlAccessible.cpp
+++ b/accessible/src/xul/nsXULFormControlAccessible.cpp
@@ -577,17 +577,17 @@ nsresult
 nsXULRadioButtonAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   NS_ENSURE_ARG_POINTER(aAttributes);
   NS_ENSURE_TRUE(mDOMNode, NS_ERROR_FAILURE);
 
   nsresult rv = nsFormControlAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsAccUtils::SetAccAttrsForXULSelectControlItem(mDOMNode, aAttributes);
+  nsCoreUtils::SetAccAttrsForXULSelectControlItem(mDOMNode, aAttributes);
 
   return NS_OK;
 }
 
 /**
   * XUL Radio Group
   *   The Radio Group proxies for the Radio Buttons themselves. The Group gets
   *   focus whereas the Buttons do not. So we only have an accessible object for
@@ -679,17 +679,17 @@ nsXULToolbarButtonAccessible::GetAttribu
         if (sibling == this)
           posInSet = setSize; // we've found our button
       }
       sibling->GetNextSibling(getter_AddRefs(tempSibling));
       sibling.swap(tempSibling);
     }
   }
   
-  nsAccUtils::SetAccGroupAttrs(aAttributes, 0, posInSet, setSize);
+  nsCoreUtils::SetAccGroupAttrs(aAttributes, 0, posInSet, setSize);
 
   return NS_OK;
 }
 
 PRBool
 nsXULToolbarButtonAccessible::IsSeparator(nsIAccessible *aAccessible)
 {
   nsCOMPtr<nsIDOMNode> domNode;
--- a/accessible/src/xul/nsXULMenuAccessible.cpp
+++ b/accessible/src/xul/nsXULMenuAccessible.cpp
@@ -414,17 +414,17 @@ nsXULMenuitemAccessible::GetKeyboardShor
 {
   aAccessKey.Truncate();
 
   static PRInt32 gMenuAccesskeyModifier = -1;  // magic value of -1 indicates unitialized state
 
   nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
   if (elt) {
     nsAutoString accesskey;
-    // We do not use nsAccUtils::GetAccesskeyFor() because accesskeys for
+    // We do not use nsCoreUtils::GetAccesskeyFor() because accesskeys for
     // menu are't registered by nsIEventStateManager.
     elt->GetAttribute(NS_LITERAL_STRING("accesskey"), accesskey);
     if (accesskey.IsEmpty())
       return NS_OK;
 
     nsCOMPtr<nsIAccessible> parentAccessible(GetParent());
     if (parentAccessible) {
       PRUint32 role;
@@ -508,17 +508,17 @@ nsresult
 nsXULMenuitemAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   NS_ENSURE_ARG_POINTER(aAttributes);
   NS_ENSURE_TRUE(mDOMNode, NS_ERROR_FAILURE);
 
   nsresult rv = nsAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsAccUtils::SetAccAttrsForXULContainerItem(mDOMNode, aAttributes);
+  nsCoreUtils::SetAccAttrsForXULContainerItem(mDOMNode, aAttributes);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXULMenuitemAccessible::GetAllowsAnonChildAccessibles(PRBool *aAllowsAnonChildren)
 {
   // That indicates we don't walk anonymous children for menuitems
   *aAllowsAnonChildren = PR_FALSE;
--- a/accessible/src/xul/nsXULSelectAccessible.cpp
+++ b/accessible/src/xul/nsXULSelectAccessible.cpp
@@ -965,17 +965,17 @@ nsXULListitemAccessible::GetAttributesIn
   NS_ENSURE_ARG_POINTER(aAttributes);
 
   // Call base class instead of nsXULMenuAccessible because menu accessible
   // has own implementation of group attributes setting which interferes with
   // this one.
   nsresult rv = nsAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsAccUtils::SetAccAttrsForXULSelectControlItem(mDOMNode, aAttributes);
+  nsCoreUtils::SetAccAttrsForXULSelectControlItem(mDOMNode, aAttributes);
   return NS_OK;
 }
 
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULListCellAccessible
 nsXULListCellAccessible::
--- a/accessible/src/xul/nsXULTabAccessible.cpp
+++ b/accessible/src/xul/nsXULTabAccessible.cpp
@@ -228,17 +228,17 @@ nsresult
 nsXULTabAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   NS_ENSURE_ARG_POINTER(aAttributes);
   NS_ENSURE_TRUE(mDOMNode, NS_ERROR_FAILURE);
 
   nsresult rv = nsLeafAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsAccUtils::SetAccAttrsForXULSelectControlItem(mDOMNode, aAttributes);
+  nsCoreUtils::SetAccAttrsForXULSelectControlItem(mDOMNode, aAttributes);
 
   return NS_OK;
 }
 
 /**
   * XUL TabBox
   *  to facilitate naming of the tabPanels object we will give this the name
   *   of the selected tab in the tabs object.
--- a/accessible/src/xul/nsXULTextAccessible.cpp
+++ b/accessible/src/xul/nsXULTextAccessible.cpp
@@ -34,17 +34,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // NOTE: alphabetically ordered
 #include "nsAccessibilityAtoms.h"
-#include "nsAccessibilityUtils.h"
+#include "nsCoreUtils.h"
 #include "nsBaseWidgetAccessible.h"
 #include "nsIDOMXULDescriptionElement.h"
 #include "nsINameSpaceManager.h"
 #include "nsString.h"
 #include "nsXULTextAccessible.h"
 #include "nsNetUtil.h"
 
 /**
--- a/accessible/src/xul/nsXULTreeAccessible.cpp
+++ b/accessible/src/xul/nsXULTreeAccessible.cpp
@@ -701,17 +701,17 @@ nsXULTreeAccessible::TreeViewInvalidated
         nsAutoString name, cachedName;
         rv = acc->GetName(name);
         NS_ENSURE_SUCCESS(rv, rv);
 
         rv = treeItemAcc->GetCachedName(cachedName);
         NS_ENSURE_SUCCESS(rv, rv);
 
         if (name != cachedName) {
-          nsAccUtils::FireAccEvent(nsIAccessibleEvent::EVENT_NAME_CHANGE, acc);
+          nsCoreUtils::FireAccEvent(nsIAccessibleEvent::EVENT_NAME_CHANGE, acc);
           treeItemAcc->SetCachedName(name);
         }
       }
     }
   }
 
   return NS_OK;
 }
@@ -1036,24 +1036,24 @@ nsXULTreeitemAccessible::GetAttributesIn
         bottomCount++;
     }
   }
 
   PRInt32 setSize = topCount + bottomCount;
   PRInt32 posInSet = topCount;
 
   // set the group attributes
-  nsAccUtils::SetAccGroupAttrs(aAttributes, level + 1, posInSet, setSize);
+  nsCoreUtils::SetAccGroupAttrs(aAttributes, level + 1, posInSet, setSize);
 
   // set the "cycles" attribute
   PRBool isCycler;
   mColumn->GetCycler(&isCycler);
   if (isCycler) {
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::cycles,
-                           NS_LITERAL_STRING("true"));
+    nsCoreUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::cycles,
+                            NS_LITERAL_STRING("true"));
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::GetParent(nsIAccessible **aParent)
 {
   NS_ENSURE_ARG_POINTER(aParent);