bug 481395 - replace nsAccessibilityAtoms with nsGkAtoms r=surkov, sicking
authorTrevor Saunders <trev.saunders@gmail.com>
Fri, 03 Jun 2011 14:35:17 -0700
changeset 77039 d8e48951c3ef10bacd28172a581d03f2ed8d3b30
parent 77038 087ff10b7a3c25516d594d8274874b488142fb5e
child 77040 304a0a28236570dd77a04f054c8ebc96ec4468e7
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerssurkov, sicking
bugs481395
milestone9.0a1
bug 481395 - replace nsAccessibilityAtoms with nsGkAtoms r=surkov, sicking
accessible/src/atk/nsMaiInterfaceDocument.cpp
accessible/src/base/AccIterator.cpp
accessible/src/base/Makefile.in
accessible/src/base/nsARIAGridAccessible.cpp
accessible/src/base/nsARIAMap.cpp
accessible/src/base/nsAccUtils.cpp
accessible/src/base/nsAccessNode.cpp
accessible/src/base/nsAccessibilityAtomList.h
accessible/src/base/nsAccessibilityAtoms.cpp
accessible/src/base/nsAccessibilityAtoms.h
accessible/src/base/nsAccessibilityService.cpp
accessible/src/base/nsAccessible.cpp
accessible/src/base/nsBaseWidgetAccessible.cpp
accessible/src/base/nsCoreUtils.cpp
accessible/src/base/nsCoreUtils.h
accessible/src/base/nsDocAccessible.cpp
accessible/src/base/nsEventShell.cpp
accessible/src/base/nsFormControlAccessible.cpp
accessible/src/base/nsRootAccessible.cpp
accessible/src/base/nsTextAttrs.cpp
accessible/src/base/nsTextAttrs.h
accessible/src/base/nsTextEquivUtils.cpp
accessible/src/html/nsHTMLFormControlAccessible.cpp
accessible/src/html/nsHTMLImageAccessible.cpp
accessible/src/html/nsHTMLImageMapAccessible.cpp
accessible/src/html/nsHTMLLinkAccessible.cpp
accessible/src/html/nsHTMLSelectAccessible.cpp
accessible/src/html/nsHTMLSelectAccessible.h
accessible/src/html/nsHTMLTableAccessible.cpp
accessible/src/html/nsHTMLTextAccessible.cpp
accessible/src/html/nsHyperTextAccessible.cpp
accessible/src/msaa/nsAccessNodeWrap.cpp
accessible/src/msaa/nsAccessibleWrap.cpp
accessible/src/msaa/nsXULMenuAccessibleWrap.cpp
accessible/src/xforms/nsXFormsAccessible.cpp
accessible/src/xforms/nsXFormsFormControlsAccessible.cpp
accessible/src/xul/nsXULColorPickerAccessible.cpp
accessible/src/xul/nsXULComboboxAccessible.cpp
accessible/src/xul/nsXULFormControlAccessible.cpp
accessible/src/xul/nsXULListboxAccessible.cpp
accessible/src/xul/nsXULMenuAccessible.cpp
accessible/src/xul/nsXULSliderAccessible.cpp
accessible/src/xul/nsXULTextAccessible.cpp
accessible/src/xul/nsXULTreeGridAccessible.cpp
content/base/src/nsGkAtomList.h
--- a/accessible/src/atk/nsMaiInterfaceDocument.cpp
+++ b/accessible/src/atk/nsMaiInterfaceDocument.cpp
@@ -34,17 +34,16 @@
  * 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 "nsAccessibleWrap.h"
 #include "nsMaiInterfaceDocument.h"
-#include "nsAccessibilityAtoms.h"
 
 const char *const kDocTypeName = "W3C-doctype";
 const char *const kDocUrlName = "DocURL";
 const char *const kMimeTypeName = "MimeType";
 
 void
 documentInterfaceInitCB(AtkDocumentIface *aIface)
 {
--- a/accessible/src/base/AccIterator.cpp
+++ b/accessible/src/base/AccIterator.cpp
@@ -106,17 +106,17 @@ AccIterator::IteratorState::IteratorStat
 RelatedAccIterator::
   RelatedAccIterator(nsDocAccessible* aDocument, nsIContent* aDependentContent,
                      nsIAtom* aRelAttr) :
   mDocument(aDocument), mRelAttr(aRelAttr), mProviders(nsnull),
   mBindingParent(nsnull), mIndex(0)
 {
   mBindingParent = aDependentContent->GetBindingParent();
   nsIAtom* IDAttr = mBindingParent ?
-    nsAccessibilityAtoms::anonid : aDependentContent->GetIDAttributeName();
+    nsGkAtoms::anonid : aDependentContent->GetIDAttributeName();
 
   nsAutoString id;
   if (aDependentContent->GetAttr(kNameSpaceID_None, IDAttr, id))
     mProviders = mDocument->mDependentIDsHash.Get(id);
 }
 
 nsAccessible*
 RelatedAccIterator::Next()
@@ -149,114 +149,114 @@ RelatedAccIterator::Next()
 
 ////////////////////////////////////////////////////////////////////////////////
 // HTMLLabelIterator
 ////////////////////////////////////////////////////////////////////////////////
 
 HTMLLabelIterator::
   HTMLLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement,
                     LabelFilter aFilter) :
-  mRelIter(aDocument, aElement, nsAccessibilityAtoms::_for),
+  mRelIter(aDocument, aElement, nsGkAtoms::_for),
   mElement(aElement), mLabelFilter(aFilter)
 {
 }
 
 nsAccessible*
 HTMLLabelIterator::Next()
 {
   // Get either <label for="[id]"> element which explicitly points to given
   // element, or <label> ancestor which implicitly point to it.
   nsAccessible* label = nsnull;
   while ((label = mRelIter.Next())) {
-    if (label->GetContent()->Tag() == nsAccessibilityAtoms::label)
+    if (label->GetContent()->Tag() == nsGkAtoms::label)
       return label;
   }
 
   if (mLabelFilter == eSkipAncestorLabel)
     return nsnull;
 
   // Go up tree get name of ancestor label if there is one (an ancestor <label>
   // implicitly points to us). Don't go up farther than form or body element.
   nsIContent* walkUpContent = mElement;
   while ((walkUpContent = walkUpContent->GetParent()) &&
-         walkUpContent->Tag() != nsAccessibilityAtoms::form &&
-         walkUpContent->Tag() != nsAccessibilityAtoms::body) {
-    if (walkUpContent->Tag() == nsAccessibilityAtoms::label) {
+         walkUpContent->Tag() != nsGkAtoms::form &&
+         walkUpContent->Tag() != nsGkAtoms::body) {
+    if (walkUpContent->Tag() == nsGkAtoms::label) {
       // Prevent infinite loop.
       mLabelFilter = eSkipAncestorLabel;
       return GetAccService()->GetAccessible(walkUpContent);
     }
   }
 
   return nsnull;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // HTMLOutputIterator
 ////////////////////////////////////////////////////////////////////////////////
 
 HTMLOutputIterator::
 HTMLOutputIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
-  mRelIter(aDocument, aElement, nsAccessibilityAtoms::_for)
+  mRelIter(aDocument, aElement, nsGkAtoms::_for)
 {
 }
 
 nsAccessible*
 HTMLOutputIterator::Next()
 {
   nsAccessible* output = nsnull;
   while ((output = mRelIter.Next())) {
-    if (output->GetContent()->Tag() == nsAccessibilityAtoms::output)
+    if (output->GetContent()->Tag() == nsGkAtoms::output)
       return output;
   }
 
   return nsnull;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULLabelIterator
 ////////////////////////////////////////////////////////////////////////////////
 
 XULLabelIterator::
   XULLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
-  mRelIter(aDocument, aElement, nsAccessibilityAtoms::control)
+  mRelIter(aDocument, aElement, nsGkAtoms::control)
 {
 }
 
 nsAccessible*
 XULLabelIterator::Next()
 {
   nsAccessible* label = nsnull;
   while ((label = mRelIter.Next())) {
-    if (label->GetContent()->Tag() == nsAccessibilityAtoms::label)
+    if (label->GetContent()->Tag() == nsGkAtoms::label)
       return label;
   }
 
   return nsnull;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULDescriptionIterator
 ////////////////////////////////////////////////////////////////////////////////
 
 XULDescriptionIterator::
   XULDescriptionIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
-  mRelIter(aDocument, aElement, nsAccessibilityAtoms::control)
+  mRelIter(aDocument, aElement, nsGkAtoms::control)
 {
 }
 
 nsAccessible*
 XULDescriptionIterator::Next()
 {
   nsAccessible* descr = nsnull;
   while ((descr = mRelIter.Next())) {
-    if (descr->GetContent()->Tag() == nsAccessibilityAtoms::description)
+    if (descr->GetContent()->Tag() == nsGkAtoms::description)
       return descr;
   }
 
   return nsnull;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // IDRefsIterator
--- a/accessible/src/base/Makefile.in
+++ b/accessible/src/base/Makefile.in
@@ -55,17 +55,16 @@ CPPSRCS = \
   filters.cpp \
   NotificationController.cpp \
   nsAccDocManager.cpp \
   nsAccessNode.cpp \
   nsARIAGridAccessible.cpp \
   nsARIAMap.cpp \
   nsDocAccessible.cpp \
   nsOuterDocAccessible.cpp \
-  nsAccessibilityAtoms.cpp \
   nsCoreUtils.cpp \
   nsAccUtils.cpp \
   nsAccessibilityService.cpp \
   nsAccessible.cpp \
   nsAccTreeWalker.cpp \
   nsBaseWidgetAccessible.cpp \
   nsEventShell.cpp \
   nsFormControlAccessible.cpp \
--- a/accessible/src/base/nsARIAGridAccessible.cpp
+++ b/accessible/src/base/nsARIAGridAccessible.cpp
@@ -790,21 +790,21 @@ nsresult
 nsARIAGridAccessible::SetARIASelected(nsAccessible *aAccessible,
                                       PRBool aIsSelected, PRBool aNotify)
 {
   nsIContent *content = aAccessible->GetContent();
   NS_ENSURE_STATE(content);
 
   nsresult rv = NS_OK;
   if (aIsSelected)
-    rv = content->SetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_selected,
+    rv = content->SetAttr(kNameSpaceID_None, nsGkAtoms::aria_selected,
                           NS_LITERAL_STRING("true"), aNotify);
   else
     rv = content->UnsetAttr(kNameSpaceID_None,
-                            nsAccessibilityAtoms::aria_selected, aNotify);
+                            nsGkAtoms::aria_selected, aNotify);
 
   NS_ENSURE_SUCCESS(rv, rv);
 
   // No "smart" select/unselect for internal call.
   if (!aNotify)
     return NS_OK;
 
   // If row or cell accessible was selected then we're able to not bother about
@@ -1125,20 +1125,20 @@ nsARIAGridCellAccessible::ApplyARIAState
 
   // Check aria-selected="true" on the row.
   nsAccessible* row = Parent();
   if (!row || row->Role() != nsIAccessibleRole::ROLE_ROW)
     return;
 
   nsIContent *rowContent = row->GetContent();
   if (nsAccUtils::HasDefinedARIAToken(rowContent,
-                                      nsAccessibilityAtoms::aria_selected) &&
+                                      nsGkAtoms::aria_selected) &&
       !rowContent->AttrValueIs(kNameSpaceID_None,
-                               nsAccessibilityAtoms::aria_selected,
-                               nsAccessibilityAtoms::_false, eCaseMatters))
+                               nsGkAtoms::aria_selected,
+                               nsGkAtoms::_false, eCaseMatters))
     *aState |= states::SELECTABLE | states::SELECTED;
 }
 
 nsresult
 nsARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
@@ -1185,13 +1185,13 @@ nsARIAGridCellAccessible::GetAttributesI
     if (child->Role() == nsIAccessibleRole::ROLE_ROW)
       rowIdx++;
   }
 
   PRInt32 idx = rowIdx * colCount + colIdx;
 
   nsAutoString stringIdx;
   stringIdx.AppendInt(idx);
-  nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
+  nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex,
                          stringIdx);
 
   return NS_OK;
 }
--- a/accessible/src/base/nsARIAMap.cpp
+++ b/accessible/src/base/nsARIAMap.cpp
@@ -37,17 +37,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsARIAMap.h"
 
 #include "nsIAccessibleRole.h"
 #include "States.h"
 
-#include "nsAccessibilityAtoms.h"
 #include "nsIContent.h"
 
 using namespace mozilla::a11y;
 
 /**
  *  This list of WAI-defined roles are currently hardcoded.
  *  Eventually we will most likely be loading an RDF resource that contains this information
  *  Using RDF will also allow for role extensibility. See bug 280138.
@@ -597,85 +596,85 @@ nsRoleMapEntry nsARIAMap::gEmptyRoleMap 
   kNoReqStates
 };
 
 nsStateMapEntry nsARIAMap::gWAIStateMap[] = {
   // eARIANone
   nsStateMapEntry(),
 
   // eARIAAutoComplete
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_autocomplete,
+  nsStateMapEntry(&nsGkAtoms::aria_autocomplete,
                   "inline", states::SUPPORTS_AUTOCOMPLETION,
                   "list", states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION,
                   "both", states::HASPOPUP | states::SUPPORTS_AUTOCOMPLETION),
 
   // eARIABusy
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_busy,
+  nsStateMapEntry(&nsGkAtoms::aria_busy,
                   "true", states::BUSY,
                   "error", states::INVALID),
 
   // eARIACheckableBool
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_checked, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_checked, kBoolType,
                   states::CHECKABLE, states::CHECKED, 0, PR_TRUE),
 
   // eARIACheckableMixed
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_checked, kMixedType,
+  nsStateMapEntry(&nsGkAtoms::aria_checked, kMixedType,
                   states::CHECKABLE, states::CHECKED, 0, PR_TRUE),
 
   // eARIACheckedMixed
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_checked, kMixedType,
+  nsStateMapEntry(&nsGkAtoms::aria_checked, kMixedType,
                   states::CHECKABLE, states::CHECKED, 0),
 
   // eARIADisabled
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_disabled, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_disabled, kBoolType,
                   0, states::UNAVAILABLE),
 
   // eARIAExpanded
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_expanded, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_expanded, kBoolType,
                   0, states::EXPANDED, states::COLLAPSED),
 
   // eARIAHasPopup
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_haspopup, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_haspopup, kBoolType,
                   0, states::HASPOPUP),
 
   // eARIAInvalid
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_invalid, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_invalid, kBoolType,
                   0, states::INVALID),
 
   // eARIAMultiline
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_multiline, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_multiline, kBoolType,
                   0, states::MULTI_LINE, states::SINGLE_LINE, PR_TRUE),
 
   // eARIAMultiSelectable
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_multiselectable, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_multiselectable, kBoolType,
                   0, states::MULTISELECTABLE | states::EXTSELECTABLE),
 
   // eARIAOrientation
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_orientation, eUseFirstState,
+  nsStateMapEntry(&nsGkAtoms::aria_orientation, eUseFirstState,
                   "vertical", states::VERTICAL,
                   "horizontal", states::HORIZONTAL),
 
   // eARIAPressed
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_pressed, kMixedType,
+  nsStateMapEntry(&nsGkAtoms::aria_pressed, kMixedType,
                   states::CHECKABLE, states::PRESSED),
 
   // eARIAReadonly
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_readonly, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_readonly, kBoolType,
                   0, states::READONLY),
 
   // eARIAReadonlyOrEditable
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_readonly, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_readonly, kBoolType,
                   0, states::READONLY, states::EDITABLE, PR_TRUE),
 
   // eARIARequired
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_required, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_required, kBoolType,
                   0, states::REQUIRED),
 
   // eARIASelectable
-  nsStateMapEntry(&nsAccessibilityAtoms::aria_selected, kBoolType,
+  nsStateMapEntry(&nsGkAtoms::aria_selected, kBoolType,
                   states::SELECTABLE, states::SELECTED, 0, PR_TRUE)
 };
 
 /**
  * Universal (Global) states:
  * The following state rules are applied to any accessible element,
  * whether there is an ARIA role or not:
  */
@@ -691,50 +690,50 @@ eStateMapEntryID nsARIAMap::gWAIUnivStat
 
 
 /**
  * ARIA attribute map for attribute characteristics
  * 
  * @note ARIA attributes that don't have any flags are not included here
  */
 nsAttributeCharacteristics nsARIAMap::gWAIUnivAttrMap[] = {
-  {&nsAccessibilityAtoms::aria_activedescendant,  ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_atomic,                             ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_busy,                               ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_checked,           ATTR_BYPASSOBJ | ATTR_VALTOKEN }, /* exposes checkable obj attr */
-  {&nsAccessibilityAtoms::aria_controls,          ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_describedby,       ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_disabled,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_dropeffect,                         ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_expanded,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_flowto,            ATTR_BYPASSOBJ                 },  
-  {&nsAccessibilityAtoms::aria_grabbed,                            ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_haspopup,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_hidden,                             ATTR_VALTOKEN },/* always expose obj attr */
-  {&nsAccessibilityAtoms::aria_invalid,           ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_label,             ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_labelledby,        ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_level,             ATTR_BYPASSOBJ                 }, /* handled via groupPosition */
-  {&nsAccessibilityAtoms::aria_live,                               ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_multiline,         ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_multiselectable,   ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_owns,              ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_orientation,                        ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_posinset,          ATTR_BYPASSOBJ                 }, /* handled via groupPosition */
-  {&nsAccessibilityAtoms::aria_pressed,           ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_readonly,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_relevant,          ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_required,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_selected,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_setsize,           ATTR_BYPASSOBJ                 }, /* handled via groupPosition */
-  {&nsAccessibilityAtoms::aria_sort,                               ATTR_VALTOKEN },
-  {&nsAccessibilityAtoms::aria_valuenow,          ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_valuemin,          ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_valuemax,          ATTR_BYPASSOBJ                 },
-  {&nsAccessibilityAtoms::aria_valuetext,         ATTR_BYPASSOBJ                 }
+  {&nsGkAtoms::aria_activedescendant,  ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_atomic,                             ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_busy,                               ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_checked,           ATTR_BYPASSOBJ | ATTR_VALTOKEN }, /* exposes checkable obj attr */
+  {&nsGkAtoms::aria_controls,          ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_describedby,       ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_disabled,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_dropeffect,                         ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_expanded,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_flowto,            ATTR_BYPASSOBJ                 },  
+  {&nsGkAtoms::aria_grabbed,                            ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_haspopup,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_hidden,                             ATTR_VALTOKEN },/* always expose obj attr */
+  {&nsGkAtoms::aria_invalid,           ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_label,             ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_labelledby,        ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_level,             ATTR_BYPASSOBJ                 }, /* handled via groupPosition */
+  {&nsGkAtoms::aria_live,                               ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_multiline,         ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_multiselectable,   ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_owns,              ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_orientation,                        ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_posinset,          ATTR_BYPASSOBJ                 }, /* handled via groupPosition */
+  {&nsGkAtoms::aria_pressed,           ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_readonly,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_relevant,          ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_required,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_selected,          ATTR_BYPASSOBJ | ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_setsize,           ATTR_BYPASSOBJ                 }, /* handled via groupPosition */
+  {&nsGkAtoms::aria_sort,                               ATTR_VALTOKEN },
+  {&nsGkAtoms::aria_valuenow,          ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_valuemin,          ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_valuemax,          ATTR_BYPASSOBJ                 },
+  {&nsGkAtoms::aria_valuetext,         ATTR_BYPASSOBJ                 }
 };
 
 PRUint32 nsARIAMap::gWAIUnivAttrMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIUnivAttrMap);
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsStateMapEntry
 
@@ -828,19 +827,19 @@ nsStateMapEntry::MapToStates(nsIContent*
     // ARIA attributes. According to spec, a value of "undefined" is to be
     // treated equivalent to "", or the absence of the attribute. We bail out
     // for this case here.
     // Note: If this method happens to be called with a non-token based
     // attribute, for example: aria-label="" or aria-label="undefined", we will
     // bail out and not explore a state mapping, which is safe.
     if (!hasAttr ||
         aContent->AttrValueIs(kNameSpaceID_None, *entry.mAttributeName,
-                              nsAccessibilityAtoms::_empty, eCaseMatters) ||
+                              nsGkAtoms::_empty, eCaseMatters) ||
         aContent->AttrValueIs(kNameSpaceID_None, *entry.mAttributeName,
-                              nsAccessibilityAtoms::_undefined, eCaseMatters)) {
+                              nsGkAtoms::_undefined, eCaseMatters)) {
 
       if (entry.mPermanentState)
         *aState &= ~entry.mPermanentState;
       return PR_TRUE;
     }
 
     if (entry.mPermanentState)
       *aState |= entry.mPermanentState;
--- a/accessible/src/base/nsAccUtils.cpp
+++ b/accessible/src/base/nsAccUtils.cpp
@@ -38,17 +38,16 @@
 
 #include "nsCoreUtils.h"
 #include "nsAccUtils.h"
 
 #include "States.h"
 #include "nsIAccessibleTypes.h"
 
 #include "nsAccessibilityService.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsARIAMap.h"
 #include "nsDocAccessible.h"
 #include "nsHyperTextAccessible.h"
 #include "nsHTMLTableAccessible.h"
 #include "nsTextAccessible.h"
 #include "nsXULTreeGridAccessible.h"
 
 #include "nsIDOMXULContainerElement.h"
@@ -83,27 +82,27 @@ void
 nsAccUtils::SetAccGroupAttrs(nsIPersistentProperties *aAttributes,
                              PRInt32 aLevel, PRInt32 aSetSize,
                              PRInt32 aPosInSet)
 {
   nsAutoString value;
 
   if (aLevel) {
     value.AppendInt(aLevel);
-    SetAccAttr(aAttributes, nsAccessibilityAtoms::level, value);
+    SetAccAttr(aAttributes, nsGkAtoms::level, value);
   }
 
   if (aSetSize && aPosInSet) {
     value.Truncate();
     value.AppendInt(aPosInSet);
-    SetAccAttr(aAttributes, nsAccessibilityAtoms::posinset, value);
+    SetAccAttr(aAttributes, nsGkAtoms::posinset, value);
 
     value.Truncate();
     value.AppendInt(aSetSize);
-    SetAccAttr(aAttributes, nsAccessibilityAtoms::setsize, value);
+    SetAccAttr(aAttributes, nsGkAtoms::setsize, value);
   }
 }
 
 PRInt32
 nsAccUtils::GetDefaultLevel(nsAccessible *aAccessible)
 {
   PRUint32 role = aAccessible->Role();
 
@@ -122,17 +121,17 @@ nsAccUtils::GetDefaultLevel(nsAccessible
   return 0;
 }
 
 PRInt32
 nsAccUtils::GetARIAOrDefaultLevel(nsAccessible *aAccessible)
 {
   PRInt32 level = 0;
   nsCoreUtils::GetUIntAttr(aAccessible->GetContent(),
-                           nsAccessibilityAtoms::aria_level, &level);
+                           nsGkAtoms::aria_level, &level);
 
   if (level != 0)
     return level;
 
   return GetDefaultLevel(aAccessible);
 }
 
 void
@@ -271,51 +270,51 @@ nsAccUtils::SetLiveContainerAttributes(n
                                        nsIContent *aTopContent)
 {
   nsAutoString atomic, live, relevant, busy;
   nsIContent *ancestor = aStartContent;
   while (ancestor) {
 
     // container-relevant attribute
     if (relevant.IsEmpty() &&
-        nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_relevant) &&
-        ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_relevant, relevant))
-      SetAccAttr(aAttributes, nsAccessibilityAtoms::containerRelevant, relevant);
+        nsAccUtils::HasDefinedARIAToken(ancestor, nsGkAtoms::aria_relevant) &&
+        ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_relevant, relevant))
+      SetAccAttr(aAttributes, nsGkAtoms::containerRelevant, relevant);
 
     // container-live, and container-live-role attributes
     if (live.IsEmpty()) {
       nsRoleMapEntry *role = GetRoleMapEntry(ancestor);
       if (nsAccUtils::HasDefinedARIAToken(ancestor,
-                                          nsAccessibilityAtoms::aria_live)) {
-        ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_live,
+                                          nsGkAtoms::aria_live)) {
+        ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_live,
                           live);
       } else if (role) {
         GetLiveAttrValue(role->liveAttRule, live);
       }
       if (!live.IsEmpty()) {
-        SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live);
+        SetAccAttr(aAttributes, nsGkAtoms::containerLive, live);
         if (role) {
           nsAccUtils::SetAccAttr(aAttributes,
-                                 nsAccessibilityAtoms::containerLiveRole,
+                                 nsGkAtoms::containerLiveRole,
                                  NS_ConvertASCIItoUTF16(role->roleString));
         }
       }
     }
 
     // container-atomic attribute
     if (atomic.IsEmpty() &&
-        nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_atomic) &&
-        ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_atomic, atomic))
-      SetAccAttr(aAttributes, nsAccessibilityAtoms::containerAtomic, atomic);
+        nsAccUtils::HasDefinedARIAToken(ancestor, nsGkAtoms::aria_atomic) &&
+        ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_atomic, atomic))
+      SetAccAttr(aAttributes, nsGkAtoms::containerAtomic, atomic);
 
     // container-busy attribute
     if (busy.IsEmpty() &&
-        nsAccUtils::HasDefinedARIAToken(ancestor, nsAccessibilityAtoms::aria_busy) &&
-        ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_busy, busy))
-      SetAccAttr(aAttributes, nsAccessibilityAtoms::containerBusy, busy);
+        nsAccUtils::HasDefinedARIAToken(ancestor, nsGkAtoms::aria_busy) &&
+        ancestor->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_busy, busy))
+      SetAccAttr(aAttributes, nsGkAtoms::containerBusy, busy);
 
     if (ancestor == aTopContent)
       break;
 
     ancestor = ancestor->GetParent();
     if (!ancestor)
       ancestor = aTopContent; // Use <body>/<frameset>
   }
@@ -323,33 +322,33 @@ nsAccUtils::SetLiveContainerAttributes(n
 
 PRBool
 nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom)
 {
   NS_ASSERTION(aContent, "aContent is null in call to HasDefinedARIAToken!");
 
   if (!aContent->HasAttr(kNameSpaceID_None, aAtom) ||
       aContent->AttrValueIs(kNameSpaceID_None, aAtom,
-                            nsAccessibilityAtoms::_empty, eCaseMatters) ||
+                            nsGkAtoms::_empty, eCaseMatters) ||
       aContent->AttrValueIs(kNameSpaceID_None, aAtom,
-                            nsAccessibilityAtoms::_undefined, eCaseMatters)) {
+                            nsGkAtoms::_undefined, eCaseMatters)) {
         return PR_FALSE;
   }
   return PR_TRUE;
 }
 
 nsIAtom*
 nsAccUtils::GetARIAToken(dom::Element* aElement, nsIAtom* aAttr)
 {
   if (!nsAccUtils::HasDefinedARIAToken(aElement, aAttr))
-    return nsAccessibilityAtoms::_empty;
+    return nsGkAtoms::_empty;
 
   static nsIContent::AttrValuesArray tokens[] =
-    { &nsAccessibilityAtoms::_false, &nsAccessibilityAtoms::_true,
-      &nsAccessibilityAtoms::mixed, nsnull};
+    { &nsGkAtoms::_false, &nsGkAtoms::_true,
+      &nsGkAtoms::mixed, nsnull};
 
   PRInt32 idx = aElement->FindAttrValueIn(kNameSpaceID_None,
                                           aAttr, tokens, eCaseMatters);
   if (idx >= 0)
     return *(tokens[idx]);
 
   return nsnull;
 }
@@ -400,18 +399,18 @@ nsAccUtils::GetMultiSelectableContainer(
 
   return nsnull;
 }
 
 PRBool
 nsAccUtils::IsARIASelected(nsAccessible *aAccessible)
 {
   return aAccessible->GetContent()->
-    AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_selected,
-                nsAccessibilityAtoms::_true, eCaseMatters);
+    AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_selected,
+                nsGkAtoms::_true, eCaseMatters);
 }
 
 nsHyperTextAccessible*
 nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
 {
   // Get accessible from selection's focus DOM point (the DOM point where
   // selection is ended).
 
@@ -540,17 +539,17 @@ nsAccUtils::GetScreenCoordsForParent(nsA
 }
 
 nsRoleMapEntry*
 nsAccUtils::GetRoleMapEntry(nsINode *aNode)
 {
   nsIContent *content = nsCoreUtils::GetRoleContent(aNode);
   nsAutoString roleString;
   if (!content ||
-      !content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString) ||
+      !content->GetAttr(kNameSpaceID_None, nsGkAtoms::role, roleString) ||
       roleString.IsEmpty()) {
     // We treat role="" as if the role attribute is absent (per aria spec:8.1.1)
     return nsnull;
   }
 
   nsWhitespaceTokenizer tokenizer(roleString);
   while (tokenizer.hasMoreTokens()) {
     // Do a binary search through table for the next role in role list
--- a/accessible/src/base/nsAccessNode.cpp
+++ b/accessible/src/base/nsAccessNode.cpp
@@ -36,17 +36,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsDocAccessible.h"
 
 #include "nsIAccessible.h"
 
 #include "nsAccCache.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 
 #include "nsHashtable.h"
 #include "nsAccessibilityService.h"
 #include "nsApplicationAccessibleWrap.h"
 #include "nsIAccessibleDocument.h"
 #include "nsIDocShell.h"
@@ -193,18 +192,16 @@ void nsAccessNode::InitXPAccessibility()
   nsCOMPtr<nsIStringBundleService> stringBundleService =
     mozilla::services::GetStringBundleService();
   if (stringBundleService) {
     // Static variables are released in ShutdownAllXPAccessibility();
     stringBundleService->CreateBundle(ACCESSIBLE_BUNDLE_URL, 
                                       &gStringBundle);
   }
 
-  nsAccessibilityAtoms::AddRefAtoms();
-
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (prefBranch) {
     prefBranch->GetBoolPref("browser.formfill.enable", &gIsFormFillEnabled);
   }
 
   NotifyA11yInitOrShutdown(PR_TRUE);
 }
 
@@ -467,14 +464,14 @@ nsAccessNode::GetLanguage(nsAString& aLa
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsCoreUtils::GetLanguageFor(mContent, nsnull, aLanguage);
 
   if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
     nsIDocument *doc = mContent->GetOwnerDoc();
     if (doc) {
-      doc->GetHeaderData(nsAccessibilityAtoms::headerContentLanguage, aLanguage);
+      doc->GetHeaderData(nsGkAtoms::headerContentLanguage, aLanguage);
     }
   }
  
   return NS_OK;
 }
deleted file mode 100644
--- a/accessible/src/base/nsAccessibilityAtomList.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Original Author: Aaron Leventhal (aaronl@netscape.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-/******
-
-  This file contains the list of all accessibility nsIAtoms and their values
-
-  It is designed to be used as inline input to nsAccessibilityAtoms.cpp *only*
-  through the magic of C preprocessing.
-
-  All entries must be enclosed in the macro ACCESSIBILITY_ATOM which will have cruel
-  and unusual things done to it
-
-  It is recommended (but not strictly necessary) to keep all entries
-  in alphabetical order
-
-  The first argument to ACCESSIBILITY_ATOM is the C++ identifier of the atom
-  The second argument is the string value of the atom
-
- ******/
-
-
-  // Alphabetical list of generic atoms
-ACCESSIBILITY_ATOM(button, "button")
-ACCESSIBILITY_ATOM(checkbox, "checkbox")
-ACCESSIBILITY_ATOM(col, "col")
-ACCESSIBILITY_ATOM(_empty, "")
-ACCESSIBILITY_ATOM(_false, "false")
-ACCESSIBILITY_ATOM(image, "image")
-ACCESSIBILITY_ATOM(menu, "menu")
-ACCESSIBILITY_ATOM(menuButton, "menu-button")
-ACCESSIBILITY_ATOM(multiple, "multiple")
-ACCESSIBILITY_ATOM(mixed, "mixed")
-ACCESSIBILITY_ATOM(open, "open")
-ACCESSIBILITY_ATOM(password, "password")
-ACCESSIBILITY_ATOM(radio, "radio")
-ACCESSIBILITY_ATOM(reset, "reset")
-ACCESSIBILITY_ATOM(row, "row")
-ACCESSIBILITY_ATOM(submit, "submit")
-ACCESSIBILITY_ATOM(_true, "true")
-ACCESSIBILITY_ATOM(_undefined, "undefined")
-
-  // Header info
-ACCESSIBILITY_ATOM(headerContentLanguage, "content-language")
-
-  // Alphabetical list of frame types
-ACCESSIBILITY_ATOM(areaFrame, "AreaFrame")
-ACCESSIBILITY_ATOM(blockFrame, "BlockFrame")
-ACCESSIBILITY_ATOM(boxFrame, "BoxFrame")
-ACCESSIBILITY_ATOM(brFrame, "BRFrame")
-ACCESSIBILITY_ATOM(deckFrame, "DeckFrame")
-ACCESSIBILITY_ATOM(inlineBlockFrame, "InlineBlockFrame")
-ACCESSIBILITY_ATOM(inlineFrame, "InlineFrame")
-ACCESSIBILITY_ATOM(objectFrame, "ObjectFrame")
-ACCESSIBILITY_ATOM(scrollFrame, "ScrollFrame")
-ACCESSIBILITY_ATOM(textFrame, "TextFrame")
-ACCESSIBILITY_ATOM(tableCaptionFrame, "TableCaptionFrame")
-ACCESSIBILITY_ATOM(tableCellFrame, "TableCellFrame")
-ACCESSIBILITY_ATOM(tableOuterFrame, "TableOuterFrame")
-ACCESSIBILITY_ATOM(tableRowGroupFrame, "TableRowGroupFrame")
-ACCESSIBILITY_ATOM(tableRowFrame, "TableRowFrame")
-
-  // Alphabetical list of tag names
-ACCESSIBILITY_ATOM(a, "a")
-ACCESSIBILITY_ATOM(abbr, "abbr")
-ACCESSIBILITY_ATOM(acronym, "acronym")
-ACCESSIBILITY_ATOM(area, "area")
-ACCESSIBILITY_ATOM(article, "article") // HTML landmark
-ACCESSIBILITY_ATOM(aside, "aside") // HTML landmark
-ACCESSIBILITY_ATOM(autocomplete, "autocomplete")
-ACCESSIBILITY_ATOM(blockquote, "blockquote")
-ACCESSIBILITY_ATOM(br, "br")
-ACCESSIBILITY_ATOM(body, "body")
-ACCESSIBILITY_ATOM(caption, "caption") // XUL
-ACCESSIBILITY_ATOM(choices, "choices") // XForms
-ACCESSIBILITY_ATOM(description, "description")    // XUL
-ACCESSIBILITY_ATOM(dd, "dd")
-ACCESSIBILITY_ATOM(div, "div")
-ACCESSIBILITY_ATOM(dl, "dl")
-ACCESSIBILITY_ATOM(dt, "dt")
-ACCESSIBILITY_ATOM(footer, "footer") // HTML landmark
-ACCESSIBILITY_ATOM(form, "form")
-ACCESSIBILITY_ATOM(header, "header") // HTML landmark
-ACCESSIBILITY_ATOM(h1, "h1")
-ACCESSIBILITY_ATOM(h2, "h2")
-ACCESSIBILITY_ATOM(h3, "h3")
-ACCESSIBILITY_ATOM(h4, "h4")
-ACCESSIBILITY_ATOM(h5, "h5")
-ACCESSIBILITY_ATOM(h6, "h6")
-ACCESSIBILITY_ATOM(item, "item") // XForms
-ACCESSIBILITY_ATOM(itemset, "itemset") // XForms
-ACCESSIBILITY_ATOM(img, "img")
-ACCESSIBILITY_ATOM(input, "input")
-ACCESSIBILITY_ATOM(label, "label")
-ACCESSIBILITY_ATOM(legend, "legend")
-ACCESSIBILITY_ATOM(li, "li")
-ACCESSIBILITY_ATOM(link, "link")
-ACCESSIBILITY_ATOM(listcell, "listcell") // XUL
-ACCESSIBILITY_ATOM(listcols, "listcols") // XUL
-ACCESSIBILITY_ATOM(listcol, "listcol") // XUL
-ACCESSIBILITY_ATOM(listhead, "listhead") // XUL
-ACCESSIBILITY_ATOM(listheader, "listheader") // XUL
-ACCESSIBILITY_ATOM(map, "map")
-ACCESSIBILITY_ATOM(math, "math")
-ACCESSIBILITY_ATOM(menupopup, "menupopup")     // XUL
-ACCESSIBILITY_ATOM(object, "object")
-ACCESSIBILITY_ATOM(nav, "nav") // HTML landmark
-ACCESSIBILITY_ATOM(ol, "ol")
-ACCESSIBILITY_ATOM(optgroup, "optgroup")
-ACCESSIBILITY_ATOM(option, "option")
-ACCESSIBILITY_ATOM(output, "output")
-ACCESSIBILITY_ATOM(panel, "panel") // XUL
-ACCESSIBILITY_ATOM(progress, "progress")
-ACCESSIBILITY_ATOM(q, "q")
-ACCESSIBILITY_ATOM(select, "select")
-ACCESSIBILITY_ATOM(select1, "select1") // XForms
-ACCESSIBILITY_ATOM(svg, "svg")
-ACCESSIBILITY_ATOM(table, "table")
-ACCESSIBILITY_ATOM(tabpanels, "tabpanels") // XUL
-ACCESSIBILITY_ATOM(tbody, "tbody")
-ACCESSIBILITY_ATOM(td, "td")
-ACCESSIBILITY_ATOM(th, "th")
-ACCESSIBILITY_ATOM(tfoot, "tfoot")
-ACCESSIBILITY_ATOM(thead, "thead")
-ACCESSIBILITY_ATOM(textarea, "textarea") // XForms
-ACCESSIBILITY_ATOM(textbox, "textbox")   // XUL
-ACCESSIBILITY_ATOM(toolbaritem, "toolbaritem")   // XUL
-ACCESSIBILITY_ATOM(toolbarseparator, "toolbarseparator")   // XUL
-ACCESSIBILITY_ATOM(toolbarspring, "toolbarspring")   // XUL
-ACCESSIBILITY_ATOM(toolbarspacer, "toolbarspacer")   // XUL
-ACCESSIBILITY_ATOM(tooltip, "tooltip")   // XUL
-ACCESSIBILITY_ATOM(tr, "tr")
-ACCESSIBILITY_ATOM(tree, "tree")
-ACCESSIBILITY_ATOM(ul, "ul")
-
-  // Alphabetical list of attributes (DOM)
-ACCESSIBILITY_ATOM(acceltext, "acceltext")
-ACCESSIBILITY_ATOM(accesskey, "accesskey")
-ACCESSIBILITY_ATOM(alt, "alt")
-ACCESSIBILITY_ATOM(anonid, "anonid") // Used for ID's in XBL
-ACCESSIBILITY_ATOM(checked, "checked")
-ACCESSIBILITY_ATOM(contenteditable, "contenteditable")
-ACCESSIBILITY_ATOM(control, "control")
-ACCESSIBILITY_ATOM(disabled, "disabled")
-ACCESSIBILITY_ATOM(_class, "class")
-ACCESSIBILITY_ATOM(cycles, "cycles") // used for XUL cycler attribute
-ACCESSIBILITY_ATOM(curpos, "curpos") // XUL
-ACCESSIBILITY_ATOM(data, "data")
-ACCESSIBILITY_ATOM(_default, "default") // XUL button
-ACCESSIBILITY_ATOM(draggable, "draggable")
-ACCESSIBILITY_ATOM(droppable, "droppable")   // XUL combo box
-ACCESSIBILITY_ATOM(editable, "editable")
-ACCESSIBILITY_ATOM(_for, "for")
-ACCESSIBILITY_ATOM(headers, "headers")   // HTML table
-ACCESSIBILITY_ATOM(hidden, "hidden")   // XUL tree columns
-ACCESSIBILITY_ATOM(hover, "hover") // XUL color picker
-ACCESSIBILITY_ATOM(href, "href") // XUL, XLink
-ACCESSIBILITY_ATOM(increment, "increment") // XUL
-ACCESSIBILITY_ATOM(lang, "lang")
-ACCESSIBILITY_ATOM(linkedPanel, "linkedpanel") // XUL
-ACCESSIBILITY_ATOM(longDesc, "longdesc")
-ACCESSIBILITY_ATOM(max, "max") // XUL
-ACCESSIBILITY_ATOM(maxpos, "maxpos") // XUL
-ACCESSIBILITY_ATOM(minpos, "minpos") // XUL
-ACCESSIBILITY_ATOM(_moz_menuactive, "_moz-menuactive") // XUL
-ACCESSIBILITY_ATOM(multiline, "multiline") // XUL
-ACCESSIBILITY_ATOM(name, "name")
-ACCESSIBILITY_ATOM(onclick, "onclick")
-ACCESSIBILITY_ATOM(popup, "popup")
-ACCESSIBILITY_ATOM(placeholder, "placeholder")
-ACCESSIBILITY_ATOM(readonly, "readonly")
-ACCESSIBILITY_ATOM(scope, "scope") // HTML table
-ACCESSIBILITY_ATOM(seltype, "seltype") // XUL listbox
-ACCESSIBILITY_ATOM(simple, "simple") // XLink
-ACCESSIBILITY_ATOM(src, "src")
-ACCESSIBILITY_ATOM(selected, "selected")
-ACCESSIBILITY_ATOM(summary, "summary")
-ACCESSIBILITY_ATOM(tabindex, "tabindex")
-ACCESSIBILITY_ATOM(title, "title")
-ACCESSIBILITY_ATOM(toolbarname, "toolbarname")
-ACCESSIBILITY_ATOM(tooltiptext, "tooltiptext")
-ACCESSIBILITY_ATOM(type, "type")
-ACCESSIBILITY_ATOM(usemap, "usemap")
-ACCESSIBILITY_ATOM(value, "value")
-
-  // Alphabetical list of object attributes
-ACCESSIBILITY_ATOM(checkable, "checkable")
-ACCESSIBILITY_ATOM(display, "display")
-ACCESSIBILITY_ATOM(eventFromInput, "event-from-input")
-ACCESSIBILITY_ATOM(textAlign, "text-align")
-ACCESSIBILITY_ATOM(textIndent, "text-indent")
-
-  // Alphabetical list of text attributes (AT API)
-ACCESSIBILITY_ATOM(color, "color")
-ACCESSIBILITY_ATOM(backgroundColor, "background-color")
-ACCESSIBILITY_ATOM(fontFamily, "font-family")
-ACCESSIBILITY_ATOM(fontStyle, "font-style")
-ACCESSIBILITY_ATOM(fontWeight, "font-weight")
-ACCESSIBILITY_ATOM(fontSize, "font-size")
-ACCESSIBILITY_ATOM(invalid, "invalid")
-ACCESSIBILITY_ATOM(language, "language")
-ACCESSIBILITY_ATOM(textLineThroughStyle, "text-line-through-style")
-ACCESSIBILITY_ATOM(textUnderlineStyle, "text-underline-style")
-ACCESSIBILITY_ATOM(textPosition, "text-position")
-
-  // ARIA (DHTML accessibility) attributes
-  // Also add to nsARIAMap.cpp and nsARIAMap.h
-  // ARIA role attribute
-ACCESSIBILITY_ATOM(role, "role")
-ACCESSIBILITY_ATOM(aria_activedescendant, "aria-activedescendant")
-ACCESSIBILITY_ATOM(aria_atomic, "aria-atomic")
-ACCESSIBILITY_ATOM(aria_autocomplete, "aria-autocomplete")
-ACCESSIBILITY_ATOM(aria_busy, "aria-busy")
-ACCESSIBILITY_ATOM(aria_checked, "aria-checked")
-ACCESSIBILITY_ATOM(aria_controls, "aria-controls")
-ACCESSIBILITY_ATOM(aria_describedby, "aria-describedby")
-ACCESSIBILITY_ATOM(aria_disabled, "aria-disabled")
-ACCESSIBILITY_ATOM(aria_dropeffect, "aria-dropeffect")
-ACCESSIBILITY_ATOM(aria_expanded, "aria-expanded")
-ACCESSIBILITY_ATOM(aria_flowto, "aria-flowto")
-ACCESSIBILITY_ATOM(aria_grabbed, "aria-grabbed")
-ACCESSIBILITY_ATOM(aria_haspopup, "aria-haspopup")
-ACCESSIBILITY_ATOM(aria_hidden, "aria-hidden")
-ACCESSIBILITY_ATOM(aria_invalid, "aria-invalid")
-ACCESSIBILITY_ATOM(aria_label, "aria-label")
-ACCESSIBILITY_ATOM(aria_labelledby, "aria-labelledby")
-ACCESSIBILITY_ATOM(aria_level, "aria-level")
-ACCESSIBILITY_ATOM(aria_live, "aria-live")
-ACCESSIBILITY_ATOM(aria_multiline, "aria-multiline")
-ACCESSIBILITY_ATOM(aria_multiselectable, "aria-multiselectable")
-ACCESSIBILITY_ATOM(aria_orientation, "aria-orientation")
-ACCESSIBILITY_ATOM(aria_owns, "aria-owns")
-ACCESSIBILITY_ATOM(aria_posinset, "aria-posinset")
-ACCESSIBILITY_ATOM(aria_pressed, "aria-pressed")
-ACCESSIBILITY_ATOM(aria_readonly, "aria-readonly")
-ACCESSIBILITY_ATOM(aria_relevant, "aria-relevant")
-ACCESSIBILITY_ATOM(aria_required, "aria-required")
-ACCESSIBILITY_ATOM(aria_selected, "aria-selected")
-ACCESSIBILITY_ATOM(aria_setsize, "aria-setsize")
-ACCESSIBILITY_ATOM(aria_sort, "aria-sort")
-ACCESSIBILITY_ATOM(aria_valuenow, "aria-valuenow")
-ACCESSIBILITY_ATOM(aria_valuemin, "aria-valuemin")
-ACCESSIBILITY_ATOM(aria_valuemax, "aria-valuemax")
-ACCESSIBILITY_ATOM(aria_valuetext, "aria-valuetext")
-
-  // misc atoms
-// a form property used to obtain the default label
-// of an HTML button from the button frame
-ACCESSIBILITY_ATOM(defaultLabel, "defaultLabel")
-// the attribute specifying the editor's bogus br node
-ACCESSIBILITY_ATOM(mozeditorbogusnode, "_moz_editor_bogus_node")
-
-// Object attributes
-ACCESSIBILITY_ATOM(tableCellIndex, "table-cell-index")
-ACCESSIBILITY_ATOM(containerAtomic, "container-atomic")
-ACCESSIBILITY_ATOM(containerBusy, "container-busy")
-ACCESSIBILITY_ATOM(containerLive, "container-live")
-ACCESSIBILITY_ATOM(containerLiveRole, "container-live-role")
-ACCESSIBILITY_ATOM(containerRelevant, "container-relevant")
-ACCESSIBILITY_ATOM(level, "level")
-ACCESSIBILITY_ATOM(live, "live")
-ACCESSIBILITY_ATOM(lineNumber, "line-number")
-ACCESSIBILITY_ATOM(posinset, "posinset") 
-ACCESSIBILITY_ATOM(setsize, "setsize")
-ACCESSIBILITY_ATOM(xmlroles, "xml-roles")
deleted file mode 100644
--- a/accessible/src/base/nsAccessibilityAtoms.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Original Author: Aaron Leventhal (aaronl@netscape.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 "nsAccessibilityAtoms.h"
-#include "nsStaticAtom.h"
-#include "nsMemory.h"
-
-// define storage for all accessibility atoms
-#define ACCESSIBILITY_ATOM(_name, _value) nsIAtom* nsAccessibilityAtoms::_name;
-#include "nsAccessibilityAtomList.h"
-#undef ACCESSIBILITY_ATOM
-
-#define ACCESSIBILITY_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
-#include "nsAccessibilityAtomList.h"
-#undef ACCESSIBILITY_ATOM
-
-static const nsStaticAtom atomInfo[] = {
-#define ACCESSIBILITY_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsAccessibilityAtoms::name_),
-#include "nsAccessibilityAtomList.h"
-#undef ACCESSIBILITY_ATOM
-};
-
-void nsAccessibilityAtoms::AddRefAtoms()
-{
-  NS_RegisterStaticAtoms(atomInfo, NS_ARRAY_LENGTH(atomInfo));
-}
- 
deleted file mode 100644
--- a/accessible/src/base/nsAccessibilityAtoms.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 nsAccessibilityAtoms_h___
-#define nsAccessibilityAtoms_h___
-
-#include "nsIAtom.h"
-
-/**
- * This class wraps up the creation (and destruction) of the standard
- * set of atoms used in the accessibility module. These objects
- * are created when the are needed by accessibility is being used and they
- * are destroyed when the last nsRootAccessible is destroyed.
- */
-
-class nsAccessibilityAtoms {
-public:
-
-  static void AddRefAtoms();
-  static void ReleaseAtoms();
-
-  /* Declare all atoms
-
-     The atom names and values are stored in nsAccessibilityAtomList.h and
-     are brought to you by the magic of C preprocessing
-
-     Add new atoms to nsAccessibilityAtomList and all support logic will be auto-generated
-   */
-#define ACCESSIBILITY_ATOM(_name, _value) static nsIAtom* _name;
-#include "nsAccessibilityAtomList.h"
-#undef ACCESSIBILITY_ATOM
-};
-
-#endif /* nsAccessibilityAtoms_h___ */
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -32,17 +32,16 @@
  * 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 ***** */
 
 // NOTE: alphabetically ordered
-#include "nsAccessibilityAtoms.h"
 #include "nsAccessibilityService.h"
 #include "nsCoreUtils.h"
 #include "nsAccUtils.h"
 #include "nsApplicationAccessibleWrap.h"
 #include "nsARIAGridAccessibleWrap.h"
 #include "nsARIAMap.h"
 #include "nsIContentViewer.h"
 #include "nsCURILoader.h"
@@ -269,19 +268,17 @@ nsAccessibilityService::CreateHTMLCombob
   return accessible;
 }
 
 already_AddRefed<nsAccessible>
 nsAccessibilityService::CreateHTMLImageAccessible(nsIContent* aContent,
                                                   nsIPresShell* aPresShell)
 {
   nsAutoString mapElmName;
-  aContent->GetAttr(kNameSpaceID_None,
-                    nsAccessibilityAtoms::usemap,
-                    mapElmName);
+  aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::usemap, mapElmName);
   nsCOMPtr<nsIDOMHTMLMapElement> mapElm;
   if (nsIDocument* document = aContent->GetCurrentDoc()) {
     mapElm = do_QueryInterface(document->FindImageMap(mapElmName));
   }
 
   nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
   nsAccessible* accessible = mapElm ?
     new nsHTMLImageMapAccessible(aContent, weakShell, mapElm) :
@@ -886,17 +883,17 @@ static PRBool HasRelatedContent(nsIConte
   // If the given ID is referred by relation attribute then create an accessible
   // for it. Take care of HTML elements only for now.
   if (aContent->IsHTML() &&
       nsAccUtils::GetDocAccessibleFor(aContent)->IsDependentID(id))
     return PR_TRUE;
 
   nsIContent *ancestorContent = aContent;
   while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
-    if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
+    if (ancestorContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant)) {
         // ancestor has activedescendant property, this content could be active
       return PR_TRUE;
     }
   }
 
   return PR_FALSE;
 }
 
@@ -991,27 +988,27 @@ nsAccessibilityService::GetOrCreateAcces
       newAcc->AsTextLeaf()->SetText(text);
       return newAcc;
     }
 
     return nsnull;
   }
 
   PRBool isHTML = content->IsHTML();
-  if (isHTML && content->Tag() == nsAccessibilityAtoms::map) {
+  if (isHTML && content->Tag() == nsGkAtoms::map) {
     // Create hyper text accessible for HTML map if it is used to group links
     // (see http://www.w3.org/TR/WCAG10-HTML-TECHS/#group-bypass). If the HTML
     // map doesn't have 'name' attribute (or has empty name attribute) then we
     // suppose it is used for links grouping. Otherwise we think it is used in
     // conjuction with HTML image element and in this case we don't create any
     // accessible for it and don't walk into it. The accessibles for HTML area
     // (nsHTMLAreaAccessible) the map contains are attached as children of the
     // appropriate accessible for HTML image (nsHTMLImageAccessible).
     nsAutoString name;
-    content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::name, name);
+    content->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
     if (!name.IsEmpty()) {
       if (aIsSubtreeHidden)
         *aIsSubtreeHidden = true;
 
       return nsnull;
     }
 
     newAcc = new nsHyperTextAccessibleWrap(content, aWeakShell);
@@ -1031,32 +1028,32 @@ nsAccessibilityService::GetOrCreateAcces
   }
 
   if (weakFrame.IsAlive() && !newAcc && isHTML) {  // HTML accessibles
     PRBool tryTagNameOrFrame = PR_TRUE;
 
     nsIAtom *frameType = weakFrame.GetFrame()->GetType();
 
     PRBool partOfHTMLTable =
-      frameType == nsAccessibilityAtoms::tableCaptionFrame ||
-      frameType == nsAccessibilityAtoms::tableCellFrame ||
-      frameType == nsAccessibilityAtoms::tableRowGroupFrame ||
-      frameType == nsAccessibilityAtoms::tableRowFrame;
+      frameType == nsGkAtoms::tableCaptionFrame ||
+      frameType == nsGkAtoms::tableCellFrame ||
+      frameType == nsGkAtoms::tableRowGroupFrame ||
+      frameType == nsGkAtoms::tableRowFrame;
 
     if (partOfHTMLTable) {
       // Table-related frames don't get table-related roles
       // unless they are inside a table, but they may still get generic
       // accessibles
       nsIContent *tableContent = content;
       while ((tableContent = tableContent->GetParent()) != nsnull) {
         nsIFrame *tableFrame = tableContent->GetPrimaryFrame();
         if (!tableFrame)
           continue;
 
-        if (tableFrame->GetType() == nsAccessibilityAtoms::tableOuterFrame) {
+        if (tableFrame->GetType() == nsGkAtoms::tableOuterFrame) {
           nsAccessible *tableAccessible =
             GetAccessibleInWeakShell(tableContent, aWeakShell);
 
           if (tableAccessible) {
             if (!roleMapEntry) {
               PRUint32 role = tableAccessible->Role();
               if (role != nsIAccessibleRole::ROLE_TABLE &&
                   role != nsIAccessibleRole::ROLE_TREE_TABLE) {
@@ -1085,33 +1082,33 @@ nsAccessibilityService::GetOrCreateAcces
             return nsnull;
           }
 
           // otherwise create ARIA based accessible.
           tryTagNameOrFrame = PR_FALSE;
           break;
         }
 
-        if (tableContent->Tag() == nsAccessibilityAtoms::table) {
+        if (tableContent->Tag() == nsGkAtoms::table) {
           // Stop before we are fooled by any additional table ancestors
           // This table cell frameis part of a separate ancestor table.
           tryTagNameOrFrame = PR_FALSE;
           break;
         }
       }
 
       if (!tableContent)
         tryTagNameOrFrame = PR_FALSE;
     }
 
     if (roleMapEntry) {
       // Create ARIA grid/treegrid accessibles if node is not of a child or
       // valid child of HTML table and is not a HTML table.
       if ((!partOfHTMLTable || !tryTagNameOrFrame) &&
-          frameType != nsAccessibilityAtoms::tableOuterFrame) {
+          frameType != nsGkAtoms::tableOuterFrame) {
 
         if (roleMapEntry->role == nsIAccessibleRole::ROLE_TABLE ||
             roleMapEntry->role == nsIAccessibleRole::ROLE_TREE_TABLE) {
           newAcc = new nsARIAGridAccessibleWrap(content, aWeakShell);
 
         } else if (roleMapEntry->role == nsIAccessibleRole::ROLE_GRID_CELL ||
             roleMapEntry->role == nsIAccessibleRole::ROLE_ROWHEADER ||
             roleMapEntry->role == nsIAccessibleRole::ROLE_COLUMNHEADER) {
@@ -1135,17 +1132,17 @@ nsAccessibilityService::GetOrCreateAcces
         // nsTableCaptionFrame::GetAccessible() because the descendants of
         // the table caption would still be created. By setting
         // *aIsSubtreeHidden = true we ensure that no descendant accessibles
         // are created.
         nsIFrame* f = weakFrame.GetFrame();
         if (!f) {
           f = aPresShell->GetRealPrimaryFrameFor(content);
         }
-        if (f->GetType() == nsAccessibilityAtoms::tableCaptionFrame &&
+        if (f->GetType() == nsGkAtoms::tableCaptionFrame &&
            f->GetRect().IsEmpty()) {
           // XXX This is not the ideal place for this code, but right now there
           // is no better place:
           if (aIsSubtreeHidden)
             *aIsSubtreeHidden = true;
 
           return nsnull;
         }
@@ -1160,37 +1157,37 @@ nsAccessibilityService::GetOrCreateAcces
     // Elements may implement nsIAccessibleProvider via XBL. This allows them to
     // say what kind of accessible to create.
     newAcc = CreateAccessibleByType(content, aWeakShell);
   }
 
   if (!newAcc) {
     // Create generic accessibles for SVG and MathML nodes.
     if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
-        content->Tag() == nsAccessibilityAtoms::svg) {
+        content->Tag() == nsGkAtoms::svg) {
       newAcc = new nsEnumRoleAccessible(content, aWeakShell,
                                         nsIAccessibleRole::ROLE_DIAGRAM);
     }
     else if (content->GetNameSpaceID() == kNameSpaceID_MathML &&
-             content->Tag() == nsAccessibilityAtoms::math) {
+             content->Tag() == nsGkAtoms::math) {
       newAcc = new nsEnumRoleAccessible(content, aWeakShell,
                                         nsIAccessibleRole::ROLE_EQUATION);
     }
   }
 
   if (!newAcc) {
     newAcc = CreateAccessibleForDeckChild(weakFrame.GetFrame(), content,
                                           aWeakShell);
   }
 
   // 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() && 
+  if (!newAcc && content->Tag() != nsGkAtoms::body && content->GetParent() && 
       ((weakFrame.GetFrame() && weakFrame.GetFrame()->IsFocusable()) ||
        (isHTML && nsCoreUtils::HasClickListener(content)) ||
        HasUniversalAriaProperty(content) || roleMapEntry ||
        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) {
@@ -1255,32 +1252,32 @@ nsAccessibilityService::Shutdown()
   nsAccessNodeWrap::ShutdownAccessibility();
 }
 
 PRBool
 nsAccessibilityService::HasUniversalAriaProperty(nsIContent *aContent)
 {
   // ARIA attributes that take token values (NMTOKEN, bool) are special cased
   // because of special value "undefined" (see HasDefinedARIAToken).
-  return nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_atomic) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_busy) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_controls) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_describedby) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_disabled) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_dropeffect) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_flowto) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_grabbed) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_haspopup) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_hidden) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_invalid) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_label) ||
-         aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_labelledby) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_live) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_owns) ||
-         nsAccUtils::HasDefinedARIAToken(aContent, nsAccessibilityAtoms::aria_relevant);
+  return nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_atomic) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_busy) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_controls) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_describedby) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_disabled) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_dropeffect) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_flowto) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_grabbed) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_haspopup) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_hidden) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_invalid) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_label) ||
+         aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_labelledby) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_live) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_owns) ||
+         nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_relevant);
 }
 
 nsAccessible*
 nsAccessibilityService::GetAreaAccessible(nsIFrame* aImageFrame,
                                           nsINode* aAreaNode,
                                           nsIWeakReference* aWeakShell,
                                           nsAccessible** aImageAccessible)
 {
@@ -1380,17 +1377,17 @@ nsAccessibilityService::CreateAccessible
     case nsIAccessibleProvider::XULGroupbox:
       accessible = new nsXULGroupboxAccessible(aContent, aWeakShell);
       break;
 
     case nsIAccessibleProvider::XULImage:
     {
       // Don't include nameless images in accessible tree.
       if (!aContent->HasAttr(kNameSpaceID_None,
-                             nsAccessibilityAtoms::tooltiptext))
+                             nsGkAtoms::tooltiptext))
         return nsnull;
 
       accessible = new nsHTMLImageAccessibleWrap(aContent, aWeakShell);
       break;
 
     }
     case nsIAccessibleProvider::XULLink:
       accessible = new nsXULLinkAccessible(aContent, aWeakShell);
@@ -1428,17 +1425,17 @@ nsAccessibilityService::CreateAccessible
     {
 #ifdef MOZ_ACCESSIBILITY_ATK
       // ATK considers this node to be redundant when within menubars, and it makes menu
       // navigation with assistive technologies more difficult
       // XXX In the future we will should this for consistency across the nsIAccessible
       // implementations on each platform for a consistent scripting environment, but
       // then strip out redundant accessibles in the nsAccessibleWrap class for each platform.
       nsIContent *parent = aContent->GetParent();
-      if (parent && parent->NodeInfo()->Equals(nsAccessibilityAtoms::menu,
+      if (parent && parent->NodeInfo()->Equals(nsGkAtoms::menu,
                                                kNameSpaceID_XUL))
         return nsnull;
 #endif
       accessible = new nsXULMenupopupAccessible(aContent, aWeakShell);
       break;
 
     }
     case nsIAccessibleProvider::XULMenuSeparator:
@@ -1613,109 +1610,109 @@ nsAccessibilityService::CreateAccessible
 
 already_AddRefed<nsAccessible>
 nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
                                                      nsIContent* aContent,
                                                      nsIWeakReference* aWeakShell)
 {
   // This method assumes we're in an HTML namespace.
   nsIAtom *tag = aContent->Tag();
-  if (tag == nsAccessibilityAtoms::legend) {
+  if (tag == nsGkAtoms::legend) {
     nsAccessible* accessible = new nsHTMLLegendAccessible(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::option) {
+  if (tag == nsGkAtoms::option) {
     nsAccessible* accessible = new nsHTMLSelectOptionAccessible(aContent,
                                                                 aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::optgroup) {
+  if (tag == nsGkAtoms::optgroup) {
     nsAccessible* accessible = new nsHTMLSelectOptGroupAccessible(aContent,
                                                                   aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::ul || tag == nsAccessibilityAtoms::ol ||
-      tag == nsAccessibilityAtoms::dl) {
+  if (tag == nsGkAtoms::ul || tag == nsGkAtoms::ol ||
+      tag == nsGkAtoms::dl) {
     nsAccessible* accessible = new nsHTMLListAccessible(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::a) {
+  if (tag == nsGkAtoms::a) {
     // Only some roles truly enjoy life as nsHTMLLinkAccessibles, for details
     // see closed bug 494807.
     nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aContent);
     if (roleMapEntry && roleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING &&
         roleMapEntry->role != nsIAccessibleRole::ROLE_LINK) {
       nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent,
                                                                aWeakShell);
       NS_IF_ADDREF(accessible);
       return accessible;
     }
 
     nsAccessible* accessible = new nsHTMLLinkAccessible(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::dt ||
-      (tag == nsAccessibilityAtoms::li &&
-       aFrame->GetType() != nsAccessibilityAtoms::blockFrame)) {
+  if (tag == nsGkAtoms::dt ||
+      (tag == nsGkAtoms::li &&
+       aFrame->GetType() != nsGkAtoms::blockFrame)) {
     // Normally for li, it is created by the list item frame (in nsBlockFrame)
     // which knows about the bullet frame; however, in this case the list item
     // must have been styled using display: foo
     nsAccessible* accessible = new nsHTMLLIAccessible(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::abbr ||
-      tag == nsAccessibilityAtoms::acronym ||
-      tag == nsAccessibilityAtoms::blockquote ||
-      tag == nsAccessibilityAtoms::dd ||
-      tag == nsAccessibilityAtoms::form ||
-      tag == nsAccessibilityAtoms::h1 ||
-      tag == nsAccessibilityAtoms::h2 ||
-      tag == nsAccessibilityAtoms::h3 ||
-      tag == nsAccessibilityAtoms::h4 ||
-      tag == nsAccessibilityAtoms::h5 ||
-      tag == nsAccessibilityAtoms::h6 ||
-      tag == nsAccessibilityAtoms::q) {
+  if (tag == nsGkAtoms::abbr ||
+      tag == nsGkAtoms::acronym ||
+      tag == nsGkAtoms::blockquote ||
+      tag == nsGkAtoms::dd ||
+      tag == nsGkAtoms::form ||
+      tag == nsGkAtoms::h1 ||
+      tag == nsGkAtoms::h2 ||
+      tag == nsGkAtoms::h3 ||
+      tag == nsGkAtoms::h4 ||
+      tag == nsGkAtoms::h5 ||
+      tag == nsGkAtoms::h6 ||
+      tag == nsGkAtoms::q) {
     nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::tr) {
+  if (tag == nsGkAtoms::tr) {
     nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
                                                         nsIAccessibleRole::ROLE_ROW);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
   if (nsCoreUtils::IsHTMLTableHeader(aContent)) {
     nsAccessible* accessible = new nsHTMLTableHeaderCellAccessibleWrap(aContent,
                                                                        aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::output) {
+  if (tag == nsGkAtoms::output) {
     nsAccessible* accessible = new nsHTMLOutputAccessible(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
-  if (tag == nsAccessibilityAtoms::progress) {
+  if (tag == nsGkAtoms::progress) {
     nsAccessible* accessible =
       new HTMLProgressMeterAccessible(aContent, aWeakShell);
     NS_IF_ADDREF(accessible);
     return accessible;
   }
 
   return nsnull;
  }
@@ -1793,26 +1790,26 @@ NS_GetAccessibilityService(nsIAccessibil
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessibilityService private (DON'T put methods here)
 
 already_AddRefed<nsAccessible>
 nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
                                                      nsIContent* aContent,
                                                      nsIWeakReference* aWeakShell)
 {
-  if (aFrame->GetType() == nsAccessibilityAtoms::boxFrame ||
-      aFrame->GetType() == nsAccessibilityAtoms::scrollFrame) {
+  if (aFrame->GetType() == nsGkAtoms::boxFrame ||
+      aFrame->GetType() == nsGkAtoms::scrollFrame) {
 
     nsIFrame* parentFrame = aFrame->GetParent();
-    if (parentFrame && parentFrame->GetType() == nsAccessibilityAtoms::deckFrame) {
+    if (parentFrame && parentFrame->GetType() == nsGkAtoms::deckFrame) {
       // If deck frame is for xul:tabpanels element then the given node has
       // tabpanel accessible.
       nsCOMPtr<nsIContent> parentContent = parentFrame->GetContent();
 #ifdef MOZ_XUL
-      if (parentContent->NodeInfo()->Equals(nsAccessibilityAtoms::tabpanels,
+      if (parentContent->NodeInfo()->Equals(nsGkAtoms::tabpanels,
                                             kNameSpaceID_XUL)) {
         nsAccessible* accessible = new nsXULTabpanelAccessible(aContent,
                                                                aWeakShell);
         NS_IF_ADDREF(accessible);
         return accessible;
       }
 #endif
       nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
--- a/accessible/src/base/nsAccessible.cpp
+++ b/accessible/src/base/nsAccessible.cpp
@@ -252,19 +252,19 @@ nsAccessible::GetName(nsAString& aName)
 
   if (!aName.IsEmpty())
     return NS_OK;
 
   // In the end get the name from tooltip.
   nsIAtom *tooltipAttr = nsnull;
 
   if (mContent->IsHTML())
-    tooltipAttr = nsAccessibilityAtoms::title;
+    tooltipAttr = nsGkAtoms::title;
   else if (mContent->IsXUL())
-    tooltipAttr = nsAccessibilityAtoms::tooltiptext;
+    tooltipAttr = nsGkAtoms::tooltiptext;
   else
     return NS_OK;
 
   // XXX: if CompressWhiteSpace worked on nsAString we could avoid a copy.
   nsAutoString name;
   if (mContent->GetAttr(kNameSpaceID_None, tooltipAttr, name)) {
     name.CompressWhitespace();
     aName = name;
@@ -298,33 +298,33 @@ nsAccessible::Description(nsString& aDes
   // 2. It has no DHTML describedby property
   // 3. it doesn't have an accName; or
   // 4. its title attribute already equals to its accName nsAutoString name; 
 
   if (mContent->IsNodeOfType(nsINode::eTEXT))
     return;
 
   nsTextEquivUtils::
-    GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
+    GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
                            aDescription);
 
   if (aDescription.IsEmpty()) {
     PRBool isXUL = mContent->IsXUL();
     if (isXUL) {
       // Try XUL <description control="[id]">description text</description>
       XULDescriptionIterator iter(GetDocAccessible(), mContent);
       nsAccessible* descr = nsnull;
       while ((descr = iter.Next()))
         nsTextEquivUtils::AppendTextEquivFromContent(this, descr->GetContent(),
                                                      &aDescription);
       }
 
       if (aDescription.IsEmpty()) {
-        nsIAtom *descAtom = isXUL ? nsAccessibilityAtoms::tooltiptext :
-                                    nsAccessibilityAtoms::title;
+        nsIAtom *descAtom = isXUL ? nsGkAtoms::tooltiptext :
+                                    nsGkAtoms::title;
         if (mContent->GetAttr(kNameSpaceID_None, descAtom, aDescription)) {
           nsAutoString name;
           GetName(name);
           if (name.IsEmpty() || aDescription == name)
             // Don't use tooltip for a description if this object
             // has no name or the tooltip is the same as the name
             aDescription.Truncate();
         }
@@ -625,24 +625,24 @@ nsAccessible::IsVisible(PRBool* aIsOffsc
   nsRectVisibility rectVisibility =
     shell->GetRectVisibility(frame, nsRect(nsPoint(0,0), frameSize),
                              nsPresContext::CSSPixelsToAppUnits(kMinPixels));
 
   if (frame->GetRect().IsEmpty()) {
     PRBool isEmpty = PR_TRUE;
 
     nsIAtom *frameType = frame->GetType();
-    if (frameType == nsAccessibilityAtoms::textFrame) {
+    if (frameType == nsGkAtoms::textFrame) {
       // Zero area rects can occur in the first frame of a multi-frame text flow,
       // in which case the rendered text is not empty and the frame should not be marked invisible
       nsAutoString renderedText;
       frame->GetRenderedText (&renderedText, nsnull, nsnull, 0, 1);
       isEmpty = renderedText.IsEmpty();
     }
-    else if (frameType == nsAccessibilityAtoms::inlineFrame) {
+    else if (frameType == nsGkAtoms::inlineFrame) {
       // Yuck. Unfortunately inline frames can contain larger frames inside of them,
       // so we can't really believe this is a zero area rect without checking more deeply.
       // GetBounds() will do that for us.
       PRInt32 x, y, width, height;
       GetBounds(&x, &y, &width, &height);
       isEmpty = width == 0 || height == 0;
     }
 
@@ -678,18 +678,18 @@ nsAccessible::NativeState()
       state |= states::INVALID;
 
     if (elementState.HasState(NS_EVENT_STATE_REQUIRED))
       state |= states::REQUIRED;
 
     disabled = mContent->IsHTML() ? 
       (elementState.HasState(NS_EVENT_STATE_DISABLED)) :
       (mContent->AttrValueIs(kNameSpaceID_None,
-                             nsAccessibilityAtoms::disabled,
-                             nsAccessibilityAtoms::_true,
+                             nsGkAtoms::disabled,
+                             nsGkAtoms::_true,
                              eCaseMatters));
   }
 
   // Set unavailable state based on disabled state, otherwise set focus states
   if (disabled) {
     state |= states::UNAVAILABLE;
   }
   else if (mContent->IsElement()) {
@@ -714,17 +714,17 @@ nsAccessible::NativeState()
   }
 
   nsIFrame *frame = GetFrame();
   if (frame && (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW))
     state |= states::FLOATING;
 
   // Check if a XUL element has the popup attribute (an attached popup menu).
   if (mContent->IsXUL())
-    if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::popup))
+    if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popup))
       state |= states::HASPOPUP;
 
   // Add 'linked' state for simple xlink.
   if (nsCoreUtils::IsXLink(mContent))
     state |= states::LINKED;
 
   return state;
 }
@@ -910,19 +910,19 @@ void nsAccessible::GetBoundsRect(nsRect&
   // We need the relative parent so we can get absolute screen coordinates
   nsIFrame *ancestorFrame = firstFrame;
 
   while (ancestorFrame) {  
     *aBoundingFrame = ancestorFrame;
     // If any other frame type, we only need to deal with the primary frame
     // Otherwise, there may be more frames attached to the same content node
     if (!nsCoreUtils::IsCorrectFrameType(ancestorFrame,
-                                         nsAccessibilityAtoms::inlineFrame) &&
+                                         nsGkAtoms::inlineFrame) &&
         !nsCoreUtils::IsCorrectFrameType(ancestorFrame,
-                                         nsAccessibilityAtoms::textFrame))
+                                         nsGkAtoms::textFrame))
       break;
     ancestorFrame = ancestorFrame->GetParent();
   }
 
   nsIFrame *iterFrame = firstFrame;
   nsCOMPtr<nsIContent> firstContent(mContent);
   nsIContent* iterContent = firstContent;
   PRInt32 depth = 0;
@@ -937,17 +937,17 @@ void nsAccessible::GetBoundsRect(nsRect&
       iterFrame->GetParent()->GetOffsetToExternal(*aBoundingFrame);
 
     // Add this frame's bounds to total
     aTotalBounds.UnionRect(aTotalBounds, currFrameBounds);
 
     nsIFrame *iterNextFrame = nsnull;
 
     if (nsCoreUtils::IsCorrectFrameType(iterFrame,
-                                        nsAccessibilityAtoms::inlineFrame)) {
+                                        nsGkAtoms::inlineFrame)) {
       // Only do deeper bounds search if we're on an inline frame
       // Inline frames can contain larger frames inside of them
       iterNextFrame = iterFrame->GetFirstPrincipalChild();
     }
 
     if (iterNextFrame) 
       ++depth;  // Child was found in code above this: We are going deeper in this iteration of the loop
     else {  
@@ -1037,21 +1037,21 @@ NS_IMETHODIMP nsAccessible::SetSelected(
       nsAccUtils::GetMultiSelectableContainer(mContent);
     if (!multiSelect) {
       return aSelect ? TakeFocus() : NS_ERROR_FAILURE;
     }
 
     if (mRoleMapEntry) {
       if (aSelect) {
         return mContent->SetAttr(kNameSpaceID_None,
-                                 nsAccessibilityAtoms::aria_selected,
+                                 nsGkAtoms::aria_selected,
                                  NS_LITERAL_STRING("true"), PR_TRUE);
       }
       return mContent->UnsetAttr(kNameSpaceID_None,
-                                 nsAccessibilityAtoms::aria_selected, PR_TRUE);
+                                 nsGkAtoms::aria_selected, PR_TRUE);
     }
   }
 
   return NS_OK;
 }
 
 /* void takeSelection (); */
 NS_IMETHODIMP nsAccessible::TakeSelection()
@@ -1091,26 +1091,26 @@ nsAccessible::TakeFocus()
   // the ID of the desired element.
   if (!frame->IsFocusable()) {
     nsAutoString id;
     if (nsCoreUtils::GetID(mContent, id)) {
 
       nsIContent* ancestorContent = mContent;
       while ((ancestorContent = ancestorContent->GetParent()) &&
              !ancestorContent->HasAttr(kNameSpaceID_None,
-                                       nsAccessibilityAtoms::aria_activedescendant));
+                                       nsGkAtoms::aria_activedescendant));
 
       if (ancestorContent) {
         nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
         if (presShell) {
           nsIFrame *frame = ancestorContent->GetPrimaryFrame();
           if (frame && frame->IsFocusable()) {
             focusContent = ancestorContent;
             focusContent->SetAttr(kNameSpaceID_None,
-                                  nsAccessibilityAtoms::aria_activedescendant,
+                                  nsGkAtoms::aria_activedescendant,
                                   id, PR_TRUE);
           }
         }
       }
     }
   }
 
   nsCOMPtr<nsIDOMElement> element(do_QueryInterface(focusContent));
@@ -1210,18 +1210,18 @@ nsAccessible::GetXULName(nsAString& aLab
     return NS_OK;
   }
 
   // Can get text from title of <toolbaritem> if we're a child of a <toolbaritem>
   nsIContent *bindingParent = mContent->GetBindingParent();
   nsIContent *parent = bindingParent? bindingParent->GetParent() :
                                       mContent->GetParent();
   while (parent) {
-    if (parent->Tag() == nsAccessibilityAtoms::toolbaritem &&
-        parent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title, label)) {
+    if (parent->Tag() == nsGkAtoms::toolbaritem &&
+        parent->GetAttr(kNameSpaceID_None, nsGkAtoms::title, label)) {
       label.CompressWhitespace();
       aLabel = label;
       return NS_OK;
     }
     parent = parent->GetParent();
   }
 
   return nsTextEquivUtils::GetNameFromSubtree(this, aLabel);
@@ -1288,33 +1288,33 @@ nsAccessible::GetAttributes(nsIPersisten
   nsAutoString oldValueUnused;
   if (nsCoreUtils::GetID(mContent, 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 (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, xmlRoles)) {
+  if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::role, xmlRoles)) {
     attributes->SetStringProperty(NS_LITERAL_CSTRING("xml-roles"),  xmlRoles, oldValueUnused);          
   }
 
   nsCOMPtr<nsIAccessibleValue> supportsValue = do_QueryInterface(static_cast<nsIAccessible*>(this));
   if (supportsValue) {
     // We support values, so expose the string value as well, via the valuetext object attribute
     // We test for the value interface because we don't want to expose traditional get_accValue()
     // information such as URL's on links and documents, or text in an input
     nsAutoString valuetext;
     GetValue(valuetext);
     attributes->SetStringProperty(NS_LITERAL_CSTRING("valuetext"), valuetext, oldValueUnused);
   }
 
   // Expose checkable object attribute if the accessible has checkable state
   if (State() & states::CHECKABLE)
-    nsAccUtils::SetAccAttr(attributes, nsAccessibilityAtoms::checkable, NS_LITERAL_STRING("true"));
+    nsAccUtils::SetAccAttr(attributes, nsGkAtoms::checkable, NS_LITERAL_STRING("true"));
 
   // Group attributes (level/setsize/posinset)
   PRInt32 level = 0, posInSet = 0, setSize = 0;
   rv = GroupPosition(&level, &setSize, &posInSet);
   if (NS_SUCCEEDED(rv))
     nsAccUtils::SetAccGroupAttrs(attributes, level, setSize, posInSet);
 
   // Expose object attributes from ARIA attributes.
@@ -1338,20 +1338,20 @@ nsAccessible::GetAttributes(nsIPersisten
       }
     }
   }
 
   // If there is no aria-live attribute then expose default value of 'live'
   // object attribute used for ARIA role of this accessible.
   if (mRoleMapEntry) {
     nsAutoString live;
-    nsAccUtils::GetAccAttr(attributes, nsAccessibilityAtoms::live, live);
+    nsAccUtils::GetAccAttr(attributes, nsGkAtoms::live, live);
     if (live.IsEmpty()) {
       if (nsAccUtils::GetLiveAttrValue(mRoleMapEntry->liveAttRule, live))
-        nsAccUtils::SetAccAttr(attributes, nsAccessibilityAtoms::live, live);
+        nsAccUtils::SetAccAttr(attributes, nsGkAtoms::live, live);
     }
   }
 
   return NS_OK;
 }
 
 nsresult
 nsAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
@@ -1368,18 +1368,18 @@ nsAccessible::GetAttributesInternal(nsIP
                                    oldValueUnused);
   }
 
   nsEventShell::GetEventAttributes(GetNode(), 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 (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::_class, _class))
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::_class, _class);
+  if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::_class, _class))
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::_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
   nsIContent *startContent = mContent;
@@ -1411,40 +1411,37 @@ nsAccessible::GetAttributesInternal(nsIP
   }
 
   // Expose 'display' attribute.
   nsAutoString value;
   nsresult rv = GetComputedStyleValue(EmptyString(),
                                       NS_LITERAL_STRING("display"),
                                       value);
   if (NS_SUCCEEDED(rv))
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::display,
-                           value);
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::display, value);
 
   // Expose 'text-align' attribute.
   rv = GetComputedStyleValue(EmptyString(), NS_LITERAL_STRING("text-align"),
                              value);
   if (NS_SUCCEEDED(rv))
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::textAlign,
-                           value);
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::textAlign, value);
 
   // Expose 'text-indent' attribute.
   rv = GetComputedStyleValue(EmptyString(), NS_LITERAL_STRING("text-indent"),
                              value);
   if (NS_SUCCEEDED(rv))
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::textIndent,
-                           value);
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::textIndent, value);
 
   // Expose draggable object attribute?
   nsCOMPtr<nsIDOMNSHTMLElement> htmlElement = do_QueryInterface(mContent);
   if (htmlElement) {
     PRBool draggable = PR_FALSE;
     htmlElement->GetDraggable(&draggable);
     if (draggable) {
-      nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::draggable,
+      nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::draggable,
                              NS_LITERAL_STRING("true"));
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -1460,21 +1457,21 @@ nsAccessible::GroupPosition(PRInt32 *aGr
 
   NS_ENSURE_ARG_POINTER(aPositionInGroup);
   *aPositionInGroup = 0;
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   // Get group position from ARIA attributes.
-  nsCoreUtils::GetUIntAttr(mContent, nsAccessibilityAtoms::aria_level,
+  nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_level,
                            aGroupLevel);
-  nsCoreUtils::GetUIntAttr(mContent, nsAccessibilityAtoms::aria_posinset,
+  nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_posinset,
                            aPositionInGroup);
-  nsCoreUtils::GetUIntAttr(mContent, nsAccessibilityAtoms::aria_setsize,
+  nsCoreUtils::GetUIntAttr(mContent, nsGkAtoms::aria_setsize,
                            aSimilarItemsInGroup);
 
   // If ARIA is missed and the accessible is visible then calculate group
   // position from hierarchy.
   if (State() & states::INVISIBLE)
     return NS_OK;
 
   // Calculate group level if ARIA is missed.
@@ -1517,18 +1514,18 @@ nsAccessible::State()
 
   PRUint64 state = NativeState();
   // Apply ARIA states to be sure accessible states will be overridden.
   ApplyARIAState(&state);
 
   if (mRoleMapEntry && mRoleMapEntry->role == nsIAccessibleRole::ROLE_PAGETAB &&
       !(state & states::SELECTED) &&
       !mContent->AttrValueIs(kNameSpaceID_None,
-                             nsAccessibilityAtoms::aria_selected,
-                             nsAccessibilityAtoms::_false, eCaseMatters)) {
+                             nsGkAtoms::aria_selected,
+                             nsGkAtoms::_false, eCaseMatters)) {
     // Special case: for tabs, focused implies selected, unless explicitly
     // false, i.e. aria-selected="false".
     if (state & states::FOCUSED) {
       state |= states::SELECTED;
     } else {
       // If focus is in a child of the tab panel surely the tab is selected!
       Relation rel = RelationByType(nsIAccessibleRelation::RELATION_LABEL_FOR);
       nsAccessible* relTarget = nsnull;
@@ -1562,17 +1559,17 @@ nsAccessible::State()
     // 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.
     nsAutoString id;
     if (nsCoreUtils::GetID(mContent, id)) {
       nsIContent *ancestorContent = mContent;
       nsAutoString activeID;
       while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
-        if (ancestorContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant, activeID)) {
+        if (ancestorContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant, activeID)) {
           if (id == activeID) {
             state |= states::ACTIVE;
           }
           break;
         }
       }
     }
   }
@@ -1624,31 +1621,31 @@ nsAccessible::ApplyARIAState(PRUint64* a
     // (primarily on the document) as the hint for creating a virtual buffer.
     if (mRoleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING)
       *aState &= ~states::READONLY;
 
     if (mContent->HasAttr(kNameSpaceID_None, mContent->GetIDAttributeName())) {
       // If has a role & ID and aria-activedescendant on the container, assume focusable
       nsIContent *ancestorContent = mContent;
       while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
-        if (ancestorContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_activedescendant)) {
+        if (ancestorContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant)) {
             // ancestor has activedescendant property, this content could be active
           *aState |= states::FOCUSABLE;
           break;
         }
       }
     }
   }
 
   if (*aState & states::FOCUSABLE) {
     // Special case: aria-disabled propagates from ancestors down to any focusable descendant
     nsIContent *ancestorContent = mContent;
     while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
-      if (ancestorContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_disabled,
-                                       nsAccessibilityAtoms::_true, eCaseMatters)) {
+      if (ancestorContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_disabled,
+                                       nsGkAtoms::_true, eCaseMatters)) {
           // ancestor has aria-disabled property, this is disabled
         *aState |= states::UNAVAILABLE;
         break;
       }
     }    
   }
 
   if (!mRoleMapEntry)
@@ -1678,18 +1675,18 @@ nsAccessible::GetValue(nsAString& aValue
   if (mRoleMapEntry) {
     if (mRoleMapEntry->valueRule == eNoValue) {
       return NS_OK;
     }
 
     // aria-valuenow is a number, and aria-valuetext is the optional text equivalent
     // For the string value, we will try the optional text equivalent first
     if (!mContent->GetAttr(kNameSpaceID_None,
-                           nsAccessibilityAtoms::aria_valuetext, aValue)) {
-      mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_valuenow,
+                           nsGkAtoms::aria_valuetext, aValue)) {
+      mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_valuenow,
                         aValue);
     }
   }
 
   if (!aValue.IsEmpty())
     return NS_OK;
 
   // Check if it's a simple xlink.
@@ -1703,39 +1700,39 @@ nsAccessible::GetValue(nsAString& aValue
 
   return NS_OK;
 }
 
 // nsIAccessibleValue
 NS_IMETHODIMP
 nsAccessible::GetMaximumValue(double *aMaximumValue)
 {
-  return GetAttrValue(nsAccessibilityAtoms::aria_valuemax, aMaximumValue);
+  return GetAttrValue(nsGkAtoms::aria_valuemax, aMaximumValue);
 }
 
 NS_IMETHODIMP
 nsAccessible::GetMinimumValue(double *aMinimumValue)
 {
-  return GetAttrValue(nsAccessibilityAtoms::aria_valuemin, aMinimumValue);
+  return GetAttrValue(nsGkAtoms::aria_valuemin, aMinimumValue);
 }
 
 NS_IMETHODIMP
 nsAccessible::GetMinimumIncrement(double *aMinIncrement)
 {
   NS_ENSURE_ARG_POINTER(aMinIncrement);
   *aMinIncrement = 0;
 
   // No mimimum increment in dynamic content spec right now
   return NS_OK_NO_ARIA_VALUE;
 }
 
 NS_IMETHODIMP
 nsAccessible::GetCurrentValue(double *aValue)
 {
-  return GetAttrValue(nsAccessibilityAtoms::aria_valuenow, aValue);
+  return GetAttrValue(nsGkAtoms::aria_valuenow, aValue);
 }
 
 NS_IMETHODIMP
 nsAccessible::SetCurrentValue(double aValue)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
@@ -1753,18 +1750,17 @@ nsAccessible::SetCurrentValue(double aVa
 
   double maxValue = 0;
   if (NS_SUCCEEDED(GetMaximumValue(&maxValue)) && aValue > maxValue)
     return NS_ERROR_INVALID_ARG;
 
   nsAutoString newValue;
   newValue.AppendFloat(aValue);
   return mContent->SetAttr(kNameSpaceID_None,
-                           nsAccessibilityAtoms::aria_valuenow, newValue,
-                           PR_TRUE);
+                           nsGkAtoms::aria_valuenow, newValue, PR_TRUE);
 }
 
 /* void setName (in DOMString name); */
 NS_IMETHODIMP nsAccessible::SetName(const nsAString& name)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -1804,26 +1800,25 @@ PRUint32
 nsAccessible::ARIARoleInternal()
 {
   NS_PRECONDITION(mRoleMapEntry && mRoleMapEntry->roleRule == kUseMapRole,
                   "ARIARoleInternal should only be called when ARIA role overrides!");
 
   // XXX: these unfortunate exceptions don't fit into the ARIA table. This is
   // where the accessible role depends on both the role and ARIA state.
   if (mRoleMapEntry->role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
-    if (nsAccUtils::HasDefinedARIAToken(mContent,
-                                        nsAccessibilityAtoms::aria_pressed)) {
+    if (nsAccUtils::HasDefinedARIAToken(mContent, nsGkAtoms::aria_pressed)) {
       // For simplicity, any existing pressed attribute except "" or "undefined"
       // indicates a toggle.
       return nsIAccessibleRole::ROLE_TOGGLE_BUTTON;
     }
 
     if (mContent->AttrValueIs(kNameSpaceID_None,
-                              nsAccessibilityAtoms::aria_haspopup,
-                              nsAccessibilityAtoms::_true,
+                              nsGkAtoms::aria_haspopup,
+                              nsGkAtoms::_true,
                               eCaseMatters)) {
       // For button with aria-haspopup="true".
       return nsIAccessibleRole::ROLE_BUTTONMENU;
     }
 
   } else if (mRoleMapEntry->role == nsIAccessibleRole::ROLE_LISTBOX) {
     // A listbox inside of a combobox needs a special role because of ATK
     // mapping to menu.
@@ -1974,17 +1969,17 @@ NS_IMETHODIMP nsAccessible::GetHelp(nsAS
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsIContent*
 nsAccessible::GetAtomicRegion() const
 {
   nsIContent *loopContent = mContent;
   nsAutoString atomic;
-  while (loopContent && !loopContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_atomic, atomic))
+  while (loopContent && !loopContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_atomic, atomic))
     loopContent = loopContent->GetParent();
 
   return atomic.EqualsLiteral("true") ? loopContent : nsnull;
 }
 
 // nsIAccessible getRelationByType()
 NS_IMETHODIMP
 nsAccessible::GetRelationByType(PRUint32 aType,
@@ -2003,60 +1998,60 @@ nsAccessible::GetRelationByType(PRUint32
 Relation
 nsAccessible::RelationByType(PRUint32 aType)
 {
   // Relationships are defined on the same content node that the role would be
   // defined on.
   switch (aType) {
     case nsIAccessibleRelation::RELATION_LABEL_FOR: {
       Relation rel(new RelatedAccIterator(GetDocAccessible(), mContent,
-                                          nsAccessibilityAtoms::aria_labelledby));
-      if (mContent->Tag() == nsAccessibilityAtoms::label)
+                                          nsGkAtoms::aria_labelledby));
+      if (mContent->Tag() == nsGkAtoms::label)
         rel.AppendIter(new IDRefsIterator(mContent, mContent->IsHTML() ?
-                                          nsAccessibilityAtoms::_for :
-                                          nsAccessibilityAtoms::control));
+                                          nsGkAtoms::_for :
+                                          nsGkAtoms::control));
 
       return rel;
     }
     case nsIAccessibleRelation::RELATION_LABELLED_BY: {
       Relation rel(new IDRefsIterator(mContent,
-                                      nsAccessibilityAtoms::aria_labelledby));
+                                      nsGkAtoms::aria_labelledby));
       if (mContent->IsHTML()) {
         rel.AppendIter(new HTMLLabelIterator(GetDocAccessible(), mContent));
       } else if (mContent->IsXUL()) {
         rel.AppendIter(new XULLabelIterator(GetDocAccessible(), mContent));
       }
 
       return rel;
     }
     case nsIAccessibleRelation::RELATION_DESCRIBED_BY: {
       Relation rel(new IDRefsIterator(mContent,
-                                        nsAccessibilityAtoms::aria_describedby));
+                                        nsGkAtoms::aria_describedby));
       if (mContent->IsXUL())
         rel.AppendIter(new XULDescriptionIterator(GetDocAccessible(), mContent));
 
       return rel;
     }
     case nsIAccessibleRelation::RELATION_DESCRIPTION_FOR: {
       Relation rel(new RelatedAccIterator(GetDocAccessible(), mContent,
-                                            nsAccessibilityAtoms::aria_describedby));
+                                            nsGkAtoms::aria_describedby));
 
       // This affectively adds an optional control attribute to xul:description,
       // which only affects accessibility, by allowing the description to be
       // tied to a control.
-      if (mContent->Tag() == nsAccessibilityAtoms::description &&
+      if (mContent->Tag() == nsGkAtoms::description &&
           mContent->IsXUL())
         rel.AppendIter(new IDRefsIterator(mContent,
-                                          nsAccessibilityAtoms::control));
+                                          nsGkAtoms::control));
 
       return rel;
     }
     case nsIAccessibleRelation::RELATION_NODE_CHILD_OF: {
       Relation rel(new RelatedAccIterator(GetDocAccessible(), mContent,
-                                            nsAccessibilityAtoms::aria_owns));
+                                            nsGkAtoms::aria_owns));
       
       // This is an ARIA tree or treegrid that doesn't use owns, so we need to
       // get the parent the hard way.
       if (mRoleMapEntry &&
           (mRoleMapEntry->role == nsIAccessibleRole::ROLE_OUTLINEITEM ||
            mRoleMapEntry->role == nsIAccessibleRole::ROLE_ROW)) {
         AccGroupInfo* groupInfo = GetGroupInfo();
         if (!groupInfo)
@@ -2080,29 +2075,29 @@ nsAccessible::RelationByType(PRUint32 aT
             rel.AppendTarget(Parent());
         }
       }
 
       return rel;
     }
     case nsIAccessibleRelation::RELATION_CONTROLLED_BY:
       return Relation(new RelatedAccIterator(GetDocAccessible(), mContent,
-                                             nsAccessibilityAtoms::aria_controls));
+                                             nsGkAtoms::aria_controls));
     case nsIAccessibleRelation::RELATION_CONTROLLER_FOR: {
       Relation rel(new IDRefsIterator(mContent,
-                                      nsAccessibilityAtoms::aria_controls));
+                                      nsGkAtoms::aria_controls));
       rel.AppendIter(new HTMLOutputIterator(GetDocAccessible(), mContent));
       return rel;
     }
     case nsIAccessibleRelation::RELATION_FLOWS_TO:
       return Relation(new IDRefsIterator(mContent,
-                                         nsAccessibilityAtoms::aria_flowto));
+                                         nsGkAtoms::aria_flowto));
     case nsIAccessibleRelation::RELATION_FLOWS_FROM:
       return Relation(new RelatedAccIterator(GetDocAccessible(), mContent,
-                                             nsAccessibilityAtoms::aria_flowto));
+                                             nsGkAtoms::aria_flowto));
     case nsIAccessibleRelation::RELATION_DEFAULT_BUTTON: {
       if (mContent->IsHTML()) {
         // HTML form controls implements nsIFormControl interface.
         nsCOMPtr<nsIFormControl> control(do_QueryInterface(mContent));
         if (control) {
           nsCOMPtr<nsIForm> form(do_QueryInterface(control->GetFormElement()));
           if (form) {
             nsCOMPtr<nsIContent> formContent =
@@ -2464,17 +2459,17 @@ nsAccessible::AppendTextTo(nsAString& aT
   // accessible. Text accessible overrides this method to return enclosed text.
   if (aStartOffset != 0 || aLength == 0)
     return;
 
   nsIFrame *frame = GetFrame();
   if (!frame)
     return;
 
-  if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
+  if (frame->GetType() == nsGkAtoms::brFrame) {
     aText += kForcedNewLineChar;
   } else if (nsAccUtils::MustPrune(Parent())) {
     // Expose the embedded object accessible as imaginary embedded object
     // character if its parent hypertext accessible doesn't expose children to
     // AT.
     aText += kImaginaryEmbeddedObjectChar;
   } else {
     aText += kEmbeddedObjectChar;
@@ -2501,24 +2496,24 @@ nsAccessible::Shutdown()
 
 nsresult
 nsAccessible::GetARIAName(nsAString& aName)
 {
   nsAutoString label;
 
   // aria-labelledby now takes precedence over aria-label
   nsresult rv = nsTextEquivUtils::
-    GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_labelledby, label);
+    GetTextEquivFromIDRefs(this, nsGkAtoms::aria_labelledby, label);
   if (NS_SUCCEEDED(rv)) {
     label.CompressWhitespace();
     aName = label;
   }
 
   if (label.IsEmpty() &&
-      mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_label,
+      mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_label,
                         label)) {
     label.CompressWhitespace();
     aName = label;
   }
   
   return NS_OK;
 }
 
@@ -2765,17 +2760,17 @@ nsAccessible::AnchorURIAt(PRUint32 aAnch
   NS_PRECONDITION(IsLink(), "AnchorURIAt is called on not hyper link!");
 
   if (aAnchorIndex != 0)
     return nsnull;
 
   // Check if it's a simple xlink.
   if (nsCoreUtils::IsXLink(mContent)) {
     nsAutoString href;
-    mContent->GetAttr(kNameSpaceID_XLink, nsAccessibilityAtoms::href, href);
+    mContent->GetAttr(kNameSpaceID_XLink, nsGkAtoms::href, href);
 
     nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
     nsCOMPtr<nsIDocument> document = mContent->GetOwnerDoc();
     nsIURI* anchorURI = nsnull;
     NS_NewURI(&anchorURI, href,
               document ? document->GetDocumentCharacterSet().get() : nsnull,
               baseURI);
     return anchorURI;
@@ -3061,33 +3056,33 @@ nsAccessible::GetActionRule(PRUint64 aSt
     return eNoAction;
   
   // Check if it's simple xlink.
   if (nsCoreUtils::IsXLink(mContent))
     return eJumpAction;
 
   // Return "click" action on elements that have an attached popup menu.
   if (mContent->IsXUL())
-    if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::popup))
+    if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popup))
       return eClickAction;
 
   // Has registered 'click' event handler.
   PRBool isOnclick = nsCoreUtils::HasClickListener(mContent);
 
   if (isOnclick)
     return eClickAction;
   
   // Get an action based on ARIA role.
   if (mRoleMapEntry &&
       mRoleMapEntry->actionRule != eNoAction)
     return mRoleMapEntry->actionRule;
 
   // Get an action based on ARIA attribute.
   if (nsAccUtils::HasDefinedARIAToken(mContent,
-                                      nsAccessibilityAtoms::aria_expanded))
+                                      nsGkAtoms::aria_expanded))
     return eExpandAction;
 
   return eNoAction;
 }
 
 AccGroupInfo*
 nsAccessible::GetGroupInfo()
 {
--- a/accessible/src/base/nsBaseWidgetAccessible.cpp
+++ b/accessible/src/base/nsBaseWidgetAccessible.cpp
@@ -35,17 +35,16 @@
  * 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 "nsBaseWidgetAccessible.h"
 
 #include "States.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 #include "nsHyperTextAccessibleWrap.h"
 
 #include "nsIDOMNSHTMLElement.h"
 #include "nsGUIEvent.h"
 #include "nsILink.h"
--- a/accessible/src/base/nsCoreUtils.cpp
+++ b/accessible/src/base/nsCoreUtils.cpp
@@ -199,17 +199,17 @@ PRUint32
 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
   // nsEventStateManager::GetRegisteredAccessKey() method.
-  if (!aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::accesskey))
+  if (!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::accesskey))
     return 0;
 
   nsCOMPtr<nsIDocument> doc = aContent->GetOwnerDoc();
   if (!doc)
     return 0;
 
   nsCOMPtr<nsIPresShell> presShell = doc->GetShell();
   if (!presShell)
@@ -572,31 +572,30 @@ nsCoreUtils::GetUIntAttr(nsIContent *aCo
 }
 
 PRBool
 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);
+  return aContent->AttrValueIs(kNameSpaceID_XLink, nsGkAtoms::type,
+                               nsGkAtoms::simple, eCaseMatters) &&
+    aContent->HasAttr(kNameSpaceID_XLink, nsGkAtoms::href);
 }
 
 void
 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->GetAttr(kNameSpaceID_None, nsGkAtoms::lang, aLanguage))
     walkUp = walkUp->GetParent();
 }
 
 already_AddRefed<nsIDOMCSSStyleDeclaration>
 nsCoreUtils::GetComputedStyleDeclaration(const nsAString& aPseudoElt,
                                          nsIContent *aContent)
 {
   nsIContent* content = GetDOMElementFor(aContent);
@@ -633,17 +632,17 @@ nsCoreUtils::GetTreeBodyBoxObject(nsITre
 }
 
 already_AddRefed<nsITreeBoxObject>
 nsCoreUtils::GetTreeBoxObject(nsIContent *aContent)
 {
   // Find DOMNode's parents recursively until reach the <tree> tag
   nsIContent* currentContent = aContent;
   while (currentContent) {
-    if (currentContent->NodeInfo()->Equals(nsAccessibilityAtoms::tree,
+    if (currentContent->NodeInfo()->Equals(nsGkAtoms::tree,
                                            kNameSpaceID_XUL)) {
       // We will get the nsITreeBoxObject from the tree node
       nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(currentContent));
       if (xulElement) {
         nsCOMPtr<nsIBoxObject> box;
         xulElement->GetBoxObject(getter_AddRefs(box));
         nsCOMPtr<nsITreeBoxObject> treeBox(do_QueryInterface(box));
         if (treeBox)
@@ -761,18 +760,18 @@ nsCoreUtils::GetPreviousSensibleColumn(n
 }
 
 PRBool
 nsCoreUtils::IsColumnHidden(nsITreeColumn *aColumn)
 {
   nsCOMPtr<nsIDOMElement> element;
   aColumn->GetElement(getter_AddRefs(element));
   nsCOMPtr<nsIContent> content = do_QueryInterface(element);
-  return content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::hidden,
-                              nsAccessibilityAtoms::_true, eCaseMatters);
+  return content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::hidden,
+                              nsGkAtoms::_true, eCaseMatters);
 }
 
 bool
 nsCoreUtils::CheckVisibilityInParentChain(nsIFrame* aFrame)
 {
   nsIView* view = aFrame->GetClosestView();
   if (view && !view->IsEffectivelyVisible())
     return false;
--- a/accessible/src/base/nsCoreUtils.h
+++ b/accessible/src/base/nsCoreUtils.h
@@ -34,17 +34,16 @@
  * 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 nsCoreUtils_h_
 #define nsCoreUtils_h_
 
-#include "nsAccessibilityAtoms.h"
 
 #include "nsIDOMNode.h"
 #include "nsIContent.h"
 #include "nsIBoxObject.h"
 #include "nsITreeBoxObject.h"
 #include "nsITreeColumns.h"
 
 #include "nsIFrame.h"
@@ -363,18 +362,18 @@ public:
    */
   static PRBool IsColumnHidden(nsITreeColumn *aColumn);
 
   /**
    * Return true if the given node is table header element.
    */
   static PRBool IsHTMLTableHeader(nsIContent *aContent)
   {
-    return aContent->NodeInfo()->Equals(nsAccessibilityAtoms::th) ||
-      aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::scope);
+    return aContent->NodeInfo()->Equals(nsGkAtoms::th) ||
+      aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::scope);
   }
 
   /**
    * Check the visibility across both parent content and chrome.
    */
   static bool CheckVisibilityInParentChain(nsIFrame* aFrame);
 
 };
--- a/accessible/src/base/nsDocAccessible.cpp
+++ b/accessible/src/base/nsDocAccessible.cpp
@@ -34,17 +34,16 @@
  * 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 "AccIterator.h"
 #include "States.h"
 #include "nsAccCache.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsAccessibilityService.h"
 #include "nsAccTreeWalker.h"
 #include "nsAccUtils.h"
 #include "nsRootAccessible.h"
 #include "nsTextEquivUtils.h"
 
 #include "nsIMutableArray.h"
 #include "nsICommandManager.h"
@@ -81,23 +80,23 @@
 namespace dom = mozilla::dom;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
 // Static member initialization
 
 static nsIAtom** kRelationAttrs[] =
 {
-  &nsAccessibilityAtoms::aria_labelledby,
-  &nsAccessibilityAtoms::aria_describedby,
-  &nsAccessibilityAtoms::aria_owns,
-  &nsAccessibilityAtoms::aria_controls,
-  &nsAccessibilityAtoms::aria_flowto,
-  &nsAccessibilityAtoms::_for,
-  &nsAccessibilityAtoms::control
+  &nsGkAtoms::aria_labelledby,
+  &nsGkAtoms::aria_describedby,
+  &nsGkAtoms::aria_owns,
+  &nsGkAtoms::aria_controls,
+  &nsGkAtoms::aria_flowto,
+  &nsGkAtoms::_for,
+  &nsGkAtoms::control
 };
 
 static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
 
 ////////////////////////////////////////////////////////////////////////////////
 // Constructor/desctructor
 
 nsDocAccessible::
@@ -278,17 +277,17 @@ nsDocAccessible::SetRoleMapEntry(nsRoleM
 void
 nsDocAccessible::Description(nsString& aDescription)
 {
   if (mParent)
     mParent->Description(aDescription);
 
   if (aDescription.IsEmpty())
     nsTextEquivUtils::
-      GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
+      GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
                              aDescription);
 }
 
 // nsAccessible public method
 PRUint64
 nsDocAccessible::NativeState()
 {
   // The root content of the document might be removed so that mContent is
@@ -934,18 +933,18 @@ nsDocAccessible::AttributeWillChange(nsI
   // attribute change. Note, we assume there's no nested ARIA attribute
   // changes. If this happens then we should end up with keeping a stack of
   // old values.
 
   // XXX TODO: bugs 472142, 472143.
   // Here we will want to cache whatever attribute values we are interested
   // in, such as the existence of aria-pressed for button (so we know if we
   // need to newly expose it as a toggle button) etc.
-  if (aAttribute == nsAccessibilityAtoms::aria_checked ||
-      aAttribute == nsAccessibilityAtoms::aria_pressed) {
+  if (aAttribute == nsGkAtoms::aria_checked ||
+      aAttribute == nsGkAtoms::aria_pressed) {
     mARIAAttrOldValue = (aModType != nsIDOMMutationEvent::ADDITION) ?
       nsAccUtils::GetARIAToken(aElement, aAttribute) : nsnull;
   }
 }
 
 void
 nsDocAccessible::AttributeChanged(nsIDocument *aDocument,
                                   dom::Element* aElement,
@@ -1005,18 +1004,18 @@ nsDocAccessible::AttributeChangedImpl(ns
   // XXX todo: report aria state changes for "undefined" literal value changes
   // filed as bug 472142
   //
   // XXX todo:  invalidate accessible when aria state changes affect exposed role
   // filed as bug 472143
 
   // Universal boolean properties that don't require a role. Fire the state
   // change when disabled or aria-disabled attribute is set.
-  if (aAttribute == nsAccessibilityAtoms::disabled ||
-      aAttribute == nsAccessibilityAtoms::aria_disabled) {
+  if (aAttribute == nsGkAtoms::disabled ||
+      aAttribute == nsGkAtoms::aria_disabled) {
 
     // Note. Checking the XUL or HTML namespace would not seem to gain us
     // anything, because disabled attribute really is going to mean the same
     // thing in any namespace.
 
     // Note. We use the attribute instead of the disabled state bit because
     // ARIA's aria-disabled does not affect the disabled state bit.
 
@@ -1036,35 +1035,35 @@ nsDocAccessible::AttributeChangedImpl(ns
   if (aNameSpaceID == kNameSpaceID_None) {
     // Check for hyphenated aria-foo property?
     if (StringBeginsWith(nsDependentAtomString(aAttribute),
                          NS_LITERAL_STRING("aria-"))) {
       ARIAAttributeChanged(aContent, aAttribute);
     }
   }
 
-  if (aAttribute == nsAccessibilityAtoms::alt ||
-      aAttribute == nsAccessibilityAtoms::title ||
-      aAttribute == nsAccessibilityAtoms::aria_label ||
-      aAttribute == nsAccessibilityAtoms::aria_labelledby) {
+  if (aAttribute == nsGkAtoms::alt ||
+      aAttribute == nsGkAtoms::title ||
+      aAttribute == nsGkAtoms::aria_label ||
+      aAttribute == nsGkAtoms::aria_labelledby) {
     FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_NAME_CHANGE,
                                aContent);
     return;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::aria_busy) {
+  if (aAttribute == nsGkAtoms::aria_busy) {
     PRBool isOn = aContent->AttrValueIs(aNameSpaceID, aAttribute,
-                                        nsAccessibilityAtoms::_true, eCaseMatters);
+                                        nsGkAtoms::_true, eCaseMatters);
     nsRefPtr<AccEvent> event = new AccStateChangeEvent(aContent, states::BUSY, isOn);
     FireDelayedAccessibleEvent(event);
     return;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::selected ||
-      aAttribute == nsAccessibilityAtoms::aria_selected) {
+  if (aAttribute == nsGkAtoms::selected ||
+      aAttribute == nsGkAtoms::aria_selected) {
     // ARIA or XUL selection
 
     nsAccessible *multiSelect =
       nsAccUtils::GetMultiSelectableContainer(aContent);
     // Multi selects use selection_add and selection_remove
     // Single select widgets just mirror event_selection for
     // whatever gets event_focus, which is done in
     // nsRootAccessible::FireAccessibleFocusEvent()
@@ -1072,136 +1071,134 @@ nsDocAccessible::AttributeChangedImpl(ns
     if (multiSelect) {
       // Need to find the right event to use here, SELECTION_WITHIN would
       // seem right but we had started using it for something else
       FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_SELECTION_WITHIN,
                                  multiSelect->GetNode(),
                                  AccEvent::eAllowDupes);
 
       static nsIContent::AttrValuesArray strings[] =
-        {&nsAccessibilityAtoms::_empty, &nsAccessibilityAtoms::_false, nsnull};
+        {&nsGkAtoms::_empty, &nsGkAtoms::_false, nsnull};
       if (aContent->FindAttrValueIn(kNameSpaceID_None, aAttribute,
                                     strings, eCaseMatters) >= 0) {
         FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_SELECTION_REMOVE,
                                    aContent);
         return;
       }
 
       FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_SELECTION_ADD,
                                  aContent);
     }
   }
 
-  if (aAttribute == nsAccessibilityAtoms::contenteditable) {
+  if (aAttribute == nsGkAtoms::contenteditable) {
     nsRefPtr<AccEvent> editableChangeEvent =
       new AccStateChangeEvent(aContent, states::EDITABLE);
     FireDelayedAccessibleEvent(editableChangeEvent);
     return;
   }
 }
 
 // nsDocAccessible protected member
 void
 nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
 {
   // Note: For universal/global ARIA states and properties we don't care if
   // there is an ARIA role present or not.
 
-  if (aAttribute == nsAccessibilityAtoms::aria_required) {
+  if (aAttribute == nsGkAtoms::aria_required) {
     nsRefPtr<AccEvent> event =
       new AccStateChangeEvent(aContent, states::REQUIRED);
     FireDelayedAccessibleEvent(event);
     return;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::aria_invalid) {
+  if (aAttribute == nsGkAtoms::aria_invalid) {
     nsRefPtr<AccEvent> event =
       new AccStateChangeEvent(aContent, states::INVALID);
     FireDelayedAccessibleEvent(event);
     return;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::aria_activedescendant) {
+  if (aAttribute == nsGkAtoms::aria_activedescendant) {
     // The activedescendant universal property redirects accessible focus events
     // to the element with the id that activedescendant points to
     nsCOMPtr<nsINode> focusedNode = GetCurrentFocus();
     if (nsCoreUtils::GetRoleContent(focusedNode) == aContent) {
       nsAccessible* focusedAcc = GetAccService()->GetAccessible(focusedNode);
       nsRootAccessible* rootAcc = RootAccessible();
       if (rootAcc && focusedAcc) {
         rootAcc->FireAccessibleFocusEvent(focusedAcc, nsnull, PR_TRUE);
       }
     }
     return;
   }
 
   // For aria drag and drop changes we fire a generic attribute change event;
   // at least until native API comes up with a more meaningful event.
-  if (aAttribute == nsAccessibilityAtoms::aria_grabbed ||
-      aAttribute == nsAccessibilityAtoms::aria_dropeffect ||
-      aAttribute == nsAccessibilityAtoms::aria_hidden ||
-      aAttribute == nsAccessibilityAtoms::aria_sort) {
+  if (aAttribute == nsGkAtoms::aria_grabbed ||
+      aAttribute == nsGkAtoms::aria_dropeffect ||
+      aAttribute == nsGkAtoms::aria_hidden ||
+      aAttribute == nsGkAtoms::aria_sort) {
     FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED,
                                aContent);
   }
 
   // We treat aria-expanded as a global ARIA state for historical reasons
-  if (aAttribute == nsAccessibilityAtoms::aria_expanded) {
+  if (aAttribute == nsGkAtoms::aria_expanded) {
     nsRefPtr<AccEvent> event =
       new AccStateChangeEvent(aContent, states::EXPANDED);
     FireDelayedAccessibleEvent(event);
     return;
   }
 
-  if (!aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
+  if (!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
     // We don't care about these other ARIA attribute changes unless there is
     // an ARIA role set for the element
     // XXX: we should check the role map to see if the changed property is
     // relevant for that particular role.
     return;
   }
 
   // The following ARIA attributes only take affect when dynamic content role is present
-  if (aAttribute == nsAccessibilityAtoms::aria_checked ||
-      aAttribute == nsAccessibilityAtoms::aria_pressed) {
-    const PRUint32 kState = (aAttribute == nsAccessibilityAtoms::aria_checked) ?
+  if (aAttribute == nsGkAtoms::aria_checked ||
+      aAttribute == nsGkAtoms::aria_pressed) {
+    const PRUint32 kState = (aAttribute == nsGkAtoms::aria_checked) ?
                             states::CHECKED : states::PRESSED;
     nsRefPtr<AccEvent> event = new AccStateChangeEvent(aContent, kState);
     FireDelayedAccessibleEvent(event);
 
     nsAccessible* accessible = event->GetAccessible();
     if (accessible) {
-      bool wasMixed = (mARIAAttrOldValue == nsAccessibilityAtoms::mixed);
+      bool wasMixed = (mARIAAttrOldValue == nsGkAtoms::mixed);
       bool isMixed = aContent->AttrValueIs(kNameSpaceID_None, aAttribute,
-                                           nsAccessibilityAtoms::mixed, eCaseMatters);
+                                           nsGkAtoms::mixed, eCaseMatters);
       if (isMixed != wasMixed) {
         nsRefPtr<AccEvent> event =
           new AccStateChangeEvent(aContent, states::MIXED, isMixed);
         FireDelayedAccessibleEvent(event);
       }
     }
     return;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::aria_readonly) {
+  if (aAttribute == nsGkAtoms::aria_readonly) {
     nsRefPtr<AccEvent> event =
       new AccStateChangeEvent(aContent, states::READONLY);
     FireDelayedAccessibleEvent(event);
     return;
   }
 
   // Fire value change event whenever aria-valuetext is changed, or
   // when aria-valuenow is changed and aria-valuetext is empty
-  if (aAttribute == nsAccessibilityAtoms::aria_valuetext ||      
-      (aAttribute == nsAccessibilityAtoms::aria_valuenow &&
-       (!aContent->HasAttr(kNameSpaceID_None,
-           nsAccessibilityAtoms::aria_valuetext) ||
-        aContent->AttrValueIs(kNameSpaceID_None,
-            nsAccessibilityAtoms::aria_valuetext, nsAccessibilityAtoms::_empty,
-            eCaseMatters)))) {
+  if (aAttribute == nsGkAtoms::aria_valuetext ||
+      (aAttribute == nsGkAtoms::aria_valuenow &&
+       (!aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_valuetext) ||
+        aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_valuetext,
+                              nsGkAtoms::_empty, eCaseMatters)))) {
     FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
                                aContent);
     return;
   }
 }
 
 void nsDocAccessible::ContentAppended(nsIDocument *aDocument,
                                       nsIContent* aContainer,
@@ -1555,26 +1552,26 @@ void
 nsDocAccessible::AddDependentIDsFor(nsAccessible* aRelProvider,
                                     nsIAtom* aRelAttr)
 {
   for (PRUint32 idx = 0; idx < kRelationAttrsLen; idx++) {
     nsIAtom* relAttr = *kRelationAttrs[idx];
     if (aRelAttr && aRelAttr != relAttr)
       continue;
 
-    if (relAttr == nsAccessibilityAtoms::_for) {
+    if (relAttr == nsGkAtoms::_for) {
       if (!aRelProvider->GetContent()->IsHTML() ||
-          aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::label &&
-          aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::output)
+          aRelProvider->GetContent()->Tag() != nsGkAtoms::label &&
+          aRelProvider->GetContent()->Tag() != nsGkAtoms::output)
         continue;
 
-    } else if (relAttr == nsAccessibilityAtoms::control) {
+    } else if (relAttr == nsGkAtoms::control) {
       if (!aRelProvider->GetContent()->IsXUL() ||
-          aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::label &&
-          aRelProvider->GetContent()->Tag() != nsAccessibilityAtoms::description)
+          aRelProvider->GetContent()->Tag() != nsGkAtoms::label &&
+          aRelProvider->GetContent()->Tag() != nsGkAtoms::description)
         continue;
     }
 
     IDRefsIterator iter(aRelProvider->GetContent(), relAttr);
     while (true) {
       const nsDependentSubstring id = iter.NextID();
       if (id.IsEmpty())
         break;
@@ -1651,49 +1648,49 @@ nsDocAccessible::RemoveDependentIDsFor(n
       break;
   }
 }
 
 bool
 nsDocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
                                               nsIAtom* aAttribute)
 {
-  if (aAttribute == nsAccessibilityAtoms::role) {
+  if (aAttribute == nsGkAtoms::role) {
     // It is common for js libraries to set the role on the body element after
     // the document has loaded. In this case we just update the role map entry.
     if (mContent == aElement) {
       SetRoleMapEntry(nsAccUtils::GetRoleMapEntry(aElement));
       return true;
     }
 
     // Recreate the accessible when role is changed because we might require a
     // different accessible class for the new role or the accessible may expose
     // a different sets of interfaces (COM restriction).
     HandleNotification<nsDocAccessible, nsIContent>
       (this, &nsDocAccessible::RecreateAccessible, aElement);
 
     return true;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::href ||
-      aAttribute == nsAccessibilityAtoms::onclick) {
+  if (aAttribute == nsGkAtoms::href ||
+      aAttribute == nsGkAtoms::onclick) {
     // Not worth the expense to ensure which namespace these are in. It doesn't
     // kill use to recreate the accessible even if the attribute was used in
     // the wrong namespace or an element that doesn't support it.
 
     // Recreate accessible asynchronously to allow the content to handle
     // the attribute change.
     mNotificationController->ScheduleNotification<nsDocAccessible, nsIContent>
       (this, &nsDocAccessible::RecreateAccessible, aElement);
 
     return true;
   }
 
-  if (aAttribute == nsAccessibilityAtoms::aria_multiselectable &&
-      aElement->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
+  if (aAttribute == nsGkAtoms::aria_multiselectable &&
+      aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
     // This affects whether the accessible supports SelectAccessible.
     // COM says we cannot change what interfaces are supported on-the-fly,
     // so invalidate this object. A new one will be created on demand.
     HandleNotification<nsDocAccessible, nsIContent>
       (this, &nsDocAccessible::RecreateAccessible, aElement);
 
     return true;
   }
--- a/accessible/src/base/nsEventShell.cpp
+++ b/accessible/src/base/nsEventShell.cpp
@@ -79,17 +79,17 @@ nsEventShell::FireEvent(PRUint32 aEventT
 
 void 
 nsEventShell::GetEventAttributes(nsINode *aNode,
                                  nsIPersistentProperties *aAttributes)
 {
   if (aNode != sEventTargetNode)
     return;
 
-  nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::eventFromInput,
+  nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::eventFromInput,
                          sEventFromUserInput ? NS_LITERAL_STRING("true") :
                                                NS_LITERAL_STRING("false"));
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsEventShell: private
 
 PRBool nsEventShell::sEventFromUserInput = PR_FALSE;
--- a/accessible/src/base/nsFormControlAccessible.cpp
+++ b/accessible/src/base/nsFormControlAccessible.cpp
@@ -111,17 +111,17 @@ template<int Max>
 NS_IMETHODIMP
 ProgressMeterAccessible<Max>::GetMaximumValue(double* aMaximumValue)
 {
   nsresult rv = nsFormControlAccessible::GetMaximumValue(aMaximumValue);
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   nsAutoString value;
-  if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::max, value)) {
+  if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::max, value)) {
     PRInt32 result = NS_OK;
     *aMaximumValue = value.ToDouble(&result);
     return result;
   }
 
   *aMaximumValue = Max;
   return NS_OK;
 }
@@ -154,17 +154,17 @@ template<int Max>
 NS_IMETHODIMP
 ProgressMeterAccessible<Max>::GetCurrentValue(double* aCurrentValue)
 {
   nsresult rv = nsFormControlAccessible::GetCurrentValue(aCurrentValue);
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   nsAutoString attrValue;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, attrValue);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value, attrValue);
 
   // Return zero value if there is no attribute or its value is empty.
   if (attrValue.IsEmpty())
     return NS_OK;
 
   PRInt32 error = NS_OK;
   double value = attrValue.ToDouble(&error);
   if (NS_FAILED(error))
--- a/accessible/src/base/nsRootAccessible.cpp
+++ b/accessible/src/base/nsRootAccessible.cpp
@@ -325,17 +325,17 @@ nsRootAccessible::FireAccessibleFocusEve
   // Check for aria-activedescendant, which changes which element has focus.
   // For activedescendant, the ARIA spec does not require that the user agent
   // checks whether pointed node is actually a DOM descendant of the element
   // with the aria-activedescendant attribute.
   nsIContent* content = focusAccessible->GetContent();
   if (content) {
     nsAutoString id;
     if (content->GetAttr(kNameSpaceID_None,
-                         nsAccessibilityAtoms::aria_activedescendant, id)) {
+                         nsGkAtoms::aria_activedescendant, id)) {
       nsIDocument* DOMDoc = content->GetOwnerDoc();
       nsIContent* activeDescendantContent = DOMDoc->GetElementById(id);
 
       // If aria-activedescendant is set to nonexistant ID, then treat as focus
       // on the activedescendant container (which has real DOM focus).
       if (activeDescendantContent) {
         nsAccessible* activeDescendant = 
           GetAccService()->GetAccessible(activeDescendantContent);
@@ -514,18 +514,18 @@ nsRootAccessible::ProcessDOMEvent(nsIDOM
   nsINode* targetNode = accessible->GetNode();
   nsIContent* targetContent = targetNode->IsElement() ?
     targetNode->AsElement() : nsnull;
   nsIContent* origTargetContent = origTargetNode->IsElement() ?
     origTargetNode->AsElement() : nsnull;
 
 #ifdef MOZ_XUL
   PRBool isTree = targetContent ?
-    targetContent->NodeInfo()->Equals(nsAccessibilityAtoms::tree,
-                                      kNameSpaceID_XUL) : PR_FALSE;
+    targetContent->NodeInfo()->Equals(nsGkAtoms::tree, kNameSpaceID_XUL) :
+    PR_FALSE;
 
   if (isTree) {
     nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(accessible);
     NS_ASSERTION(treeAcc,
                  "Accessible for xul:tree isn't nsXULTreeAccessible.");
 
     if (treeAcc) {
       if (eventType.EqualsLiteral("TreeViewChanged")) {
--- a/accessible/src/base/nsTextAttrs.cpp
+++ b/accessible/src/base/nsTextAttrs.cpp
@@ -65,22 +65,22 @@ struct nsCSSTextAttrMapItem
  * The map of CSS properties to text attributes.
  */
 const char* const kAnyValue = nsnull;
 const char* const kCopyValue = nsnull;
 
 static nsCSSTextAttrMapItem gCSSTextAttrsMap[] =
 {
   // CSS name            CSS value        Attribute name                                Attribute value
-  { "color",             kAnyValue,       &nsAccessibilityAtoms::color,                 kCopyValue },
-  { "font-family",       kAnyValue,       &nsAccessibilityAtoms::fontFamily,            kCopyValue },
-  { "font-style",        kAnyValue,       &nsAccessibilityAtoms::fontStyle,             kCopyValue },
-  { "text-decoration",   "line-through",  &nsAccessibilityAtoms::textLineThroughStyle,  "solid" },
-  { "text-decoration",   "underline",     &nsAccessibilityAtoms::textUnderlineStyle,    "solid" },
-  { "vertical-align",    kAnyValue,       &nsAccessibilityAtoms::textPosition,          kCopyValue }
+  { "color",             kAnyValue,       &nsGkAtoms::color,                 kCopyValue },
+  { "font-family",       kAnyValue,       &nsGkAtoms::font_family,            kCopyValue },
+  { "font-style",        kAnyValue,       &nsGkAtoms::font_style,             kCopyValue },
+  { "text-decoration",   "line-through",  &nsGkAtoms::textLineThroughStyle,  "solid" },
+  { "text-decoration",   "underline",     &nsGkAtoms::textUnderlineStyle,    "solid" },
+  { "vertical-align",    kAnyValue,       &nsGkAtoms::textPosition,          kCopyValue }
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsTextAttrs
 
 nsTextAttrsMgr::nsTextAttrsMgr(nsHyperTextAccessible *aHyperTextAcc,
                                PRBool aIncludeDefAttrs,
                                nsAccessible *aOffsetAcc,
@@ -320,17 +320,17 @@ nsCSSTextAttr::nsCSSTextAttr(PRUint32 aI
 {
   mIsRootDefined = GetValueFor(aRootContent, &mRootNativeValue);
 
   if (aContent)
     mIsDefined = GetValueFor(aContent, &mNativeValue);
 }
 
 nsIAtom*
-nsCSSTextAttr::GetName()
+nsCSSTextAttr::GetName() const
 {
   return *gCSSTextAttrsMap[mIndex].mAttrName;
 }
 
 PRBool
 nsCSSTextAttr::GetValueFor(nsIContent *aContent, nsAutoString *aValue)
 {
   nsCOMPtr<nsIDOMCSSStyleDeclaration> currStyleDecl =
--- a/accessible/src/base/nsTextAttrs.h
+++ b/accessible/src/base/nsTextAttrs.h
@@ -36,17 +36,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsTextAttrs_h_
 #define nsTextAttrs_h_
 
 class nsHyperTextAccessible;
 
-#include "nsAccessibilityAtoms.h"
 
 #include "nsIDOMNode.h"
 #include "nsIDOMElement.h"
 
 #include "nsIContent.h"
 #include "nsIFrame.h"
 #include "nsIPersistentProperties2.h"
 
@@ -131,17 +130,17 @@ private:
  * Interface class of text attribute class implementations.
  */
 class nsITextAttr
 {
 public:
   /**
    * Return the name of text attribute.
    */
-  virtual nsIAtom* GetName() = 0;
+  virtual nsIAtom* GetName() const = 0;
 
   /**
    * Retrieve the value of text attribute in out param, return true if differs
    * from the default value of text attribute or if include default attribute
    * value flag is setted.
    * 
    * @param aValue                [in, out] the value of text attribute
    * @param aIncludeDefAttrValue  [in] include default attribute value flag
@@ -242,17 +241,17 @@ protected:
  */
 class nsLangTextAttr : public nsTextAttr<nsAutoString>
 {
 public:
   nsLangTextAttr(nsHyperTextAccessible *aRootAcc, nsIContent *aRootContent,
                  nsIContent *aContent);
 
   // nsITextAttr
-  virtual nsIAtom *GetName() { return nsAccessibilityAtoms::language; }
+  virtual nsIAtom *GetName() const { return nsGkAtoms::language; }
 
 protected:
 
   // nsTextAttr
   virtual PRBool GetValueFor(nsIContent *aElm, nsAutoString *aValue);
   virtual void Format(const nsAutoString& aValue, nsAString& aFormattedValue);
 
 private:
@@ -267,17 +266,17 @@ private:
  */
 class nsCSSTextAttr : public nsTextAttr<nsAutoString>
 {
 public:
   nsCSSTextAttr(PRUint32 aIndex, nsIContent *aRootContent,
                 nsIContent *aContent);
 
   // nsITextAttr
-  virtual nsIAtom *GetName();
+  virtual nsIAtom *GetName() const;
 
 protected:
 
   // nsTextAttr
   virtual PRBool GetValueFor(nsIContent *aContent, nsAutoString *aValue);
   virtual void Format(const nsAutoString& aValue, nsAString& aFormattedValue);
 
 private:
@@ -290,17 +289,17 @@ private:
  * nsTextAttrsMgr class.
  */
 class nsBGColorTextAttr : public nsTextAttr<nscolor>
 {
 public:
   nsBGColorTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame);
 
   // nsITextAttr
-  virtual nsIAtom *GetName() { return nsAccessibilityAtoms::backgroundColor; }
+  virtual nsIAtom *GetName() const { return nsGkAtoms::backgroundColor; }
 
 protected:
   // nsTextAttr
   virtual PRBool GetValueFor(nsIContent *aContent, nscolor *aValue);
   virtual void Format(const nscolor& aValue, nsAString& aFormattedValue);
 
 private:
   PRBool GetColor(nsIFrame *aFrame, nscolor *aColor);
@@ -313,17 +312,17 @@ private:
  * class.
  */
 class nsFontSizeTextAttr : public nsTextAttr<nscoord>
 {
 public:
   nsFontSizeTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame);
 
   // nsITextAttr
-  virtual nsIAtom *GetName() { return nsAccessibilityAtoms::fontSize; }
+  virtual nsIAtom *GetName() const { return nsGkAtoms::font_size; }
 
 protected:
 
   // nsTextAttr
   virtual PRBool GetValueFor(nsIContent *aContent, nscoord *aValue);
   virtual void Format(const nscoord& aValue, nsAString& aFormattedValue);
 
 private:
@@ -345,17 +344,17 @@ private:
  * nsTextAttrsMgr class.
  */
 class nsFontWeightTextAttr : public nsTextAttr<PRInt32>
 {
 public:
   nsFontWeightTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame);
 
   // nsITextAttr
-  virtual nsIAtom *GetName() { return nsAccessibilityAtoms::fontWeight; }
+  virtual nsIAtom *GetName() const { return nsGkAtoms::fontWeight; }
 
 protected:
 
   // nsTextAttr
   virtual PRBool GetValueFor(nsIContent *aElm, PRInt32 *aValue);
   virtual void Format(const PRInt32& aValue, nsAString& aFormattedValue);
 
 private:
--- a/accessible/src/base/nsTextEquivUtils.cpp
+++ b/accessible/src/base/nsTextEquivUtils.cpp
@@ -188,17 +188,17 @@ nsTextEquivUtils::AppendTextEquivFromTex
         aString->Append(PRUnichar(' '));
       }
     }
     
     return NS_OK;
   }
   
   if (aContent->IsHTML() &&
-      aContent->NodeInfo()->Equals(nsAccessibilityAtoms::br)) {
+      aContent->NodeInfo()->Equals(nsGkAtoms::br)) {
     aString->AppendLiteral("\r\n");
     return NS_OK;
   }
   
   return NS_OK_NO_NAME_CLAUSE_HANDLED;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -355,24 +355,24 @@ nsTextEquivUtils::AppendFromDOMNode(nsIC
   if (aContent->IsXUL()) {
     nsAutoString textEquivalent;
     nsCOMPtr<nsIDOMXULLabeledControlElement> labeledEl =
       do_QueryInterface(aContent);
 
     if (labeledEl) {
       labeledEl->GetLabel(textEquivalent);
     } else {
-      if (aContent->NodeInfo()->Equals(nsAccessibilityAtoms::label,
+      if (aContent->NodeInfo()->Equals(nsGkAtoms::label,
                                        kNameSpaceID_XUL))
-        aContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value,
+        aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value,
                           textEquivalent);
 
       if (textEquivalent.IsEmpty())
         aContent->GetAttr(kNameSpaceID_None,
-                          nsAccessibilityAtoms::tooltiptext, textEquivalent);
+                          nsGkAtoms::tooltiptext, textEquivalent);
     }
 
     AppendString(aString, textEquivalent);
   }
 
   return AppendFromDOMChildren(aContent, aString);
 }
 
--- a/accessible/src/html/nsHTMLFormControlAccessible.cpp
+++ b/accessible/src/html/nsHTMLFormControlAccessible.cpp
@@ -35,17 +35,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsHTMLFormControlAccessible.h"
 
 #include "Relation.h"
 #include "States.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsAccUtils.h"
 #include "nsTextEquivUtils.h"
 
 #include "nsIAccessibleRelation.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMHTMLInputElement.h"
 #include "nsIDOMNSHTMLElement.h"
 #include "nsIDOMNSEditableElement.h"
@@ -175,19 +174,19 @@ nsHTMLRadioButtonAccessible::GetPosition
                                                         PRInt32 *aSetSize)
 {
   nsAutoString nsURI;
   mContent->NodeInfo()->GetNamespaceURI(nsURI);
   nsAutoString tagName;
   mContent->NodeInfo()->GetName(tagName);
 
   nsAutoString type;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::type, type);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type);
   nsAutoString name;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::name, name);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
 
   nsCOMPtr<nsIDOMNodeList> inputs;
 
   nsCOMPtr<nsIDOMHTMLInputElement> radio(do_QueryInterface(mContent));
   nsCOMPtr<nsIDOMHTMLFormElement> form;
   radio->GetForm(getter_AddRefs(form));
   if (form) {
     form->GetElementsByTagNameNS(nsURI, tagName, getter_AddRefs(inputs));
@@ -208,19 +207,19 @@ nsHTMLRadioButtonAccessible::GetPosition
   PRInt32 count = 0;
 
   for (PRUint32 index = 0; index < inputsCount; index++) {
     nsCOMPtr<nsIDOMNode> itemNode;
     inputs->Item(index, getter_AddRefs(itemNode));
 
     nsCOMPtr<nsIContent> item(do_QueryInterface(itemNode));
     if (item &&
-        item->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
+        item->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
                           type, eCaseMatters) &&
-        item->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::name,
+        item->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
                           name, eCaseMatters)) {
 
       count++;
 
       if (item == mContent)
         indexOf = count;
     }
   }
@@ -264,18 +263,18 @@ nsHTMLButtonAccessible::DoAction(PRUint8
   return NS_OK;
 }
 
 PRUint64
 nsHTMLButtonAccessible::NativeState()
 {
   PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
 
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::submit, eIgnoreCase))
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::submit, eIgnoreCase))
     state |= states::DEFAULT;
 
   return state;
 }
 
 PRUint32
 nsHTMLButtonAccessible::NativeRole()
 {
@@ -286,33 +285,32 @@ nsresult
 nsHTMLButtonAccessible::GetNameInternal(nsAString& aName)
 {
   nsAccessible::GetNameInternal(aName);
   if (!aName.IsEmpty())
     return NS_OK;
 
   // No name from HTML or ARIA
   nsAutoString name;
-  if (!mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value,
+  if (!mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value,
                          name) &&
-      !mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt,
+      !mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt,
                          name)) {
     // Use the button's (default) label if nothing else works
     nsIFrame* frame = GetFrame();
     if (frame) {
       nsIFormControlFrame* fcFrame = do_QueryFrame(frame);
       if (fcFrame)
-        fcFrame->GetFormProperty(nsAccessibilityAtoms::defaultLabel, name);
+        fcFrame->GetFormProperty(nsGkAtoms::defaultLabel, name);
     }
   }
 
   if (name.IsEmpty() &&
-      !mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::src,
-                         name)) {
-    mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::data, name);
+      !mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, name)) {
+    mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::data, name);
   }
 
   name.CompressWhitespace();
   aName = name;
 
   return NS_OK;
 }
 
@@ -360,18 +358,18 @@ nsHTML4ButtonAccessible::NativeRole()
 
 PRUint64
 nsHTML4ButtonAccessible::NativeState()
 {
   PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
 
   state |= states::FOCUSABLE;
 
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::submit, eIgnoreCase))
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::submit, eIgnoreCase))
     state |= states::DEFAULT;
 
   return state;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLTextFieldAccessible
@@ -383,18 +381,18 @@ nsHTMLTextFieldAccessible::
 {
 }
 
 NS_IMPL_ISUPPORTS_INHERITED3(nsHTMLTextFieldAccessible, nsAccessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText)
 
 PRUint32
 nsHTMLTextFieldAccessible::NativeRole()
 {
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::password, eIgnoreCase)) {
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::password, eIgnoreCase)) {
     return nsIAccessibleRole::ROLE_PASSWORD_TEXT;
   }
   return nsIAccessibleRole::ROLE_ENTRY;
 }
 
 nsresult
 nsHTMLTextFieldAccessible::GetNameInternal(nsAString& aName)
 {
@@ -415,17 +413,17 @@ nsHTMLTextFieldAccessible::GetNameIntern
     if (parent)
       parent->GetName(aName);
   }
 
   if (!aName.IsEmpty())
     return NS_OK;
 
   // text inputs and textareas might have useful placeholder text
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::placeholder, aName);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::placeholder, aName);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsHTMLTextFieldAccessible::GetValue(nsAString& _retval)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
@@ -456,27 +454,27 @@ nsHTMLTextFieldAccessible::ApplyARIAStat
 }
 
 PRUint64
 nsHTMLTextFieldAccessible::NativeState()
 {
   PRUint64 state = nsHyperTextAccessibleWrap::NativeState();
 
   // can be focusable, focused, protected. readonly, unavailable, selected
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::password, eIgnoreCase)) {
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::password, eIgnoreCase)) {
     state |= states::PROTECTED;
   }
   else {
     nsAccessible* parent = Parent();
     if (parent && parent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
       state |= states::HASPOPUP;
   }
 
-  if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::readonly)) {
+  if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::readonly)) {
     state |= states::READONLY;
   }
 
   nsCOMPtr<nsIDOMHTMLInputElement> htmlInput(do_QueryInterface(mContent));
   // Is it an <input> or a <textarea> ?
   if (htmlInput) {
     state |= states::SINGLE_LINE;
   }
@@ -484,42 +482,42 @@ nsHTMLTextFieldAccessible::NativeState()
     state |= states::MULTI_LINE;
   }
 
   if (!(state & states::EDITABLE))
     return state;
 
   nsCOMPtr<nsIContent> bindingContent = mContent->GetBindingParent();
   if (bindingContent &&
-      bindingContent->NodeInfo()->Equals(nsAccessibilityAtoms::textbox,
+      bindingContent->NodeInfo()->Equals(nsGkAtoms::textbox,
                                          kNameSpaceID_XUL)) {
-     if (bindingContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                                     nsAccessibilityAtoms::autocomplete,
+     if (bindingContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                                     nsGkAtoms::autocomplete,
                                      eIgnoreCase)) {
        // If parent is XUL textbox and value of @type attribute is "autocomplete",
        // then this accessible supports autocompletion.
        state |= states::SUPPORTS_AUTOCOMPLETION;
      }
   } else if (gIsFormFillEnabled && htmlInput && !(state & states::PROTECTED)) {
     // Check to see if autocompletion is allowed on this input. We don't expose
     // it for password fields even though the entire password can be remembered
     // for a page if the user asks it to be. However, the kind of autocomplete
     // we're talking here is based on what the user types, where a popup of
     // possible choices comes up.
     nsAutoString autocomplete;
-    mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::autocomplete,
+    mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::autocomplete,
                       autocomplete);
 
     if (!autocomplete.LowerCaseEqualsLiteral("off")) {
       nsCOMPtr<nsIDOMHTMLFormElement> form;
       htmlInput->GetForm(getter_AddRefs(form));
       nsCOMPtr<nsIContent> formContent(do_QueryInterface(form));
       if (formContent) {
         formContent->GetAttr(kNameSpaceID_None,
-                             nsAccessibilityAtoms::autocomplete, autocomplete);
+                             nsGkAtoms::autocomplete, autocomplete);
       }
 
       if (!formContent || !autocomplete.LowerCaseEqualsLiteral("off"))
         state |= states::SUPPORTS_AUTOCOMPLETION;
     }
   }
 
   return state;
@@ -593,17 +591,17 @@ nsHTMLGroupboxAccessible::NativeRole()
   return nsIAccessibleRole::ROLE_GROUPING;
 }
 
 nsIContent* nsHTMLGroupboxAccessible::GetLegend()
 {
   nsresult count = 0;
   nsIContent *legendContent = nsnull;
   while ((legendContent = mContent->GetChildAt(count++)) != nsnull) {
-    if (legendContent->NodeInfo()->Equals(nsAccessibilityAtoms::legend,
+    if (legendContent->NodeInfo()->Equals(nsGkAtoms::legend,
                                           mContent->GetNameSpaceID())) {
       // Either XHTML namespace or no namespace
       return legendContent;
     }
   }
 
   return nsnull;
 }
--- a/accessible/src/html/nsHTMLImageAccessible.cpp
+++ b/accessible/src/html/nsHTMLImageAccessible.cpp
@@ -34,17 +34,16 @@
  * 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 "nsHTMLImageAccessible.h"
 
 #include "States.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsAccUtils.h"
 
 #include "imgIContainer.h"
 #include "imgIRequest.h"
 #include "nsIDocument.h"
 #include "nsIImageLoadingContent.h"
 #include "nsILink.h"
 #include "nsIPresShell.h"
@@ -99,17 +98,17 @@ nsHTMLImageAccessible::NativeState()
 
   return state;
 }
 
 nsresult
 nsHTMLImageAccessible::GetNameInternal(nsAString& aName)
 {
   PRBool hasAltAttrib =
-    mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt, aName);
+    mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt, aName);
   if (!aName.IsEmpty())
     return NS_OK;
 
   nsresult rv = nsAccessible::GetNameInternal(aName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (aName.IsEmpty() && hasAltAttrib) {
     // No accessible name but empty 'alt' attribute is present. If further name
@@ -207,33 +206,33 @@ nsHTMLImageAccessible::GetAttributesInte
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
   
   nsresult rv = nsLinkableAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString src;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::src, src);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, src);
   if (!src.IsEmpty())
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::src, src);
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::src, src);
 
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Private methods
 
 PRBool
 nsHTMLImageAccessible::HasLongDesc()
 {
   if (IsDefunct())
     return PR_FALSE;
 
-  return mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::longDesc);
+  return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::longdesc);
 }
 
 PRBool
 nsHTMLImageAccessible::IsValidLongDescIndex(PRUint8 aIndex)
 {
   if (!HasLongDesc())
     return PR_FALSE;
 
--- a/accessible/src/html/nsHTMLImageMapAccessible.cpp
+++ b/accessible/src/html/nsHTMLImageMapAccessible.cpp
@@ -155,20 +155,18 @@ nsresult
 nsHTMLAreaAccessible::GetNameInternal(nsAString & aName)
 {
   nsresult rv = nsAccessible::GetNameInternal(aName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!aName.IsEmpty())
     return NS_OK;
 
-  if (!mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt,
-                         aName)) {
+  if (!mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt, aName))
     return GetValue(aName);
-  }
 
   return NS_OK;
 }
 
 void
 nsHTMLAreaAccessible::Description(nsString& aDescription)
 {
   aDescription.Truncate();
--- a/accessible/src/html/nsHTMLLinkAccessible.cpp
+++ b/accessible/src/html/nsHTMLLinkAccessible.cpp
@@ -72,17 +72,17 @@ nsHTMLLinkAccessible::NativeRole()
 
 PRUint64
 nsHTMLLinkAccessible::NativeState()
 {
   PRUint64 states = nsHyperTextAccessibleWrap::NativeState();
 
   states  &= ~states::READONLY;
 
-  if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::name)) {
+  if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::name)) {
     // This is how we indicate it is a named anchor
     // In other words, this anchor can be selected as a location :)
     // There is no other better state to use to indicate this.
     states |= states::SELECTABLE;
   }
 
   nsEventStates state = mContent->AsElement()->State();
   if (state.HasAtLeastOneOfStates(NS_EVENT_STATE_VISITED |
--- a/accessible/src/html/nsHTMLSelectAccessible.cpp
+++ b/accessible/src/html/nsHTMLSelectAccessible.cpp
@@ -84,17 +84,17 @@ nsHTMLSelectListAccessible::NativeState(
     // Treat first focusable option node as actual focus, in order
     // to avoid confusing JAWS, which needs focus on the option
     nsCOMPtr<nsIContent> focusedOption =
       nsHTMLSelectOptionAccessible::GetFocusedOption(mContent);
     if (focusedOption) { // Clear focused state since it is on option
       state &= ~states::FOCUSED;
     }
   }
-  if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::multiple))
+  if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::multiple))
     state |= states::MULTISELECTABLE | states::EXTSELECTABLE;
 
   return state;
 }
 
 PRUint32
 nsHTMLSelectListAccessible::NativeRole()
 {
@@ -111,24 +111,24 @@ bool
 nsHTMLSelectListAccessible::IsSelect()
 {
   return true;
 }
 
 bool
 nsHTMLSelectListAccessible::SelectAll()
 {
-  return mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::multiple) ?
+  return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::multiple) ?
            nsAccessibleWrap::SelectAll() : false;
 }
 
 bool
 nsHTMLSelectListAccessible::UnselectAll()
 {
-  return mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::multiple) ?
+  return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::multiple) ?
            nsAccessibleWrap::UnselectAll() : false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLSelectListAccessible: nsAccessible protected
 
 void
 nsHTMLSelectListAccessible::CacheChildren()
@@ -150,28 +150,28 @@ nsHTMLSelectListAccessible::CacheOptSibl
   PRUint32 numChildren = aParentContent->GetChildCount();
   for (PRUint32 count = 0; count < numChildren; count ++) {
     nsIContent *childContent = aParentContent->GetChildAt(count);
     if (!childContent->IsHTML()) {
       continue;
     }
 
     nsCOMPtr<nsIAtom> tag = childContent->Tag();
-    if (tag == nsAccessibilityAtoms::option ||
-        tag == nsAccessibilityAtoms::optgroup) {
+    if (tag == nsGkAtoms::option ||
+        tag == nsGkAtoms::optgroup) {
 
       // Get an accessible for option or optgroup and cache it.
       nsRefPtr<nsAccessible> accessible =
         GetAccService()->GetOrCreateAccessible(childContent, presShell,
                                                mWeakShell);
       if (accessible)
         AppendChild(accessible);
 
       // Deep down into optgroup element.
-      if (tag == nsAccessibilityAtoms::optgroup)
+      if (tag == nsGkAtoms::optgroup)
         CacheOptSiblings(childContent);
     }
   }
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLSelectOptionAccessible
@@ -195,17 +195,17 @@ nsHTMLSelectOptionAccessible::NativeRole
   return nsIAccessibleRole::ROLE_OPTION;
 }
 
 nsresult
 nsHTMLSelectOptionAccessible::GetNameInternal(nsAString& aName)
 {
   // CASE #1 -- great majority of the cases
   // find the label attribute - this is what the W3C says we should use
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
   if (!aName.IsEmpty())
     return NS_OK;
 
   // CASE #2 -- no label parameter, get the first child, 
   // use it if it is a text node
   nsIContent *text = mContent->GetChildAt(0);
   if (!text)
     return NS_OK;
@@ -318,17 +318,17 @@ nsHTMLSelectOptionAccessible::NativeStat
 }
 
 PRInt32
 nsHTMLSelectOptionAccessible::GetLevelInternal()
 {
   nsIContent *parentContent = mContent->GetParent();
 
   PRInt32 level =
-    parentContent->NodeInfo()->Equals(nsAccessibilityAtoms::optgroup) ? 2 : 1;
+    parentContent->NodeInfo()->Equals(nsGkAtoms::optgroup) ? 2 : 1;
 
   if (level == 1 && Role() != nsIAccessibleRole::ROLE_HEADING)
     level = 0; // In a single level list, the level is irrelevant
 
   return level;
 }
 
 void
@@ -512,17 +512,17 @@ nsHTMLSelectOptionAccessible::GetFocused
 
   return nsnull;
 }
 
 void
 nsHTMLSelectOptionAccessible::SelectionChangedIfOption(nsIContent *aPossibleOptionNode)
 {
   if (!aPossibleOptionNode ||
-      aPossibleOptionNode->Tag() != nsAccessibilityAtoms::option ||
+      aPossibleOptionNode->Tag() != nsGkAtoms::option ||
       !aPossibleOptionNode->IsHTML()) {
     return;
   }
 
   nsAccessible *multiSelect =
     nsAccUtils::GetMultiSelectableContainer(aPossibleOptionNode);
   if (!multiSelect)
     return;
@@ -559,17 +559,17 @@ nsHTMLSelectOptionAccessible::SelectionC
 // nsHTMLSelectOptionAccessible: private methods
 
 nsIContent*
 nsHTMLSelectOptionAccessible::GetSelectState(PRUint64* aState)
 {
   *aState = 0;
 
   nsIContent *content = mContent;
-  while (content && content->Tag() != nsAccessibilityAtoms::select) {
+  while (content && content->Tag() != nsGkAtoms::select) {
     content = content->GetParent();
   }
 
   if (content) {
     nsAccessible* selAcc = GetAccService()->GetAccessible(content);
     if (selAcc) {
       *aState = selAcc->State();
       return content;
--- a/accessible/src/html/nsHTMLSelectAccessible.h
+++ b/accessible/src/html/nsHTMLSelectAccessible.h
@@ -34,17 +34,16 @@
  * 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 __nsHTMLSelectAccessible_h__
 #define __nsHTMLSelectAccessible_h__
 
-#include "nsAccessibilityAtoms.h"
 #include "nsHTMLFormControlAccessible.h"
 #include "nsIDOMHTMLOptionsCollection.h"
 #include "nsIDOMHTMLOptionElement.h"
 #include "nsIDOMNode.h"
 
 class nsIMutableArray;
 
 /**
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -133,18 +133,17 @@ nsHTMLTableCellAccessible::GetAttributes
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 idx = -1;
   rv = tableAcc->GetCellIndexAt(rowIdx, colIdx, &idx);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString stringIdx;
   stringIdx.AppendInt(idx);
-  nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
-                         stringIdx);
+  nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex, stringIdx);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLTableCellAccessible: nsIAccessibleTableCell implementation
 
 NS_IMETHODIMP
 nsHTMLTableCellAccessible::GetTable(nsIAccessibleTable **aTable)
@@ -305,17 +304,17 @@ nsHTMLTableCellAccessible::GetCellIndexe
   return cellLayout->GetCellIndexes(aRowIndex, aColIndex);
 }
 
 nsresult
 nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
                                           nsIArray **aHeaderCells)
 {
   // Get header cells from @header attribute.
-  IDRefsIterator iter(mContent, nsAccessibilityAtoms::headers);
+  IDRefsIterator iter(mContent, nsGkAtoms::headers);
   nsIContent* headerCellElm = iter.NextElem();
   if (headerCellElm) {
     nsresult rv = NS_OK;
     nsCOMPtr<nsIMutableArray> headerCells =
       do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     PRUint32 desiredRole = -1;
     if (aRowOrColumnHeaderCell == nsAccUtils::eRowHeaderCells)
@@ -361,19 +360,19 @@ nsHTMLTableHeaderCellAccessible::
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLTableHeaderAccessible: nsAccessible implementation
 
 PRUint32
 nsHTMLTableHeaderCellAccessible::NativeRole()
 {
   // Check value of @scope attribute.
   static nsIContent::AttrValuesArray scopeValues[] =
-    {&nsAccessibilityAtoms::col, &nsAccessibilityAtoms::row, nsnull};
+    {&nsGkAtoms::col, &nsGkAtoms::row, nsnull};
   PRInt32 valueIdx = 
-    mContent->FindAttrValueIn(kNameSpaceID_None, nsAccessibilityAtoms::scope,
+    mContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::scope,
                               scopeValues, eCaseMatters);
 
   switch (valueIdx) {
     case 0:
       return nsIAccessibleRole::ROLE_COLUMNHEADER;
     case 1:
       return nsIAccessibleRole::ROLE_ROWHEADER;
   }
@@ -478,17 +477,17 @@ nsHTMLTableAccessible::GetNameInternal(n
     if (captionContent) {
       nsTextEquivUtils::AppendTextEquivFromContent(this, captionContent, &aName);
       if (!aName.IsEmpty())
         return NS_OK;
     }
   }
 
   // If no caption then use summary as a name.
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::summary, aName);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::summary, aName);
   return NS_OK;
 }
 
 nsresult
 nsHTMLTableAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   nsresult rv = nsAccessibleWrap::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -1278,17 +1277,17 @@ nsHTMLTableAccessible::Description(nsStr
   if (caption) {
     nsIContent* captionContent = caption->GetContent();
     if (captionContent) {
       nsAutoString captionText;
       nsTextEquivUtils::AppendTextEquivFromContent(this, captionContent,
                                                    &captionText);
 
       if (!captionText.IsEmpty()) { // summary isn't used as a name.
-        mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::summary,
+        mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::summary,
                           aDescription);
       }
     }
   }
 
 #ifdef SHOW_LAYOUT_HEURISTIC
   if (aDescription.IsEmpty()) {
     PRBool isProbablyForLayout;
@@ -1376,26 +1375,26 @@ nsHTMLTableAccessible::IsProbablyForLayo
 
   // Check to see if an ARIA role overrides the role from native markup,
   // but for which we still expose table semantics (treegrid, for example).
   PRBool hasNonTableRole = (Role() != nsIAccessibleRole::ROLE_TABLE);
   if (hasNonTableRole) {
     RETURN_LAYOUT_ANSWER(PR_FALSE, "Has role attribute");
   }
 
-  if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) {
+  if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
     // Role attribute is present, but overridden roles have already been dealt with.
     // Only landmarks and other roles that don't override the role from native
     // markup are left to deal with here.
     RETURN_LAYOUT_ANSWER(PR_FALSE, "Has role attribute, weak role, and role is table");
   }
   
   // Check for legitimate data table elements or attributes
   nsAutoString summary;
-  if ((mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::summary, summary) &&
+  if ((mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::summary, summary) &&
        !summary.IsEmpty()) || 
       HasDescendant(NS_LITERAL_STRING("caption"), PR_FALSE) ||
       HasDescendant(NS_LITERAL_STRING("th")) ||
       HasDescendant(NS_LITERAL_STRING("thead")) ||
       HasDescendant(NS_LITERAL_STRING("tfoot")) ||
       HasDescendant(NS_LITERAL_STRING("colgroup"))) {
     RETURN_LAYOUT_ANSWER(PR_FALSE, "Has caption, summary, th, thead, tfoot or colgroup -- legitimate table structures");
   }
--- a/accessible/src/html/nsHTMLTextAccessible.cpp
+++ b/accessible/src/html/nsHTMLTextAccessible.cpp
@@ -199,34 +199,34 @@ nsHTMLOutputAccessible::
 
 NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLOutputAccessible, nsHyperTextAccessible)
 
 Relation
 nsHTMLOutputAccessible::RelationByType(PRUint32 aType)
 {
   Relation rel = nsAccessibleWrap::RelationByType(aType);
   if (aType == nsIAccessibleRelation::RELATION_CONTROLLED_BY)
-    rel.AppendIter(new IDRefsIterator(mContent, nsAccessibilityAtoms::_for));
+    rel.AppendIter(new IDRefsIterator(mContent, nsGkAtoms::_for));
 
   return rel;
 }
 
 PRUint32
 nsHTMLOutputAccessible::NativeRole()
 {
   return nsIAccessibleRole::ROLE_SECTION;
 }
 
 nsresult
 nsHTMLOutputAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes)
 {
   nsresult rv = nsAccessibleWrap::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::live,
+  nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::live,
                          NS_LITERAL_STRING("polite"));
   
   return NS_OK;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLLIAccessible
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -35,17 +35,16 @@
  * 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 "nsHyperTextAccessible.h"
 
 #include "States.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
 #include "nsTextAttrs.h"
 
 #include "nsIClipboard.h"
 #include "nsContentCID.h"
 #include "nsIDOMCharacterData.h"
 #include "nsIDOMDocument.h"
@@ -124,49 +123,49 @@ nsresult nsHyperTextAccessible::QueryInt
   return nsAccessible::QueryInterface(aIID, aInstancePtr);
 }
 
 PRUint32
 nsHyperTextAccessible::NativeRole()
 {
   nsIAtom *tag = mContent->Tag();
 
-  if (tag == nsAccessibilityAtoms::form)
+  if (tag == nsGkAtoms::form)
     return nsIAccessibleRole::ROLE_FORM;
 
-  if (tag == nsAccessibilityAtoms::blockquote ||
-      tag == nsAccessibilityAtoms::div ||
-      tag == nsAccessibilityAtoms::nav)
+  if (tag == nsGkAtoms::blockquote ||
+      tag == nsGkAtoms::div ||
+      tag == nsGkAtoms::nav)
     return nsIAccessibleRole::ROLE_SECTION;
 
-  if (tag == nsAccessibilityAtoms::h1 ||
-      tag == nsAccessibilityAtoms::h2 ||
-      tag == nsAccessibilityAtoms::h3 ||
-      tag == nsAccessibilityAtoms::h4 ||
-      tag == nsAccessibilityAtoms::h5 ||
-      tag == nsAccessibilityAtoms::h6)
+  if (tag == nsGkAtoms::h1 ||
+      tag == nsGkAtoms::h2 ||
+      tag == nsGkAtoms::h3 ||
+      tag == nsGkAtoms::h4 ||
+      tag == nsGkAtoms::h5 ||
+      tag == nsGkAtoms::h6)
     return nsIAccessibleRole::ROLE_HEADING;
 
-  if (tag == nsAccessibilityAtoms::article)
+  if (tag == nsGkAtoms::article)
     return nsIAccessibleRole::ROLE_DOCUMENT;
         
   // Deal with html landmark elements
-  if (tag == nsAccessibilityAtoms::header)
+  if (tag == nsGkAtoms::header)
     return nsIAccessibleRole::ROLE_HEADER;
 
-  if (tag == nsAccessibilityAtoms::footer)
+  if (tag == nsGkAtoms::footer)
     return nsIAccessibleRole::ROLE_FOOTER;
 
-  if (tag == nsAccessibilityAtoms::aside)
+  if (tag == nsGkAtoms::aside)
     return nsIAccessibleRole::ROLE_NOTE;
 
   // Treat block frames as paragraphs
   nsIFrame *frame = GetFrame();
-  if (frame && frame->GetType() == nsAccessibilityAtoms::blockFrame &&
-      frame->GetContent()->Tag() != nsAccessibilityAtoms::input) {
+  if (frame && frame->GetType() == nsGkAtoms::blockFrame &&
+      frame->GetContent()->Tag() != nsGkAtoms::input) {
     // An html:input @type="file" is the only input that is exposed as a
     // blockframe. It must be exposed as ROLE_TEXT_CONTAINER for JAWS.
     return nsIAccessibleRole::ROLE_PARAGRAPH;
   }
 
   return nsIAccessibleRole::ROLE_TEXT_CONTAINER; // In ATK this works
 }
 
@@ -178,34 +177,34 @@ nsHyperTextAccessible::NativeState()
   nsCOMPtr<nsIEditor> editor;
   GetAssociatedEditor(getter_AddRefs(editor));
   if (editor) {
     PRUint32 flags;
     editor->GetFlags(&flags);
     if (0 == (flags & nsIPlaintextEditor::eEditorReadonlyMask)) {
       states |= states::EDITABLE;
     }
-  } else if (mContent->Tag() == nsAccessibilityAtoms::article) {
+  } else if (mContent->Tag() == nsGkAtoms::article) {
     // We want <article> to behave like a document in terms of readonly state.
     states |= states::READONLY;
   }
 
   if (GetChildCount() > 0)
     states |= states::SELECTABLE_TEXT;
 
   return states;
 }
 
 // Substring must be entirely within the same text node
 nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 aStartRenderedOffset,
                                                     PRUint32 aEndRenderedOffset)
 {
   nsIntRect screenRect;
   NS_ENSURE_TRUE(aFrame, screenRect);
-  if (aFrame->GetType() != nsAccessibilityAtoms::textFrame) {
+  if (aFrame->GetType() != nsGkAtoms::textFrame) {
     // XXX fallback for non-text frames, happens for bullets right now
     // but in the future bullets will have proper text frames
     return aFrame->GetScreenRectExternal();
   }
 
   PRInt32 startContentOffset, endContentOffset;
   nsresult rv = RenderedToContentOffset(aFrame, aStartRenderedOffset, &startContentOffset);
   NS_ENSURE_SUCCESS(rv, screenRect);
@@ -333,17 +332,17 @@ nsHyperTextAccessible::GetPosAndText(PRI
     }
     nsIFrame *primaryFrame = frame;
     if (nsAccUtils::IsText(childAcc)) {
       // We only need info up to rendered offset -- that is what we're
       // converting to content offset
       PRInt32 substringEndOffset = -1;
       PRUint32 ourRenderedStart = 0;
       PRInt32 ourContentStart = 0;
-      if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
+      if (frame->GetType() == nsGkAtoms::textFrame) {
         nsresult rv = frame->GetRenderedText(nsnull, &skipChars, &iter);
         if (NS_SUCCEEDED(rv)) {
           ourRenderedStart = iter.GetSkippedOffset();
           ourContentStart = iter.GetOriginalOffset();
           substringEndOffset =
             iter.ConvertOriginalToSkipped(skipChars.GetOriginalCharCount() +
                                           ourContentStart) - ourRenderedStart;
         }
@@ -355,17 +354,17 @@ nsHyperTextAccessible::GetPosAndText(PRI
       }
       if (startOffset < substringEndOffset) {
         // Our start is within this substring
         if (startOffset > 0 || endOffset < substringEndOffset) {
           // We don't want the whole string for this accessible
           // Get out the continuing text frame with this offset
           PRInt32 outStartLineUnused;
           PRInt32 contentOffset;
-          if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
+          if (frame->GetType() == nsGkAtoms::textFrame) {
             contentOffset = iter.ConvertSkippedToOriginal(startOffset) +
                             ourRenderedStart - ourContentStart;
           }
           else {
             contentOffset = startOffset;
           }
           frame->GetChildFrameContainingOffset(contentOffset, PR_TRUE,
                                                &outStartLineUnused, &frame);
@@ -418,17 +417,17 @@ nsHyperTextAccessible::GetPosAndText(PRI
       // XXX Append \n for <br>'s
       if (startOffset >= 1) {
         -- startOffset;
       }
       else {
         if (endOffset > 0) {
           if (aText) {
             // XXX: should use nsIAccessible::AppendTextTo.
-            if (frame->GetType() == nsAccessibilityAtoms::brFrame) {
+            if (frame->GetType() == nsGkAtoms::brFrame) {
               *aText += kForcedNewLineChar;
             } else if (nsAccUtils::MustPrune(this)) {
               *aText += kImaginaryEmbeddedObjectChar;
               // Expose imaginary embedded object character if the accessible
               // hans't children.
             } else {
               *aText += kEmbeddedObjectChar;
             }
@@ -604,20 +603,20 @@ nsHyperTextAccessible::DOMPointToHyperte
   }
 
   // Get accessible for this findNode, or if that node isn't accessible, use the
   // accessible for the next DOM node which has one (based on forward depth first search)
   nsAccessible *descendantAcc = nsnull;
   if (findNode) {
     nsCOMPtr<nsIContent> findContent(do_QueryInterface(findNode));
     if (findContent && findContent->IsHTML() &&
-        findContent->NodeInfo()->Equals(nsAccessibilityAtoms::br) &&
+        findContent->NodeInfo()->Equals(nsGkAtoms::br) &&
         findContent->AttrValueIs(kNameSpaceID_None,
-                                 nsAccessibilityAtoms::mozeditorbogusnode,
-                                 nsAccessibilityAtoms::_true,
+                                 nsGkAtoms::mozeditorbogusnode,
+                                 nsGkAtoms::_true,
                                  eIgnoreCase)) {
       // This <br> is the hacky "bogus node" used when there is no text in a control
       *aHyperTextOffset = 0;
       return nsnull;
     }
     descendantAcc = GetFirstAvailableAccessible(findNode);
   }
 
@@ -796,17 +795,17 @@ nsHyperTextAccessible::GetRelativeOffset
   nsPeekOffsetStruct pos;
 
   nsresult rv;
   PRInt32 contentOffset = aFromOffset;
   if (nsAccUtils::IsText(aFromAccessible)) {
     nsIFrame *frame = aFromAccessible->GetFrame();
     NS_ENSURE_TRUE(frame, -1);
 
-    if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
+    if (frame->GetType() == nsGkAtoms::textFrame) {
       rv = RenderedToContentOffset(frame, aFromOffset, &contentOffset);
       NS_ENSURE_SUCCESS(rv, -1);
     }
   }
 
   pos.SetData(aAmount, aDirection, contentOffset,
               0, kIsJumpLinesOk, kIsScrollViewAStop, kIsKeyboardSelect, kIsVisualBidi,
               wordMovementType);
@@ -1161,17 +1160,17 @@ nsHyperTextAccessible::GetTextAttributes
   nsTextAttrsMgr textAttrsMgr(this, aIncludeDefAttrs, accAtOffset,
                               accAtOffsetIdx);
   nsresult rv = textAttrsMgr.GetAttributes(*aAttributes, &startOffset,
                                            &endOffset);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Compute spelling attributes on text accessible only.
   nsIFrame *offsetFrame = accAtOffset->GetFrame();
-  if (offsetFrame && offsetFrame->GetType() == nsAccessibilityAtoms::textFrame) {
+  if (offsetFrame && offsetFrame->GetType() == nsGkAtoms::textFrame) {
     nsCOMPtr<nsIDOMNode> node = accAtOffset->GetDOMNode();
 
     PRInt32 nodeOffset = 0;
     nsresult rv = RenderedToContentOffset(offsetFrame, offsetInAcc,
                                           &nodeOffset);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Set 'misspelled' text attribute.
@@ -1205,71 +1204,71 @@ nsHyperTextAccessible::GetDefaultTextAtt
   nsTextAttrsMgr textAttrsMgr(this, PR_TRUE);
   return textAttrsMgr.GetAttributes(*aAttributes);
 }
 
 PRInt32
 nsHyperTextAccessible::GetLevelInternal()
 {
   nsIAtom *tag = mContent->Tag();
-  if (tag == nsAccessibilityAtoms::h1)
+  if (tag == nsGkAtoms::h1)
     return 1;
-  if (tag == nsAccessibilityAtoms::h2)
+  if (tag == nsGkAtoms::h2)
     return 2;
-  if (tag == nsAccessibilityAtoms::h3)
+  if (tag == nsGkAtoms::h3)
     return 3;
-  if (tag == nsAccessibilityAtoms::h4)
+  if (tag == nsGkAtoms::h4)
     return 4;
-  if (tag == nsAccessibilityAtoms::h5)
+  if (tag == nsGkAtoms::h5)
     return 5;
-  if (tag == nsAccessibilityAtoms::h6)
+  if (tag == nsGkAtoms::h6)
     return 6;
 
   return nsAccessibleWrap::GetLevelInternal();
 }
 
 nsresult
 nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   nsresult rv = nsAccessibleWrap::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // 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) {
+  if (frame && frame->GetType() == nsGkAtoms::blockFrame) {
     nsAutoString oldValueUnused;
     aAttributes->SetStringProperty(NS_LITERAL_CSTRING("formatting"), NS_LITERAL_STRING("block"),
                                    oldValueUnused);
   }
 
   if (gLastFocusedNode == GetNode()) {
     PRInt32 lineNumber = GetCaretLineNumber();
     if (lineNumber >= 1) {
       nsAutoString strLineNumber;
       strLineNumber.AppendInt(lineNumber);
-      nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::lineNumber,
+      nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::lineNumber,
                              strLineNumber);
     }
   }
 
   // For the html landmark elements we expose them like we do aria landmarks to
   // make AT navigation schemes "just work". Note html:header is redundant as
   // a landmark since it usually contains headings. We're not yet sure how the
   // web will use html:footer but our best bet right now is as contentinfo.
-  if (mContent->Tag() == nsAccessibilityAtoms::nav)
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
+  if (mContent->Tag() == nsGkAtoms::nav)
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
                            NS_LITERAL_STRING("navigation"));
-  else if (mContent->Tag() == nsAccessibilityAtoms::footer) 
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
+  else if (mContent->Tag() == nsGkAtoms::footer) 
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
                            NS_LITERAL_STRING("contentinfo"));
-  else if (mContent->Tag() == nsAccessibilityAtoms::aside) 
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
+  else if (mContent->Tag() == nsGkAtoms::aside) 
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::xmlroles,
                            NS_LITERAL_STRING("complementary"));
 
   return  NS_OK;
 }
 
 /*
  * Given an offset, the x, y, width, and height values are filled appropriately.
  */
@@ -1355,17 +1354,17 @@ nsHyperTextAccessible::GetOffsetAtPoint(
     nsIFrame *frame = primaryFrame;
     while (frame) {
       nsIContent *content = frame->GetContent();
       NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
       nsPoint pointInFrame = pointInHyperText - frame->GetOffsetToExternal(hyperFrame);
       nsSize frameSize = frame->GetSize();
       if (pointInFrame.x < frameSize.width && pointInFrame.y < frameSize.height) {
         // Finished
-        if (frame->GetType() == nsAccessibilityAtoms::textFrame) {
+        if (frame->GetType() == nsGkAtoms::textFrame) {
           nsIFrame::ContentOffsets contentOffsets = frame->GetContentOffsetsFromPointExternal(pointInFrame, PR_TRUE);
           if (contentOffsets.IsNull() || contentOffsets.content != content) {
             return NS_OK; // Not found, will return -1
           }
           PRUint32 addToOffset;
           nsresult rv = ContentToRenderedOffset(primaryFrame,
                                                 contentOffsets.offset,
                                                 &addToOffset);
@@ -2105,17 +2104,17 @@ nsresult nsHyperTextAccessible::ContentT
                                                         PRUint32 *aRenderedOffset)
 {
   if (!aFrame) {
     // Current frame not rendered -- this can happen if text is set on
     // something with display: none
     *aRenderedOffset = 0;
     return NS_OK;
   }
-  NS_ASSERTION(aFrame->GetType() == nsAccessibilityAtoms::textFrame,
+  NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame,
                "Need text frame for offset conversion");
   NS_ASSERTION(aFrame->GetPrevContinuation() == nsnull,
                "Call on primary frame only");
 
   gfxSkipChars skipChars;
   gfxSkipCharsIterator iter;
   // Only get info up to original offset, we know that will be larger than skipped offset
   nsresult rv = aFrame->GetRenderedText(nsnull, &skipChars, &iter, 0, aContentOffset);
@@ -2131,17 +2130,17 @@ nsresult nsHyperTextAccessible::ContentT
 }
 
 nsresult nsHyperTextAccessible::RenderedToContentOffset(nsIFrame *aFrame, PRUint32 aRenderedOffset,
                                                         PRInt32 *aContentOffset)
 {
   *aContentOffset = 0;
   NS_ENSURE_TRUE(aFrame, NS_ERROR_FAILURE);
 
-  NS_ASSERTION(aFrame->GetType() == nsAccessibilityAtoms::textFrame,
+  NS_ASSERTION(aFrame->GetType() == nsGkAtoms::textFrame,
                "Need text frame for offset conversion");
   NS_ASSERTION(aFrame->GetPrevContinuation() == nsnull,
                "Call on primary frame only");
 
   gfxSkipChars skipChars;
   gfxSkipCharsIterator iter;
   // We only need info up to skipped offset -- that is what we're converting to original offset
   nsresult rv = aFrame->GetRenderedText(nsnull, &skipChars, &iter, 0, aRenderedOffset);
@@ -2278,17 +2277,17 @@ nsHyperTextAccessible::GetDOMPointByFram
     NS_ENSURE_STATE(content);
 
     nsCOMPtr<nsIContent> parent(content->GetParent());
     NS_ENSURE_STATE(parent);
 
     *aNodeOffset = parent->IndexOf(content) + 1;
     node = do_QueryInterface(parent);
 
-  } else if (aFrame->GetType() == nsAccessibilityAtoms::textFrame) {
+  } else if (aFrame->GetType() == nsGkAtoms::textFrame) {
     nsCOMPtr<nsIContent> content(aFrame->GetContent());
     NS_ENSURE_STATE(content);
 
     nsIFrame *primaryFrame = content->GetPrimaryFrame();
     nsresult rv = RenderedToContentOffset(primaryFrame, aOffset, aNodeOffset);
     NS_ENSURE_SUCCESS(rv, rv);
 
     node = do_QueryInterface(content);
@@ -2413,17 +2412,17 @@ nsHyperTextAccessible::GetSpellTextAttri
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (startHTOffset > *aHTStartOffset)
         *aHTStartOffset = startHTOffset;
       if (endHTOffset < *aHTEndOffset)
         *aHTEndOffset = endHTOffset;
 
       if (aAttributes) {
-        nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::invalid,
+        nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::invalid,
                                NS_LITERAL_STRING("spelling"));
       }
 
       return NS_OK;
     }
   }
 
   return NS_OK;
--- a/accessible/src/msaa/nsAccessNodeWrap.cpp
+++ b/accessible/src/msaa/nsAccessNodeWrap.cpp
@@ -36,17 +36,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccessNodeWrap.h"
 
 #include "AccessibleApplication.h"
 #include "ISimpleDOMNode_i.c"
 
-#include "nsAccessibilityAtoms.h"
 #include "nsAccessibilityService.h"
 #include "nsApplicationAccessibleWrap.h"
 #include "nsCoreUtils.h"
 #include "nsRootAccessible.h"
 #include "nsWinUtils.h"
 
 #include "nsAttrName.h"
 #include "nsIDocument.h"
--- a/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -33,17 +33,16 @@
  * 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 "nsAccessibleWrap.h"
 
-#include "nsAccessibilityAtoms.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 #include "nsWinUtils.h"
 #include "Relation.h"
 #include "States.h"
 
 #include "ia2AccessibleRelation.h"
 
@@ -403,17 +402,17 @@ STDMETHODIMP nsAccessibleWrap::get_accRo
   // Use BSTR role to expose role attribute or tag name + namespace
   nsIContent *content = xpAccessible->GetContent();
   if (!content)
     return E_FAIL;
 
   if (content->IsElement()) {
     nsAutoString roleString;
     if (msaaRole != ROLE_SYSTEM_CLIENT &&
-        !content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::role, roleString)) {
+        !content->GetAttr(kNameSpaceID_None, nsGkAtoms::role, roleString)) {
       nsIDocument * document = content->GetCurrentDoc();
       if (!document)
         return E_FAIL;
 
       nsINodeInfo *nodeInfo = content->NodeInfo();
       nodeInfo->GetName(roleString);
 
       // Only append name space if different from that of current document.
--- a/accessible/src/msaa/nsXULMenuAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsXULMenuAccessibleWrap.cpp
@@ -31,17 +31,16 @@
  * 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 "nsXULMenuAccessibleWrap.h"
-#include "nsAccessibilityAtoms.h"
 #include "nsINameSpaceManager.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULMenuAccessibleWrap
 ////////////////////////////////////////////////////////////////////////////////
 
 nsXULMenuitemAccessibleWrap::
   nsXULMenuitemAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
@@ -55,15 +54,15 @@ nsXULMenuitemAccessibleWrap::GetName(nsA
   // XXX This should be done in get_accName() so that nsIAccessible::GetName()]
   // provides the same results on all platforms
   nsresult rv = nsXULMenuitemAccessible::GetName(aName);
   if (NS_FAILED(rv)) {
     return rv;
   }
   
   nsAutoString accel;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::acceltext, accel);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::acceltext, accel);
   if (!accel.IsEmpty()) {
     aName += NS_LITERAL_STRING("\t") + accel;
   }
 
   return NS_OK;
 }
--- a/accessible/src/xforms/nsXFormsAccessible.cpp
+++ b/accessible/src/xforms/nsXFormsAccessible.cpp
@@ -199,17 +199,17 @@ nsXFormsAccessible::GetNameInternal(nsAS
   // search the xforms:label element
   return GetBoundChildElementValue(NS_LITERAL_STRING("label"), aName);
 }
 
 void
 nsXFormsAccessible::Description(nsString& aDescription)
 {
   nsTextEquivUtils::
-    GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
+    GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
                            aDescription);
 
   if (aDescription.IsEmpty())
     GetBoundChildElementValue(NS_LITERAL_STRING("hint"), aDescription);
 }
 
 PRBool
 nsXFormsAccessible::GetAllowsAnonChildAccessibles()
@@ -295,17 +295,17 @@ nsXFormsEditableAccessible::GetAssociate
 // nsXFormsSelectableAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
 nsXFormsSelectableAccessible::
   nsXFormsSelectableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
   nsXFormsEditableAccessible(aContent, aShell), mIsSelect1Element(nsnull)
 {
   mIsSelect1Element =
-    mContent->NodeInfo()->Equals(nsAccessibilityAtoms::select1);
+    mContent->NodeInfo()->Equals(nsGkAtoms::select1);
 }
 
 bool
 nsXFormsSelectableAccessible::IsSelect()
 {
   return true;
 }
 
@@ -506,22 +506,22 @@ nsXFormsSelectableAccessible::GetItemByI
 {
   nsAccessible* accessible = aAccessible ? aAccessible : this;
   PRInt32 childCount = accessible->GetChildCount();
   for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
     nsAccessible *child = accessible->GetChildAt(childIdx);
     nsIContent* childContent = child->GetContent();
     nsINodeInfo *nodeInfo = childContent->NodeInfo();
     if (nodeInfo->NamespaceEquals(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS))) {
-      if (nodeInfo->Equals(nsAccessibilityAtoms::item)) {
+      if (nodeInfo->Equals(nsGkAtoms::item)) {
         if (!*aIndex)
           return childContent;
 
         --*aIndex;
-      } else if (nodeInfo->Equals(nsAccessibilityAtoms::choices)) {
+      } else if (nodeInfo->Equals(nsGkAtoms::choices)) {
         nsIContent* itemContent = GetItemByIndex(aIndex, child);
         if (itemContent)
           return itemContent;
       }
     }
   }
 
   return nsnull;
@@ -577,23 +577,23 @@ nsXFormsSelectableItemAccessible::IsSele
     if (!nodeinfo->NamespaceEquals(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS)))
       continue;
 
     nsCOMPtr<nsIDOMNode> select(do_QueryInterface(parent));
     if (!select)
       continue;
 
     nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
-    if (nodeinfo->Equals(nsAccessibilityAtoms::select)) {
+    if (nodeinfo->Equals(nsGkAtoms::select)) {
       PRBool isSelected = PR_FALSE;
       rv = sXFormsService->IsSelectItemSelected(select, DOMNode, &isSelected);
       return NS_SUCCEEDED(rv) && isSelected;
     }
 
-    if (nodeinfo->Equals(nsAccessibilityAtoms::select1)) {
+    if (nodeinfo->Equals(nsGkAtoms::select1)) {
       nsCOMPtr<nsIDOMNode> selitem;
       rv = sXFormsService->GetSelectedItemForSelect1(select,
                                                      getter_AddRefs(selitem));
       return NS_SUCCEEDED(rv) && (selitem == DOMNode);
     }
   }
 
   return PR_FALSE;
--- a/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp
+++ b/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp
@@ -65,17 +65,17 @@ nsXFormsLabelAccessible::GetNameInternal
   // XXX Correct name calculation for this, see bug 453594.
   return NS_OK;
 }
 
 void
 nsXFormsLabelAccessible::Description(nsString& aDescription)
 {
   nsTextEquivUtils::
-    GetTextEquivFromIDRefs(this, nsAccessibilityAtoms::aria_describedby,
+    GetTextEquivFromIDRefs(this, nsGkAtoms::aria_describedby,
                            aDescription);
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXFormsOutputAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
--- a/accessible/src/xul/nsXULColorPickerAccessible.cpp
+++ b/accessible/src/xul/nsXULColorPickerAccessible.cpp
@@ -64,17 +64,17 @@ nsXULColorPickerTileAccessible::
 NS_IMETHODIMP
 nsXULColorPickerTileAccessible::GetValue(nsAString& aValue)
 {
   aValue.Truncate();
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::color, aValue);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::color, aValue);
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULColorPickerTileAccessible: nsAccessible
 
 PRUint32
 nsXULColorPickerTileAccessible::NativeRole()
@@ -89,22 +89,22 @@ nsXULColorPickerTileAccessible::NativeSt
 
   // get focus and disable status from base class
   PRUint64 states = nsAccessibleWrap::NativeState();
 
   states |= states::FOCUSABLE;
 
   // Focused?
   PRBool isFocused = mContent->HasAttr(kNameSpaceID_None,
-                                       nsAccessibilityAtoms::hover);
+                                       nsGkAtoms::hover);
   if (isFocused)
     states |= states::FOCUSED;
 
   PRBool isSelected = mContent->HasAttr(kNameSpaceID_None,
-                                        nsAccessibilityAtoms::selected);
+                                        nsGkAtoms::selected);
   if (isSelected)
     states |= states::SELECTED;
 
   return states;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/xul/nsXULComboboxAccessible.cpp
+++ b/accessible/src/xul/nsXULComboboxAccessible.cpp
@@ -57,18 +57,18 @@ nsXULComboboxAccessible::
   nsXULComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
   nsAccessibleWrap(aContent, aShell)
 {
 }
 
 PRUint32
 nsXULComboboxAccessible::NativeRole()
 {
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::autocomplete, eIgnoreCase))
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::autocomplete, eIgnoreCase))
     return nsIAccessibleRole::ROLE_AUTOCOMPLETE;
   return nsIAccessibleRole::ROLE_COMBOBOX;
 }
 
 PRUint64
 nsXULComboboxAccessible::NativeState()
 {
   // As a nsComboboxAccessible we can have the following states:
@@ -133,19 +133,19 @@ nsXULComboboxAccessible::Description(nsS
     if (focusedOptionAcc)
       focusedOptionAcc->Description(aDescription);
   }
 }
 
 PRBool
 nsXULComboboxAccessible::GetAllowsAnonChildAccessibles()
 {
-  if (mContent->NodeInfo()->Equals(nsAccessibilityAtoms::textbox, kNameSpaceID_XUL) ||
-      mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::editable,
-                            nsAccessibilityAtoms::_true, eIgnoreCase)) {
+  if (mContent->NodeInfo()->Equals(nsGkAtoms::textbox, kNameSpaceID_XUL) ||
+      mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::editable,
+                            nsGkAtoms::_true, eIgnoreCase)) {
     // Both the XUL <textbox type="autocomplete"> and <menulist editable="true"> widgets
     // use nsXULComboboxAccessible. We need to walk the anonymous children for these
     // so that the entry field is a child
     return PR_TRUE;
   }
 
   // Argument of PR_FALSE indicates we don't walk anonymous children for
   // menuitems
--- a/accessible/src/xul/nsXULFormControlAccessible.cpp
+++ b/accessible/src/xul/nsXULFormControlAccessible.cpp
@@ -34,17 +34,16 @@
  * 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 "nsXULFormControlAccessible.h"
 
-#include "nsAccessibilityAtoms.h"
 #include "nsAccUtils.h"
 #include "nsAccTreeWalker.h"
 #include "nsCoreUtils.h"
 #include "nsDocAccessible.h"
 #include "Relation.h"
 #include "States.h"
 
 // NOTE: alphabetically ordered
@@ -154,17 +153,17 @@ nsXULButtonAccessible::NativeState()
         }
       }
     }
   }
 
   if (ContainsMenu())
     state |= states::HASPOPUP;
 
-  if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::_default))
+  if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::_default))
     state |= states::DEFAULT;
 
   return state;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULButtonAccessible: nsAccessible protected
 
@@ -173,24 +172,24 @@ nsXULButtonAccessible::CacheChildren()
 {
   // In general XUL button has not accessible children. Nevertheless menu
   // buttons can have button (@type="menu-button") and popup accessibles
   // (@type="menu-button" or @type="menu").
 
   // XXX: no children until the button is menu button. Probably it's not
   // totally correct but in general AT wants to have leaf buttons.
   PRBool isMenu = mContent->AttrValueIs(kNameSpaceID_None,
-                                       nsAccessibilityAtoms::type,
-                                       nsAccessibilityAtoms::menu,
+                                       nsGkAtoms::type,
+                                       nsGkAtoms::menu,
                                        eCaseMatters);
 
   PRBool isMenuButton = isMenu ?
     PR_FALSE :
-    mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                          nsAccessibilityAtoms::menuButton, eCaseMatters);
+    mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                          nsGkAtoms::menuButton, eCaseMatters);
 
   if (!isMenu && !isMenuButton)
     return;
 
   nsAccessible* menupopup = nsnull;
   nsAccessible* button = nsnull;
 
   nsAccTreeWalker walker(mWeakShell, mContent, PR_TRUE);
@@ -225,20 +224,20 @@ nsXULButtonAccessible::CacheChildren()
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULButtonAccessible protected
 
 PRBool
 nsXULButtonAccessible::ContainsMenu()
 {
   static nsIContent::AttrValuesArray strings[] =
-    {&nsAccessibilityAtoms::menu, &nsAccessibilityAtoms::menuButton, nsnull};
+    {&nsGkAtoms::menu, &nsGkAtoms::menuButton, nsnull};
 
   return mContent->FindAttrValueIn(kNameSpaceID_None,
-                                   nsAccessibilityAtoms::type,
+                                   nsGkAtoms::type,
                                    strings, eCaseMatters) >= 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULDropmarkerAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
 nsXULDropmarkerAccessible::
@@ -595,19 +594,19 @@ nsXULToolbarButtonAccessible::IsSeparato
 {
   nsCOMPtr<nsIDOMNode> domNode;
   aAccessible->GetDOMNode(getter_AddRefs(domNode));
   nsCOMPtr<nsIContent> contentDomNode(do_QueryInterface(domNode));
 
   if (!contentDomNode)
     return PR_FALSE;
 
-  return (contentDomNode->Tag() == nsAccessibilityAtoms::toolbarseparator) ||
-         (contentDomNode->Tag() == nsAccessibilityAtoms::toolbarspacer) ||
-         (contentDomNode->Tag() == nsAccessibilityAtoms::toolbarspring);
+  return (contentDomNode->Tag() == nsGkAtoms::toolbarseparator) ||
+         (contentDomNode->Tag() == nsGkAtoms::toolbarspacer) ||
+         (contentDomNode->Tag() == nsGkAtoms::toolbarspring);
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsXULToolbarAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
 nsXULToolbarAccessible::
@@ -621,18 +620,17 @@ nsXULToolbarAccessible::NativeRole()
 {
   return nsIAccessibleRole::ROLE_TOOLBAR;
 }
 
 nsresult
 nsXULToolbarAccessible::GetNameInternal(nsAString& aName)
 {
   nsAutoString name;
-  if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::toolbarname,
-                        name)) {
+  if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::toolbarname, name)) {
     name.CompressWhitespace();
     aName = name;
   }
 
   return NS_OK;
 }
 
 
@@ -723,30 +721,30 @@ nsXULTextFieldAccessible::NativeState()
 
   if (gLastFocusedNode == mContent)
     state |= states::FOCUSED;
 
   nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
   if (menuList) {
     // <xul:menulist droppable="false">
     if (!mContent->AttrValueIs(kNameSpaceID_None,
-                               nsAccessibilityAtoms::editable,
-                               nsAccessibilityAtoms::_true, eIgnoreCase)) {
+                               nsGkAtoms::editable,
+                               nsGkAtoms::_true, eIgnoreCase)) {
       state |= states::READONLY;
     }
   }
 
   return state;
 }
 
 PRUint32
 nsXULTextFieldAccessible::NativeRole()
 {
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::password, eIgnoreCase))
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::password, eIgnoreCase))
     return nsIAccessibleRole::ROLE_PASSWORD_TEXT;
   return nsIAccessibleRole::ROLE_ENTRY;
 }
 
 /**
   * Only one actions available
   */
 PRUint8
--- a/accessible/src/xul/nsXULListboxAccessible.cpp
+++ b/accessible/src/xul/nsXULListboxAccessible.cpp
@@ -172,18 +172,18 @@ nsXULListboxAccessible::NativeState()
   // As a nsXULListboxAccessible we can have the following states:
   //   FOCUSED, READONLY, FOCUSABLE
 
   // Get focus status from base class
   PRUint64 states = nsAccessible::NativeState();
 
   // see if we are multiple select if so set ourselves as such
 
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::seltype,
-                            nsAccessibilityAtoms::multiple, eCaseMatters)) {
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::seltype,
+                            nsGkAtoms::multiple, eCaseMatters)) {
       states |= states::MULTISELECTABLE | states::EXTSELECTABLE;
   }
 
   return states;
 }
 
 /**
   * Our value is the label of our ( first ) selected child.
@@ -245,31 +245,31 @@ nsXULListboxAccessible::GetColumnCount(P
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsIContent* headContent = nsnull;
 
   PRUint32 count = mContent->GetChildCount();
   for (PRUint32 index = 0; index < count; ++index) {
     nsIContent* childContent = mContent->GetChildAt(index);
-    if (childContent->NodeInfo()->Equals(nsAccessibilityAtoms::listcols,
+    if (childContent->NodeInfo()->Equals(nsGkAtoms::listcols,
                                          kNameSpaceID_XUL)) {
       headContent = childContent;
     }
   }
 
   if (!headContent)
     return NS_OK;
 
   PRUint32 columnCount = 0;
 
   count = headContent->GetChildCount();
   for (PRUint32 index = 0; index < count; ++index) {
     nsIContent* childContent = headContent->GetChildAt(index);
-    if (childContent->NodeInfo()->Equals(nsAccessibilityAtoms::listcol,
+    if (childContent->NodeInfo()->Equals(nsGkAtoms::listcol,
                                          kNameSpaceID_XUL)) {
       columnCount++;
     }
   }
 
   *aColumnsCout = columnCount;
   return NS_OK;
 }
@@ -829,18 +829,18 @@ nsXULListboxAccessible::IsProbablyForLay
 // nsXULListitemAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
 nsXULListitemAccessible::
   nsXULListitemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
   nsXULMenuitemAccessible(aContent, aShell)
 {
   mIsCheckbox = mContent->AttrValueIs(kNameSpaceID_None,
-                                      nsAccessibilityAtoms::type,
-                                      nsAccessibilityAtoms::checkbox,
+                                      nsGkAtoms::type,
+                                      nsGkAtoms::checkbox,
                                       eCaseMatters);
 }
 
 NS_IMPL_ISUPPORTS_INHERITED0(nsXULListitemAccessible, nsAccessible)
 
 nsAccessible *
 nsXULListitemAccessible::GetListAccessible()
 {
@@ -878,19 +878,19 @@ nsXULListitemAccessible::Description(nsS
   * If there is a Listcell as a child ( not anonymous ) use it, otherwise
   *   default to getting the name from GetXULName
   */
 nsresult
 nsXULListitemAccessible::GetNameInternal(nsAString& aName)
 {
   nsIContent* child = mContent->GetChildAt(0);
   if (child) {
-    if (child->NodeInfo()->Equals(nsAccessibilityAtoms::listcell,
+    if (child->NodeInfo()->Equals(nsGkAtoms::listcell,
                                   kNameSpaceID_XUL)) {
-      child->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
+      child->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
       return NS_OK;
     }
   }
   return GetXULName(aName);
 }
 
 PRUint32
 nsXULListitemAccessible::NativeRole()
@@ -1209,13 +1209,13 @@ nsXULListCellAccessible::GetAttributesIn
   PRInt32 colIdx = -1;
   GetColumnIndex(&colIdx);
 
   PRInt32 cellIdx = -1;
   table->GetCellIndexAt(rowIdx, colIdx, &cellIdx);
 
   nsAutoString stringIdx;
   stringIdx.AppendInt(cellIdx);
-  nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
+  nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex,
                          stringIdx);
 
   return NS_OK;
 }
--- a/accessible/src/xul/nsXULMenuAccessible.cpp
+++ b/accessible/src/xul/nsXULMenuAccessible.cpp
@@ -281,44 +281,41 @@ nsXULMenuitemAccessible::
 }
 
 PRUint64
 nsXULMenuitemAccessible::NativeState()
 {
   PRUint64 state = nsAccessible::NativeState();
 
   // Focused?
-  if (mContent->HasAttr(kNameSpaceID_None,
-                        nsAccessibilityAtoms::_moz_menuactive))
+  if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::menuactive))
     state |= states::FOCUSED;
 
   // Has Popup?
-  if (mContent->NodeInfo()->Equals(nsAccessibilityAtoms::menu,
-                                   kNameSpaceID_XUL)) {
+  if (mContent->NodeInfo()->Equals(nsGkAtoms::menu, kNameSpaceID_XUL)) {
     state |= states::HASPOPUP;
-    if (mContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::open))
+    if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::open))
       state |= states::EXPANDED;
     else
       state |= states::COLLAPSED;
   }
 
   // Checkable/checked?
   static nsIContent::AttrValuesArray strings[] =
-    { &nsAccessibilityAtoms::radio, &nsAccessibilityAtoms::checkbox, nsnull };
+    { &nsGkAtoms::radio, &nsGkAtoms::checkbox, nsnull };
 
-  if (mContent->FindAttrValueIn(kNameSpaceID_None,
-                                nsAccessibilityAtoms::type,
-                                strings, eCaseMatters) >= 0) {
+  if (mContent->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::type, strings,
+                                eCaseMatters) >= 0) {
 
     // Checkable?
     state |= states::CHECKABLE;
 
     // Checked?
-    if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::checked,
-                              nsAccessibilityAtoms::_true, eCaseMatters))
+    if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::checked,
+                              nsGkAtoms::_true, eCaseMatters))
       state |= states::CHECKED;
   }
 
   // Combo box listitem
   PRBool isComboboxOption = (Role() == nsIAccessibleRole::ROLE_COMBOBOX_OPTION);
   if (isComboboxOption) {
     // Is selected?
     PRBool isSelected = PR_FALSE;
@@ -368,37 +365,37 @@ nsXULMenuitemAccessible::NativeState()
   state |= (states::FOCUSABLE | states::SELECTABLE);
 
   return state;
 }
 
 nsresult
 nsXULMenuitemAccessible::GetNameInternal(nsAString& aName)
 {
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
   return NS_OK;
 }
 
 void
 nsXULMenuitemAccessible::Description(nsString& aDescription)
 {
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::description,
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::description,
                     aDescription);
 }
 
 KeyBinding
 nsXULMenuitemAccessible::AccessKey() const
 {
   // Return menu accesskey: N or Alt+F.
   static PRInt32 gMenuAccesskeyModifier = -1;  // magic value of -1 indicates unitialized state
 
   // We do not use nsCoreUtils::GetAccesskeyFor() because accesskeys for
   // menu are't registered by nsEventStateManager.
   nsAutoString accesskey;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::accesskey,
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::accesskey,
                     accesskey);
   if (accesskey.IsEmpty())
     return KeyBinding();
 
   PRUint32 modifierKey = 0;
 
   nsAccessible* parentAcc = Parent();
   if (parentAcc) {
@@ -500,23 +497,23 @@ nsXULMenuitemAccessible::NativeRole()
 {
   nsCOMPtr<nsIDOMXULContainerElement> xulContainer(do_QueryInterface(mContent));
   if (xulContainer)
     return nsIAccessibleRole::ROLE_PARENT_MENUITEM;
 
   if (mParent && mParent->Role() == nsIAccessibleRole::ROLE_COMBOBOX_LIST)
     return nsIAccessibleRole::ROLE_COMBOBOX_OPTION;
 
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::radio, eCaseMatters)) {
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::radio, eCaseMatters)) {
     return nsIAccessibleRole::ROLE_RADIO_MENU_ITEM;
   }
 
-  if (mContent->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::type,
-                            nsAccessibilityAtoms::checkbox,
+  if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
+                            nsGkAtoms::checkbox,
                             eCaseMatters)) {
     return nsIAccessibleRole::ROLE_CHECK_MENU_ITEM;
   }
 
   return nsIAccessibleRole::ROLE_MENUITEM;
 }
 
 PRInt32
@@ -628,27 +625,27 @@ nsXULMenupopupAccessible::
 PRUint64
 nsXULMenupopupAccessible::NativeState()
 {
   PRUint64 state = nsAccessible::NativeState();
 
 #ifdef DEBUG_A11Y
   // We are onscreen if our parent is active
   PRBool isActive = mContent->HasAttr(kNameSpaceID_None,
-                                      nsAccessibilityAtoms::menuactive);
+                                      nsGkAtoms::menuactive);
   if (!isActive) {
     nsAccessible* parent = Parent();
     if (!parent)
       return state;
 
     nsIContent *parentContent = parnet->GetContent();
     NS_ENSURE_TRUE(parentContent, state);
 
     isActive = parentContent->HasAttr(kNameSpaceID_None,
-                                      nsAccessibilityAtoms::open);
+                                      nsGkAtoms::open);
   }
 
   NS_ASSERTION(isActive || states & states::INVISIBLE,
                "XULMenupopup doesn't have INVISIBLE when it's inactive");
 #endif
 
   if (state & states::INVISIBLE)
     state |= states::OFFSCREEN | states::COLLAPSED;
@@ -656,17 +653,17 @@ nsXULMenupopupAccessible::NativeState()
   return state;
 }
 
 nsresult
 nsXULMenupopupAccessible::GetNameInternal(nsAString& aName)
 {
   nsIContent *content = mContent;
   while (content && aName.IsEmpty()) {
-    content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
+    content->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
     content = content->GetParent();
   }
 
   return NS_OK;
 }
 
 PRUint32
 nsXULMenupopupAccessible::NativeRole()
--- a/accessible/src/xul/nsXULSliderAccessible.cpp
+++ b/accessible/src/xul/nsXULSliderAccessible.cpp
@@ -33,17 +33,16 @@
  * 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 "nsXULSliderAccessible.h"
 
-#include "nsAccessibilityAtoms.h"
 #include "States.h"
 
 #include "nsIDOMDocument.h"
 #include "nsIDOMDocumentXBL.h"
 #include "nsIFrame.h"
 
 using namespace mozilla::a11y;
 
@@ -89,17 +88,17 @@ nsXULSliderAccessible::NativeState()
   return states;
 }
 
 // nsIAccessible
 
 NS_IMETHODIMP
 nsXULSliderAccessible::GetValue(nsAString& aValue)
 {
-  return GetSliderAttr(nsAccessibilityAtoms::curpos, aValue);
+  return GetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 PRUint8
 nsXULSliderAccessible::ActionCount()
 {
   return 1;
 }
 
@@ -132,65 +131,65 @@ NS_IMETHODIMP
 nsXULSliderAccessible::GetMaximumValue(double *aValue)
 {
   nsresult rv = nsAccessibleWrap::GetMaximumValue(aValue);
 
   // ARIA redefined maximum value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
-  return GetSliderAttr(nsAccessibilityAtoms::maxpos, aValue);
+  return GetSliderAttr(nsGkAtoms::maxpos, aValue);
 }
 
 NS_IMETHODIMP
 nsXULSliderAccessible::GetMinimumValue(double *aValue)
 {
   nsresult rv = nsAccessibleWrap::GetMinimumValue(aValue);
 
   // ARIA redefined minmum value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
-  return GetSliderAttr(nsAccessibilityAtoms::minpos, aValue);
+  return GetSliderAttr(nsGkAtoms::minpos, aValue);
 }
 
 NS_IMETHODIMP
 nsXULSliderAccessible::GetMinimumIncrement(double *aValue)
 {
   nsresult rv = nsAccessibleWrap::GetMinimumIncrement(aValue);
 
   // ARIA redefined minimum increment value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
-  return GetSliderAttr(nsAccessibilityAtoms::increment, aValue);
+  return GetSliderAttr(nsGkAtoms::increment, aValue);
 }
 
 NS_IMETHODIMP
 nsXULSliderAccessible::GetCurrentValue(double *aValue)
 {
   nsresult rv = nsAccessibleWrap::GetCurrentValue(aValue);
 
   // ARIA redefined current value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
-  return GetSliderAttr(nsAccessibilityAtoms::curpos, aValue);
+  return GetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 NS_IMETHODIMP
 nsXULSliderAccessible::SetCurrentValue(double aValue)
 {
   nsresult rv = nsAccessibleWrap::SetCurrentValue(aValue);
 
   // ARIA redefined current value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
-  return SetSliderAttr(nsAccessibilityAtoms::curpos, aValue);
+  return SetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 PRBool
 nsXULSliderAccessible::GetAllowsAnonChildAccessibles()
 {
   // Do not allow anonymous xul:slider be accessible.
   return PR_FALSE;
 }
--- a/accessible/src/xul/nsXULTextAccessible.cpp
+++ b/accessible/src/xul/nsXULTextAccessible.cpp
@@ -35,17 +35,16 @@
  * 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: groups are alphabetically ordered
 #include "nsXULTextAccessible.h"
 
-#include "nsAccessibilityAtoms.h"
 #include "nsAccUtils.h"
 #include "nsBaseWidgetAccessible.h"
 #include "nsCoreUtils.h"
 #include "nsTextEquivUtils.h"
 #include "Relation.h"
 #include "States.h"
 
 #include "nsIAccessibleRelation.h"
@@ -66,17 +65,17 @@ nsXULTextAccessible::
 {
 }
 
 nsresult
 nsXULTextAccessible::GetNameInternal(nsAString& aName)
 {
   // if the value attr doesn't exist, the screen reader must get the accessible text
   // from the accessible text interface or from the children
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, aName);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value, aName);
   return NS_OK;
 }
 
 PRUint32
 nsXULTextAccessible::NativeRole()
 {
   return nsIAccessibleRole::ROLE_LABEL;
 }
@@ -91,17 +90,17 @@ nsXULTextAccessible::NativeState()
 
 Relation
 nsXULTextAccessible::RelationByType(PRUint32 aType)
 {
   Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType);
   if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
     // Caption is the label for groupbox
     nsIContent *parent = mContent->GetParent();
-    if (parent && parent->Tag() == nsAccessibilityAtoms::caption) {
+    if (parent && parent->Tag() == nsGkAtoms::caption) {
       nsAccessible* parent = Parent();
       if (parent && parent->Role() == nsIAccessibleRole::ROLE_GROUPING)
         rel.AppendTarget(parent);
     }
   }
 
   return rel;
 }
@@ -154,24 +153,24 @@ NS_IMPL_ISUPPORTS_INHERITED1(nsXULLinkAc
 NS_IMETHODIMP
 nsXULLinkAccessible::GetValue(nsAString& aValue)
 {
   aValue.Truncate();
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::href, aValue);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::href, aValue);
   return NS_OK;
 }
 
 nsresult
 nsXULLinkAccessible::GetNameInternal(nsAString& aName)
 {
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::value, aName);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::value, aName);
   if (!aName.IsEmpty())
     return NS_OK;
 
   return nsTextEquivUtils::GetNameFromSubtree(this, aName);
 }
 
 PRUint32
 nsXULLinkAccessible::NativeRole()
@@ -250,17 +249,17 @@ nsXULLinkAccessible::EndOffset()
 
 already_AddRefed<nsIURI>
 nsXULLinkAccessible::AnchorURIAt(PRUint32 aAnchorIndex)
 {
   if (aAnchorIndex != 0)
     return nsnull;
 
   nsAutoString href;
-  mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::href, href);
+  mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::href, href);
 
   nsCOMPtr<nsIURI> baseURI = mContent->GetBaseURI();
   nsIDocument* document = mContent->GetOwnerDoc();
 
   nsIURI* anchorURI = nsnull;
   NS_NewURI(&anchorURI, href,
             document ? document->GetDocumentCharacterSet().get() : nsnull,
             baseURI);
--- a/accessible/src/xul/nsXULTreeGridAccessible.cpp
+++ b/accessible/src/xul/nsXULTreeGridAccessible.cpp
@@ -1178,24 +1178,24 @@ nsXULTreeGridCellAccessible::GetAttribut
     
   PRInt32 colIdx = GetColumnIndex();
 
   PRInt32 cellIdx = -1;
   tableAccessible->GetCellIndexAt(mRow, colIdx, &cellIdx);
 
   nsAutoString stringIdx;
   stringIdx.AppendInt(cellIdx);
-  nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::tableCellIndex,
+  nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::tableCellIndex,
                          stringIdx);
 
   // "cycles" attribute
   PRBool isCycler = PR_FALSE;
   nsresult rv = mColumn->GetCycler(&isCycler);
   if (NS_SUCCEEDED(rv) && isCycler)
-    nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::cycles,
+    nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::cycles,
                            NS_LITERAL_STRING("true"));
 
   return NS_OK;
 }
 
 PRUint32
 nsXULTreeGridCellAccessible::NativeRole()
 {
@@ -1334,17 +1334,17 @@ nsXULTreeGridCellAccessible::IsEditable(
 
   nsCOMPtr<nsIDOMElement> columnElm;
   mColumn->GetElement(getter_AddRefs(columnElm));
   if (!columnElm)
     return PR_FALSE;
 
   nsCOMPtr<nsIContent> columnContent(do_QueryInterface(columnElm));
   if (!columnContent->AttrValueIs(kNameSpaceID_None,
-                                  nsAccessibilityAtoms::editable,
-                                  nsAccessibilityAtoms::_true,
+                                  nsGkAtoms::editable,
+                                  nsGkAtoms::_true,
                                   eCaseMatters))
     return PR_FALSE;
 
   return mContent->AttrValueIs(kNameSpaceID_None,
-                               nsAccessibilityAtoms::editable,
-                               nsAccessibilityAtoms::_true, eCaseMatters);
+                               nsGkAtoms::editable,
+                               nsGkAtoms::_true, eCaseMatters);
 }
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -1894,8 +1894,85 @@ GK_ATOM(_moz_mac_lion_theme, "-moz-mac-l
 GK_ATOM(_moz_windows_compositor, "-moz-windows-compositor")
 GK_ATOM(_moz_windows_classic, "-moz-windows-classic")
 GK_ATOM(_moz_windows_theme, "-moz-windows-theme")
 GK_ATOM(_moz_touch_enabled, "-moz-touch-enabled")
 GK_ATOM(_moz_maemo_classic, "-moz-maemo-classic")
 GK_ATOM(_moz_menubar_drag, "-moz-menubar-drag")
 GK_ATOM(_moz_device_pixel_ratio, "-moz-device-pixel-ratio")
 GK_ATOM(_moz_device_orientation, "-moz-device-orientation")
+
+#ifdef ACCESSIBILITY
+GK_ATOM(anonid, "anonid")
+GK_ATOM(aria_activedescendant, "aria-activedescendant")
+GK_ATOM(aria_atomic, "aria-atomic")
+GK_ATOM(aria_autocomplete, "aria-autocomplete")
+GK_ATOM(aria_busy, "aria-busy")
+GK_ATOM(aria_checked, "aria-checked")
+GK_ATOM(aria_controls, "aria-controls")
+GK_ATOM(aria_describedby, "aria-describedby")
+GK_ATOM(aria_disabled, "aria-disabled")
+GK_ATOM(aria_dropeffect, "aria-dropeffect")
+GK_ATOM(aria_expanded, "aria-expanded")
+GK_ATOM(aria_flowto, "aria-flowto")
+GK_ATOM(aria_grabbed, "aria-grabbed")
+GK_ATOM(aria_haspopup, "aria-haspopup")
+GK_ATOM(aria_hidden, "aria-hidden")
+GK_ATOM(aria_invalid, "aria-invalid")
+GK_ATOM(aria_label, "aria-label")
+GK_ATOM(aria_labelledby, "aria-labelledby")
+GK_ATOM(aria_level, "aria-level")
+GK_ATOM(aria_live, "aria-live")
+GK_ATOM(aria_multiline, "aria-multiline")
+GK_ATOM(aria_multiselectable, "aria-multiselectable")
+GK_ATOM(aria_orientation, "aria-orientation")
+GK_ATOM(aria_owns, "aria-owns")
+GK_ATOM(aria_posinset, "aria-posinset")
+GK_ATOM(aria_pressed, "aria-pressed")
+GK_ATOM(aria_readonly, "aria-readonly")
+GK_ATOM(aria_relevant, "aria-relevant")
+GK_ATOM(aria_required, "aria-required")
+GK_ATOM(aria_selected, "aria-selected")
+GK_ATOM(aria_setsize, "aria-setsize")
+GK_ATOM(aria_sort, "aria-sort")
+GK_ATOM(aria_valuenow, "aria-valuenow")
+GK_ATOM(aria_valuemin, "aria-valuemin")
+GK_ATOM(aria_valuemax, "aria-valuemax")
+GK_ATOM(aria_valuetext, "aria-valuetext")
+GK_ATOM(AreaFrame, "AreaFrame")
+GK_ATOM(backgroundColor, "background-color")
+GK_ATOM(checkable, "checkable")
+GK_ATOM(choices, "choices")
+GK_ATOM(containerAtomic, "container-atomic")
+GK_ATOM(containerBusy, "container-busy")
+GK_ATOM(containerLive, "container-live")
+GK_ATOM(containerLiveRole, "container-live-role")
+GK_ATOM(containerRelevant, "container-relevant")
+GK_ATOM(cycles, "cycles")
+GK_ATOM(droppable, "droppable")
+GK_ATOM(eventFromInput, "event-from-input")
+GK_ATOM(InlineBlockFrame, "InlineBlockFrame")
+GK_ATOM(invalid, "invalid")
+GK_ATOM(item, "item")
+GK_ATOM(itemset, "itemset")
+GK_ATOM(language, "language")
+GK_ATOM(lineNumber, "line-number")
+GK_ATOM(linkedPanel, "linkedpanel")
+GK_ATOM(live, "live")
+GK_ATOM(mixed, "mixed")
+GK_ATOM(multiline, "multiline")
+GK_ATOM(password, "password")
+GK_ATOM(posinset, "posinset") 
+GK_ATOM(select1, "select1")
+GK_ATOM(setsize, "setsize")
+GK_ATOM(tableCellIndex, "table-cell-index")
+GK_ATOM(textAlign, "text-align")
+GK_ATOM(textIndent, "text-indent")
+GK_ATOM(textLineThroughStyle, "text-line-through-style")
+GK_ATOM(textPosition, "text-position")
+GK_ATOM(textUnderlineStyle, "text-underline-style")
+GK_ATOM(toolbarname, "toolbarname")
+GK_ATOM(toolbarseparator, "toolbarseparator")
+GK_ATOM(toolbarspacer, "toolbarspacer")
+GK_ATOM(toolbarspring, "toolbarspring")
+GK_ATOM(_undefined, "undefined")
+GK_ATOM(xmlroles, "xml-roles")
+#endif