Bug 763144 - de-ns-ify every class in XUL folder, r=surkov
authorMark Capella <markcapella@twcny.rr.com>
Sat, 09 Jun 2012 11:45:07 -0400
changeset 96258 729ca57ac518836f344e1deecd526bfa7ef6b1bc
parent 96257 5a489379b5379d417675a8d6f8053168122ca438
child 96259 f9f138abe4c31f927c06284ee6fd00ca564d5da3
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerssurkov
bugs763144
milestone16.0a1
Bug 763144 - de-ns-ify every class in XUL folder, r=surkov
accessible/src/base/nsAccessibilityService.cpp
accessible/src/mac/mozActionElements.mm
accessible/src/msaa/AccessibleWrap.h
accessible/src/xul/Makefile.in
accessible/src/xul/XULAlertAccessible.cpp
accessible/src/xul/XULAlertAccessible.h
accessible/src/xul/XULColorPickerAccessible.cpp
accessible/src/xul/XULColorPickerAccessible.h
accessible/src/xul/XULComboboxAccessible.cpp
accessible/src/xul/XULComboboxAccessible.h
accessible/src/xul/XULSliderAccessible.cpp
accessible/src/xul/XULSliderAccessible.h
accessible/src/xul/XULTabAccessible.cpp
accessible/src/xul/XULTabAccessible.h
accessible/src/xul/nsXULAlertAccessible.cpp
accessible/src/xul/nsXULAlertAccessible.h
accessible/src/xul/nsXULColorPickerAccessible.cpp
accessible/src/xul/nsXULColorPickerAccessible.h
accessible/src/xul/nsXULComboboxAccessible.cpp
accessible/src/xul/nsXULComboboxAccessible.h
accessible/src/xul/nsXULSliderAccessible.cpp
accessible/src/xul/nsXULSliderAccessible.h
accessible/src/xul/nsXULTabAccessible.cpp
accessible/src/xul/nsXULTabAccessible.h
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -62,25 +62,25 @@
 #include "nsObjectFrame.h"
 #include "nsTextFragment.h"
 #include "mozilla/FunctionTimer.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/Services.h"
 #include "mozilla/Util.h"
 
 #ifdef MOZ_XUL
-#include "nsXULAlertAccessible.h"
-#include "nsXULColorPickerAccessible.h"
-#include "nsXULComboboxAccessible.h"
-#include "nsXULSliderAccessible.h"
-#include "nsXULTabAccessible.h"
+#include "XULAlertAccessible.h"
+#include "XULColorPickerAccessible.h"
+#include "XULComboboxAccessible.h"
 #include "XULElementAccessibles.h"
 #include "XULFormControlAccessible.h"
 #include "XULListboxAccessibleWrap.h"
 #include "XULMenuAccessibleWrap.h"
+#include "XULSliderAccessible.h"
+#include "XULTabAccessible.h"
 #include "XULTreeGridAccessibleWrap.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessibilityService
@@ -1308,37 +1308,37 @@ nsAccessibilityService::CreateAccessible
   switch (type)
   {
 #ifdef MOZ_XUL
     case nsIAccessibleProvider::NoAccessible:
       return nsnull;
 
     // XUL controls
     case nsIAccessibleProvider::XULAlert:
-      accessible = new nsXULAlertAccessible(aContent, aDoc);
+      accessible = new XULAlertAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULButton:
       accessible = new XULButtonAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULCheckbox:
       accessible = new XULCheckboxAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULColorPicker:
-      accessible = new nsXULColorPickerAccessible(aContent, aDoc);
+      accessible = new XULColorPickerAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULColorPickerTile:
-      accessible = new nsXULColorPickerTileAccessible(aContent, aDoc);
+      accessible = new XULColorPickerTileAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULCombobox:
-      accessible = new nsXULComboboxAccessible(aContent, aDoc);
+      accessible = new XULComboboxAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULDropmarker:
       accessible = new XULDropmarkerAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULGroupbox:
       accessible = new XULGroupboxAccessible(aContent, aDoc);
@@ -1416,49 +1416,49 @@ nsAccessibilityService::CreateAccessible
       accessible = new XULProgressMeterAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULStatusBar:
       accessible = new XULStatusBarAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULScale:
-      accessible = new nsXULSliderAccessible(aContent, aDoc);
+      accessible = new XULSliderAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULRadioButton:
       accessible = new XULRadioButtonAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULRadioGroup:
       accessible = new XULRadioGroupAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULTab:
-      accessible = new nsXULTabAccessible(aContent, aDoc);
+      accessible = new XULTabAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULTabs:
-      accessible = new nsXULTabsAccessible(aContent, aDoc);
+      accessible = new XULTabsAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULTabpanels:
-      accessible = new nsXULTabpanelsAccessible(aContent, aDoc);
+      accessible = new XULTabpanelsAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULText:
       accessible = new XULLabelAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULTextBox:
       accessible = new XULTextFieldAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULThumb:
-      accessible = new nsXULThumbAccessible(aContent, aDoc);
+      accessible = new XULThumbAccessible(aContent, aDoc);
       break;
 
     case nsIAccessibleProvider::XULTree:
       return CreateAccessibleForXULTree(aContent, aDoc);
 
     case nsIAccessibleProvider::XULTreeColumns:
       accessible = new XULTreeColumAccessible(aContent, aDoc);
       break;
@@ -1764,17 +1764,17 @@ nsAccessibilityService::CreateAccessible
     nsIFrame* parentFrame = aFrame->GetParent();
     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(nsGkAtoms::tabpanels,
                                             kNameSpaceID_XUL)) {
-        Accessible* accessible = new nsXULTabpanelAccessible(aContent, aDoc);
+        Accessible* accessible = new XULTabpanelAccessible(aContent, aDoc);
         NS_IF_ADDREF(accessible);
         return accessible;
       }
 #endif
       Accessible* accessible = new EnumRoleAccessible(aContent, aDoc,
                                                       roles::PROPERTYPAGE);
       NS_IF_ADDREF(accessible);
       return accessible;
--- a/accessible/src/mac/mozActionElements.mm
+++ b/accessible/src/mac/mozActionElements.mm
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #import "mozActionElements.h"
 
 #import "MacUtils.h"
 #include "Accessible-inl.h"
-#include "nsXULTabAccessible.h"
+#include "XULTabAccessible.h"
 
 #include "nsObjCExceptions.h"
 
 using namespace mozilla::a11y;
 
 enum CheckboxValue {
   // these constants correspond to the values in the OS
   kUnchecked = 0,
--- a/accessible/src/msaa/AccessibleWrap.h
+++ b/accessible/src/msaa/AccessibleWrap.h
@@ -307,13 +307,9 @@ protected:
     NAVRELATION_POPUP_FOR = 0x100b,
     NAVRELATION_PARENT_WINDOW_OF = 0x100c,
     NAVRELATION_DEFAULT_BUTTON = 0x100d,
     NAVRELATION_DESCRIBED_BY = 0x100e,
     NAVRELATION_DESCRIPTION_FOR = 0x100f
   };
 };
 
-// Define unsupported wrap classes here
-typedef class nsHTMLTextFieldAccessible    nsHTMLTextFieldAccessibleWrap;
-typedef class nsXULTextFieldAccessible     nsXULTextFieldAccessibleWrap;
-
 #endif
--- a/accessible/src/xul/Makefile.in
+++ b/accessible/src/xul/Makefile.in
@@ -12,26 +12,26 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE = accessibility
 LIBRARY_NAME = accessibility_xul_s
 LIBXUL_LIBRARY = 1
 
 
 
 CPPSRCS = \
-  nsXULAlertAccessible.cpp \
-  nsXULColorPickerAccessible.cpp \
-  nsXULComboboxAccessible.cpp \
-  nsXULSliderAccessible.cpp \
-  nsXULTabAccessible.cpp \
+  XULAlertAccessible.cpp \
+  XULColorPickerAccessible.cpp \
+  XULComboboxAccessible.cpp \
   XULElementAccessibles.cpp \
   XULFormControlAccessible.cpp \
   XULListboxAccessible.cpp \
   XULMenuAccessible.cpp \
   XULSelectControlAccessible.cpp \
+  XULSliderAccessible.cpp \
+  XULTabAccessible.cpp \
   XULTreeAccessible.cpp \
   XULTreeGridAccessible.cpp \
   $(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
rename from accessible/src/xul/nsXULAlertAccessible.cpp
rename to accessible/src/xul/XULAlertAccessible.cpp
--- a/accessible/src/xul/nsXULAlertAccessible.cpp
+++ b/accessible/src/xul/XULAlertAccessible.cpp
@@ -1,62 +1,62 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsXULAlertAccessible.h"
+#include "XULAlertAccessible.h"
 
 #include "Role.h"
 #include "States.h"
 
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULAlertAccessible
+// XULAlertAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULAlertAccessible::
-  nsXULAlertAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULAlertAccessible::
+  XULAlertAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
-NS_IMPL_ISUPPORTS_INHERITED0(nsXULAlertAccessible, Accessible)
+NS_IMPL_ISUPPORTS_INHERITED0(XULAlertAccessible, Accessible)
 
 role
-nsXULAlertAccessible::NativeRole()
+XULAlertAccessible::NativeRole()
 {
   return roles::ALERT;
 }
 
 PRUint64
-nsXULAlertAccessible::NativeState()
+XULAlertAccessible::NativeState()
 {
   return Accessible::NativeState() | states::ALERT;
 }
 
 ENameValueFlag
-nsXULAlertAccessible::Name(nsString& aName)
+XULAlertAccessible::Name(nsString& aName)
 {
   // Screen readers need to read contents of alert, not the accessible name.
   // If we have both some screen readers will read the alert twice.
   aName.Truncate();
   return eNameOK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Widgets
 
 bool
-nsXULAlertAccessible::IsWidget() const
+XULAlertAccessible::IsWidget() const
 {
   return true;
 }
 
 Accessible*
-nsXULAlertAccessible::ContainerWidget() const
+XULAlertAccessible::ContainerWidget() const
 {
   // If a part of colorpicker widget.
   if (mParent && mParent->IsMenuButton())
     return mParent;
   return nsnull;
 }
rename from accessible/src/xul/nsXULAlertAccessible.h
rename to accessible/src/xul/XULAlertAccessible.h
--- a/accessible/src/xul/nsXULAlertAccessible.h
+++ b/accessible/src/xul/XULAlertAccessible.h
@@ -1,32 +1,38 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef _nsXULAlertAccessible_H_
-#define _nsXULAlertAccessible_H_
+#ifndef mozilla_a11y_XULAlertAccessible_h__
+#define mozilla_a11y_XULAlertAccessible_h__
 
 #include "AccessibleWrap.h"
 
+namespace mozilla {
+namespace a11y {
+
 /**
  * Accessible for supporting XUL alerts.
  */
 
-class nsXULAlertAccessible : public AccessibleWrap
+class XULAlertAccessible : public AccessibleWrap
 {
 public:
-  nsXULAlertAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULAlertAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // Accessible
   virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual PRUint64 NativeState();
 
   // Widgets
   virtual bool IsWidget() const;
   virtual Accessible* ContainerWidget() const;
 };
 
+} // namespace a11y
+} // namespace mozilla
+
 #endif
rename from accessible/src/xul/nsXULColorPickerAccessible.cpp
rename to accessible/src/xul/XULColorPickerAccessible.cpp
--- a/accessible/src/xul/nsXULColorPickerAccessible.cpp
+++ b/accessible/src/xul/XULColorPickerAccessible.cpp
@@ -1,148 +1,148 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsXULColorPickerAccessible.h"
+#include "XULColorPickerAccessible.h"
 
 #include "Accessible-inl.h"
 #include "nsAccUtils.h"
 #include "nsAccTreeWalker.h"
 #include "nsCoreUtils.h"
 #include "DocAccessible.h"
 #include "Role.h"
 #include "States.h"
 
 #include "nsIDOMElement.h"
 #include "nsMenuPopupFrame.h"
 
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerTileAccessible
+// XULColorPickerTileAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULColorPickerTileAccessible::
-  nsXULColorPickerTileAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULColorPickerTileAccessible::
+  XULColorPickerTileAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerTileAccessible: nsIAccessible
+// XULColorPickerTileAccessible: nsIAccessible
 
 void
-nsXULColorPickerTileAccessible::Value(nsString& aValue)
+XULColorPickerTileAccessible::Value(nsString& aValue)
 {
   aValue.Truncate();
 
   mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::color, aValue);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerTileAccessible: Accessible
+// XULColorPickerTileAccessible: Accessible
 
 role
-nsXULColorPickerTileAccessible::NativeRole()
+XULColorPickerTileAccessible::NativeRole()
 {
   return roles::PUSHBUTTON;
 }
 
 PRUint64
-nsXULColorPickerTileAccessible::NativeState()
+XULColorPickerTileAccessible::NativeState()
 {
   PRUint64 state = AccessibleWrap::NativeState();
   if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::selected))
     state |= states::SELECTED;
 
   return state;
 }
 
 PRUint64
-nsXULColorPickerTileAccessible::NativeInteractiveState() const
+XULColorPickerTileAccessible::NativeInteractiveState() const
 {
   return NativelyUnavailable() ?
     states::UNAVAILABLE : states::FOCUSABLE | states::SELECTABLE;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerTileAccessible: Widgets
+// XULColorPickerTileAccessible: Widgets
 
 Accessible*
-nsXULColorPickerTileAccessible::ContainerWidget() const
+XULColorPickerTileAccessible::ContainerWidget() const
 {
   Accessible* parent = Parent();
   if (parent) {
     Accessible* grandParent = parent->Parent();
     if (grandParent && grandParent->IsMenuButton())
       return grandParent;
   }
   return nsnull;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerAccessible
+// XULColorPickerAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULColorPickerAccessible::
-  nsXULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc) :
-  nsXULColorPickerTileAccessible(aContent, aDoc)
+XULColorPickerAccessible::
+  XULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+  XULColorPickerTileAccessible(aContent, aDoc)
 {
   mFlags |= eMenuButtonAccessible;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerAccessible: Accessible
+// XULColorPickerAccessible: Accessible
 
 PRUint64
-nsXULColorPickerAccessible::NativeState()
+XULColorPickerAccessible::NativeState()
 {
   PRUint64 state = AccessibleWrap::NativeState();
   return state | states::HASPOPUP;
 }
 
 role
-nsXULColorPickerAccessible::NativeRole()
+XULColorPickerAccessible::NativeRole()
 {
   return roles::BUTTONDROPDOWNGRID;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerAccessible: Widgets
+// XULColorPickerAccessible: Widgets
 
 bool
-nsXULColorPickerAccessible::IsWidget() const
+XULColorPickerAccessible::IsWidget() const
 {
   return true;
 }
 
 bool
-nsXULColorPickerAccessible::IsActiveWidget() const
+XULColorPickerAccessible::IsActiveWidget() const
 {
   return FocusMgr()->HasDOMFocus(mContent);
 }
 
 bool
-nsXULColorPickerAccessible::AreItemsOperable() const
+XULColorPickerAccessible::AreItemsOperable() const
 {
   Accessible* menuPopup = mChildren.SafeElementAt(0, nsnull);
   if (menuPopup) {
     nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(menuPopup->GetFrame());
     return menuPopupFrame && menuPopupFrame->IsOpen();
   }
   return false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULColorPickerAccessible: protected Accessible
+// XULColorPickerAccessible: protected Accessible
 
 void
-nsXULColorPickerAccessible::CacheChildren()
+XULColorPickerAccessible::CacheChildren()
 {
   NS_ENSURE_TRUE(mDoc,);
 
   nsAccTreeWalker walker(mDoc, mContent, true);
 
   Accessible* child = nsnull;
   while ((child = walker.NextChild())) {
     PRUint32 role = child->Role();
rename from accessible/src/xul/nsXULColorPickerAccessible.h
rename to accessible/src/xul/XULColorPickerAccessible.h
--- a/accessible/src/xul/nsXULColorPickerAccessible.h
+++ b/accessible/src/xul/XULColorPickerAccessible.h
@@ -1,54 +1,60 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef _nsXULColorPickerAccessible_H_
-#define _nsXULColorPickerAccessible_H_
+#ifndef mozilla_a11y_XULColorPickerAccessible_h__
+#define mozilla_a11y_XULColorPickerAccessible_h__
 
 #include "AccessibleWrap.h"
 
+namespace mozilla {
+namespace a11y {
+
 /**
  * Used for color button in colorpicker palette.
  */
-class nsXULColorPickerTileAccessible : public AccessibleWrap
+class XULColorPickerTileAccessible : public AccessibleWrap
 {
 public:
-  nsXULColorPickerTileAccessible(nsIContent* aContent,
-                                 DocAccessible* aDoc);
+  XULColorPickerTileAccessible(nsIContent* aContent,
+                               DocAccessible* aDoc);
 
   // Accessible
   virtual void Value(nsString& aValue);
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual PRUint64 NativeState();
   virtual PRUint64 NativeInteractiveState() const;
 
   // Widgets
   virtual Accessible* ContainerWidget() const;
 };
 
 
 /**
  * Used for colorpicker button (xul:colorpicker@type="button").
  */
-class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
+class XULColorPickerAccessible : public XULColorPickerTileAccessible
 {
 public:
-  nsXULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULColorPickerAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual PRUint64 NativeState();
 
   // Widgets
   virtual bool IsWidget() const;
   virtual bool IsActiveWidget() const;
   virtual bool AreItemsOperable() const;
 
 protected:
 
   // Accessible
   virtual void CacheChildren();
 };
 
+} // namespace a11y
+} // namespace mozilla
+
 #endif  
rename from accessible/src/xul/nsXULComboboxAccessible.cpp
rename to accessible/src/xul/XULComboboxAccessible.cpp
--- a/accessible/src/xul/nsXULComboboxAccessible.cpp
+++ b/accessible/src/xul/XULComboboxAccessible.cpp
@@ -1,51 +1,51 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsXULComboboxAccessible.h"
+#include "XULComboboxAccessible.h"
 
 #include "Accessible-inl.h"
 #include "nsAccessibilityService.h"
 #include "DocAccessible.h"
 #include "nsCoreUtils.h"
 #include "Role.h"
 #include "States.h"
 
 #include "nsIAutoCompleteInput.h"
 #include "nsIDOMXULMenuListElement.h"
 #include "nsIDOMXULSelectCntrlItemEl.h"
 
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULComboboxAccessible
+// XULComboboxAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULComboboxAccessible::
-  nsXULComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULComboboxAccessible::
+  XULComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
   if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
                             nsGkAtoms::autocomplete, eIgnoreCase))
     mFlags |= eAutoCompleteAccessible;
   else
     mFlags |= eComboboxAccessible;
 }
 
 role
-nsXULComboboxAccessible::NativeRole()
+XULComboboxAccessible::NativeRole()
 {
   return IsAutoComplete() ? roles::AUTOCOMPLETE : roles::COMBOBOX;
 }
 
 PRUint64
-nsXULComboboxAccessible::NativeState()
+XULComboboxAccessible::NativeState()
 {
   // As a nsComboboxAccessible we can have the following states:
   //     STATE_FOCUSED
   //     STATE_FOCUSABLE
   //     STATE_HASPOPUP
   //     STATE_EXPANDED
   //     STATE_COLLAPSED
 
@@ -61,17 +61,17 @@ nsXULComboboxAccessible::NativeState()
     else
       state |= states::COLLAPSED;
   }
 
   return state | states::HASPOPUP;
 }
 
 void
-nsXULComboboxAccessible::Description(nsString& aDescription)
+XULComboboxAccessible::Description(nsString& aDescription)
 {
   aDescription.Truncate();
   // Use description of currently focused option
   nsCOMPtr<nsIDOMXULMenuListElement> menuListElm(do_QueryInterface(mContent));
   if (!menuListElm)
     return;
 
   nsCOMPtr<nsIDOMXULSelectControlItemElement> focusedOptionItem;
@@ -81,53 +81,54 @@ nsXULComboboxAccessible::Description(nsS
   if (focusedOptionContent && mDoc) {
     Accessible* focusedOptionAcc = mDoc->GetAccessible(focusedOptionContent);
     if (focusedOptionAcc)
       focusedOptionAcc->Description(aDescription);
   }
 }
 
 void
-nsXULComboboxAccessible::Value(nsString& aValue)
+XULComboboxAccessible::Value(nsString& aValue)
 {
   aValue.Truncate();
 
   // The value is the option or text shown entered in the combobox.
   nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
   if (menuList)
     menuList->GetLabel(aValue);
 }
 
 bool
-nsXULComboboxAccessible::CanHaveAnonChildren()
+XULComboboxAccessible::CanHaveAnonChildren()
 {
   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
+    // use XULComboboxAccessible. We need to walk the anonymous children for these
     // so that the entry field is a child
     return true;
   }
 
   // Argument of false indicates we don't walk anonymous children for
   // menuitems
   return false;
 }
+
 PRUint8
-nsXULComboboxAccessible::ActionCount()
+XULComboboxAccessible::ActionCount()
 {
   // Just one action (click).
   return 1;
 }
 
 NS_IMETHODIMP
-nsXULComboboxAccessible::DoAction(PRUint8 aIndex)
+XULComboboxAccessible::DoAction(PRUint8 aIndex)
 {
-  if (aIndex != nsXULComboboxAccessible::eAction_Click) {
+  if (aIndex != XULComboboxAccessible::eAction_Click) {
     return NS_ERROR_INVALID_ARG;
   }
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   // Programmaticaly toggle the combo box.
   nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
@@ -135,19 +136,19 @@ nsXULComboboxAccessible::DoAction(PRUint
     return NS_ERROR_FAILURE;
   }
   bool isDroppedDown;
   menuList->GetOpen(&isDroppedDown);
   return menuList->SetOpen(!isDroppedDown);
 }
 
 NS_IMETHODIMP
-nsXULComboboxAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
+XULComboboxAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
 {
-  if (aIndex != nsXULComboboxAccessible::eAction_Click) {
+  if (aIndex != XULComboboxAccessible::eAction_Click) {
     return NS_ERROR_INVALID_ARG;
   }
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   // Our action name is the reverse of our state:
   //     if we are close -> open is our name.
@@ -167,17 +168,17 @@ nsXULComboboxAccessible::GetActionName(P
 
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Widgets
 
 bool
-nsXULComboboxAccessible::IsActiveWidget() const
+XULComboboxAccessible::IsActiveWidget() const
 {
   if (IsAutoComplete() ||
      mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::editable,
                            nsGkAtoms::_true, eIgnoreCase)) {
     PRInt32 childCount = mChildren.Length();
     for (PRInt32 idx = 0; idx < childCount; idx++) {
       Accessible* child = mChildren[idx];
       if (child->Role() == roles::ENTRY)
@@ -185,17 +186,17 @@ nsXULComboboxAccessible::IsActiveWidget(
     }
     return false;
   }
 
   return FocusMgr()->HasDOMFocus(mContent);
 }
 
 bool
-nsXULComboboxAccessible::AreItemsOperable() const
+XULComboboxAccessible::AreItemsOperable() const
 {
   if (IsAutoComplete()) {
     nsCOMPtr<nsIAutoCompleteInput> autoCompleteInputElm =
       do_QueryInterface(mContent);
     if (autoCompleteInputElm) {
       bool isOpen = false;
       autoCompleteInputElm->GetPopupOpen(&isOpen);
       return isOpen;
rename from accessible/src/xul/nsXULComboboxAccessible.h
rename to accessible/src/xul/XULComboboxAccessible.h
--- a/accessible/src/xul/nsXULComboboxAccessible.h
+++ b/accessible/src/xul/XULComboboxAccessible.h
@@ -1,40 +1,46 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef __nsXULComboboxAccessible_h__
-#define __nsXULComboboxAccessible_h__
+#ifndef mozilla_a11y_XULComboboxAccessible_h__
+#define mozilla_a11y_XULComboboxAccessible_h__
 
 #include "XULMenuAccessible.h"
 
+namespace mozilla {
+namespace a11y {
+
 /**
  * Used for XUL comboboxes like xul:menulist and autocomplete textbox.
  */
-class nsXULComboboxAccessible : public AccessibleWrap
+class XULComboboxAccessible : public AccessibleWrap
 {
 public:
   enum { eAction_Click = 0 };
 
-  nsXULComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsIAccessible
   NS_IMETHOD DoAction(PRUint8 aIndex);
   NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
 
   // Accessible
   virtual void Description(nsString& aDescription);
   virtual void Value(nsString& aValue);
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual PRUint64 NativeState();
   virtual bool CanHaveAnonChildren();
 
   // ActionAccessible
   virtual PRUint8 ActionCount();
 
   // Widgets
   virtual bool IsActiveWidget() const;
   virtual bool AreItemsOperable() const;
 };
 
+} // namespace a11y
+} // namespace mozilla
+
 #endif
rename from accessible/src/xul/nsXULSliderAccessible.cpp
rename to accessible/src/xul/XULSliderAccessible.cpp
--- a/accessible/src/xul/nsXULSliderAccessible.cpp
+++ b/accessible/src/xul/XULSliderAccessible.cpp
@@ -1,221 +1,221 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsXULSliderAccessible.h"
+#include "XULSliderAccessible.h"
 
 #include "nsAccessibilityService.h"
 #include "Role.h"
 #include "States.h"
 
 #include "nsIFrame.h"
 
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULSliderAccessible
+// XULSliderAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULSliderAccessible::
-  nsXULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULSliderAccessible::
+  XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 // nsISupports
 
-NS_IMPL_ISUPPORTS_INHERITED1(nsXULSliderAccessible,
+NS_IMPL_ISUPPORTS_INHERITED1(XULSliderAccessible,
                              AccessibleWrap,
                              nsIAccessibleValue)
 
 // Accessible
 
 role
-nsXULSliderAccessible::NativeRole()
+XULSliderAccessible::NativeRole()
 {
   return roles::SLIDER;
 }
 
 PRUint64
-nsXULSliderAccessible::NativeInteractiveState() const
+XULSliderAccessible::NativeInteractiveState() const
  {
   if (NativelyUnavailable())
     return states::UNAVAILABLE;
 
   nsIContent* sliderElm = GetSliderElement();
   if (sliderElm) {
     nsIFrame* frame = sliderElm->GetPrimaryFrame();
     if (frame && frame->IsFocusable())
       return states::FOCUSABLE;
   }
 
   return 0;
 }
 
 bool
-nsXULSliderAccessible::NativelyUnavailable() const
+XULSliderAccessible::NativelyUnavailable() const
 {
   return mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::disabled,
                                nsGkAtoms::_true, eCaseMatters);
 }
 
 // nsIAccessible
 
 void
-nsXULSliderAccessible::Value(nsString& aValue)
+XULSliderAccessible::Value(nsString& aValue)
 {
   GetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 PRUint8
-nsXULSliderAccessible::ActionCount()
+XULSliderAccessible::ActionCount()
 {
   return 1;
 }
 
 NS_IMETHODIMP
-nsXULSliderAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
+XULSliderAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
 {
   aName.Truncate();
 
   NS_ENSURE_ARG(aIndex == 0);
 
   aName.AssignLiteral("activate"); 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsXULSliderAccessible::DoAction(PRUint8 aIndex)
+XULSliderAccessible::DoAction(PRUint8 aIndex)
 {
   NS_ENSURE_ARG(aIndex == 0);
 
   nsIContent* sliderElm = GetSliderElement();
   if (sliderElm)
     DoCommand(sliderElm);
 
   return NS_OK;
 }
 
 // nsIAccessibleValue
 
 NS_IMETHODIMP
-nsXULSliderAccessible::GetMaximumValue(double *aValue)
+XULSliderAccessible::GetMaximumValue(double* aValue)
 {
   nsresult rv = AccessibleWrap::GetMaximumValue(aValue);
 
   // ARIA redefined maximum value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   return GetSliderAttr(nsGkAtoms::maxpos, aValue);
 }
 
 NS_IMETHODIMP
-nsXULSliderAccessible::GetMinimumValue(double *aValue)
+XULSliderAccessible::GetMinimumValue(double* aValue)
 {
   nsresult rv = AccessibleWrap::GetMinimumValue(aValue);
 
   // ARIA redefined minmum value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   return GetSliderAttr(nsGkAtoms::minpos, aValue);
 }
 
 NS_IMETHODIMP
-nsXULSliderAccessible::GetMinimumIncrement(double *aValue)
+XULSliderAccessible::GetMinimumIncrement(double* aValue)
 {
   nsresult rv = AccessibleWrap::GetMinimumIncrement(aValue);
 
   // ARIA redefined minimum increment value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   return GetSliderAttr(nsGkAtoms::increment, aValue);
 }
 
 NS_IMETHODIMP
-nsXULSliderAccessible::GetCurrentValue(double *aValue)
+XULSliderAccessible::GetCurrentValue(double* aValue)
 {
   nsresult rv = AccessibleWrap::GetCurrentValue(aValue);
 
   // ARIA redefined current value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   return GetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 NS_IMETHODIMP
-nsXULSliderAccessible::SetCurrentValue(double aValue)
+XULSliderAccessible::SetCurrentValue(double aValue)
 {
   nsresult rv = AccessibleWrap::SetCurrentValue(aValue);
 
   // ARIA redefined current value.
   if (rv != NS_OK_NO_ARIA_VALUE)
     return rv;
 
   return SetSliderAttr(nsGkAtoms::curpos, aValue);
 }
 
 bool
-nsXULSliderAccessible::CanHaveAnonChildren()
+XULSliderAccessible::CanHaveAnonChildren()
 {
   // Do not allow anonymous xul:slider be accessible.
   return false;
 }
 
 // Utils
 
 nsIContent*
-nsXULSliderAccessible::GetSliderElement() const
+XULSliderAccessible::GetSliderElement() const
 {
   if (!mSliderNode) {
     // XXX: we depend on anonymous content.
     mSliderNode = mContent->OwnerDoc()->
       GetAnonymousElementByAttribute(mContent, nsGkAtoms::anonid,
                                      NS_LITERAL_STRING("slider"));
   }
 
   return mSliderNode;
 }
 
 nsresult
-nsXULSliderAccessible::GetSliderAttr(nsIAtom *aName, nsAString& aValue)
+XULSliderAccessible::GetSliderAttr(nsIAtom* aName, nsAString& aValue)
 {
   aValue.Truncate();
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsIContent* sliderElm = GetSliderElement();
   if (sliderElm)
     sliderElm->GetAttr(kNameSpaceID_None, aName, aValue);
 
   return NS_OK;
 }
 
 nsresult
-nsXULSliderAccessible::SetSliderAttr(nsIAtom *aName, const nsAString& aValue)
+XULSliderAccessible::SetSliderAttr(nsIAtom* aName, const nsAString& aValue)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsIContent* sliderElm = GetSliderElement();
   if (sliderElm)
     sliderElm->SetAttr(kNameSpaceID_None, aName, aValue, true);
 
   return NS_OK;
 }
 
 nsresult
-nsXULSliderAccessible::GetSliderAttr(nsIAtom *aName, double *aValue)
+XULSliderAccessible::GetSliderAttr(nsIAtom* aName, double* aValue)
 {
   NS_ENSURE_ARG_POINTER(aValue);
   *aValue = 0;
 
   nsAutoString attrValue;
   nsresult rv = GetSliderAttr(aName, attrValue);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -227,36 +227,36 @@ nsXULSliderAccessible::GetSliderAttr(nsI
   double value = attrValue.ToDouble(&error);
   if (NS_SUCCEEDED(error))
     *aValue = value;
 
   return NS_OK;
 }
 
 nsresult
-nsXULSliderAccessible::SetSliderAttr(nsIAtom *aName, double aValue)
+XULSliderAccessible::SetSliderAttr(nsIAtom* aName, double aValue)
 {
   nsAutoString value;
   value.AppendFloat(aValue);
 
   return SetSliderAttr(aName, value);
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULThumbAccessible
+// XULThumbAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULThumbAccessible::
-  nsXULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULThumbAccessible::
+  XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULThumbAccessible: Accessible
+// XULThumbAccessible: Accessible
 
 role
-nsXULThumbAccessible::NativeRole()
+XULThumbAccessible::NativeRole()
 {
   return roles::INDICATOR;
 }
 
rename from accessible/src/xul/nsXULSliderAccessible.h
rename to accessible/src/xul/XULSliderAccessible.h
--- a/accessible/src/xul/nsXULSliderAccessible.h
+++ b/accessible/src/xul/XULSliderAccessible.h
@@ -1,41 +1,44 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef _nsXULSliderAccessible_H_
-#define _nsXULSliderAccessible_H_
+#ifndef mozilla_a11y_XULSliderAccessible_h__
+#define mozilla_a11y_XULSliderAccessible_h__
 
 #include "AccessibleWrap.h"
 
 #include "nsIDOMElement.h"
 
+namespace mozilla {
+namespace a11y {
+
 /**
  * Used for XUL slider and scale elements.
  */
-class nsXULSliderAccessible : public AccessibleWrap
+class XULSliderAccessible : public AccessibleWrap
 {
 public:
-  nsXULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessible
   NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
   NS_IMETHOD DoAction(PRUint8 aIndex);
 
   // nsIAccessibleValue
   NS_DECL_NSIACCESSIBLEVALUE
 
   // Accessible
   virtual void Value(nsString& aValue);
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual PRUint64 NativeInteractiveState() const;
   virtual bool NativelyUnavailable() const;
   virtual bool CanHaveAnonChildren();
 
   // ActionAccessible
   virtual PRUint8 ActionCount();
 
 protected:
@@ -53,19 +56,22 @@ protected:
 private:
   mutable nsCOMPtr<nsIContent> mSliderNode;
 };
 
 
 /**
  * Used for slider's thumb element.
  */
-class nsXULThumbAccessible : public AccessibleWrap
+class XULThumbAccessible : public AccessibleWrap
 {
 public:
-  nsXULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULThumbAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
 };
 
+} // namespace a11y
+} // namespace mozilla
+
 #endif
 
rename from accessible/src/xul/nsXULTabAccessible.cpp
rename to accessible/src/xul/XULTabAccessible.cpp
--- a/accessible/src/xul/nsXULTabAccessible.cpp
+++ b/accessible/src/xul/XULTabAccessible.cpp
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsXULTabAccessible.h"
+#include "XULTabAccessible.h"
 
 #include "nsAccUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 
 // NOTE: alphabetically ordered
 #include "nsIAccessibleRelation.h"
@@ -17,70 +17,72 @@
 #include "nsIDOMDocument.h"
 #include "nsIDOMXULSelectCntrlEl.h"
 #include "nsIDOMXULSelectCntrlItemEl.h"
 #include "nsIDOMXULRelatedElement.h"
 
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULTabAccessible
+// XULTabAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULTabAccessible::
-  nsXULTabAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULTabAccessible::
+  XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULTabAccessible: nsIAccessible
+// XULTabAccessible: nsIAccessible
 
 PRUint8
-nsXULTabAccessible::ActionCount()
+XULTabAccessible::ActionCount()
 {
   return 1;
 }
 
 /** Return the name of our only action  */
-NS_IMETHODIMP nsXULTabAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
+NS_IMETHODIMP
+XULTabAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
 {
   if (aIndex == eAction_Switch) {
     aName.AssignLiteral("switch"); 
     return NS_OK;
   }
   return NS_ERROR_INVALID_ARG;
 }
 
 /** Tell the tab to do its action */
-NS_IMETHODIMP nsXULTabAccessible::DoAction(PRUint8 index)
+NS_IMETHODIMP
+XULTabAccessible::DoAction(PRUint8 index)
 {
   if (index == eAction_Switch) {
     nsCOMPtr<nsIDOMXULElement> tab(do_QueryInterface(mContent));
     if ( tab )
     {
       tab->Click();
       return NS_OK;
     }
     return NS_ERROR_FAILURE;
   }
   return NS_ERROR_INVALID_ARG;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULTabAccessible: Accessible
+// XULTabAccessible: Accessible
 
 role
-nsXULTabAccessible::NativeRole()
+XULTabAccessible::NativeRole()
 {
   return roles::PAGETAB;
 }
 
 PRUint64
-nsXULTabAccessible::NativeState()
+XULTabAccessible::NativeState()
 {
   // Possible states: focused, focusable, unavailable(disabled), offscreen.
 
   // get focus and disable status from base class
   PRUint64 state = AccessibleWrap::NativeState();
 
   // Check whether the tab is selected
   nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mContent));
@@ -88,25 +90,25 @@ nsXULTabAccessible::NativeState()
     bool selected = false;
     if (NS_SUCCEEDED(tab->GetSelected(&selected)) && selected)
       state |= states::SELECTED;
   }
   return state;
 }
 
 PRUint64
-nsXULTabAccessible::NativeInteractiveState() const
+XULTabAccessible::NativeInteractiveState() const
 {
   PRUint64 state = Accessible::NativeInteractiveState();
   return (state & states::UNAVAILABLE) ? state : state | states::SELECTABLE;
 }
 
 // nsIAccessible
 Relation
-nsXULTabAccessible::RelationByType(PRUint32 aType)
+XULTabAccessible::RelationByType(PRUint32 aType)
 {
   Relation rel = AccessibleWrap::RelationByType(aType);
   if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR)
     return rel;
 
   // Expose 'LABEL_FOR' relation on tab accessible for tabpanel accessible.
   nsCOMPtr<nsIDOMXULRelatedElement> tabsElm =
     do_QueryInterface(mContent->GetParent());
@@ -121,86 +123,86 @@ nsXULTabAccessible::RelationByType(PRUin
 
   nsCOMPtr<nsIContent> tabpanelContent(do_QueryInterface(tabpanelNode));
   rel.AppendTarget(mDoc, tabpanelContent);
   return rel;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULTabsAccessible
+// XULTabsAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULTabsAccessible::
-  nsXULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULTabsAccessible::
+  XULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   XULSelectControlAccessible(aContent, aDoc)
 {
 }
 
 role
-nsXULTabsAccessible::NativeRole()
+XULTabsAccessible::NativeRole()
 {
   return roles::PAGETABLIST;
 }
 
 PRUint8
-nsXULTabsAccessible::ActionCount()
+XULTabsAccessible::ActionCount()
 {
   return 0;
 }
 
 void
-nsXULTabsAccessible::Value(nsString& aValue)
+XULTabsAccessible::Value(nsString& aValue)
 {
   aValue.Truncate();
 }
 
 nsresult
-nsXULTabsAccessible::GetNameInternal(nsAString& aName)
+XULTabsAccessible::GetNameInternal(nsAString& aName)
 {
   // no name
   return NS_OK;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULTabpanelsAccessible
+// XULTabpanelsAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULTabpanelsAccessible::
-  nsXULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULTabpanelsAccessible::
+  XULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 role
-nsXULTabpanelsAccessible::NativeRole()
+XULTabpanelsAccessible::NativeRole()
 {
   return roles::PANE;
 }
 
 
 ////////////////////////////////////////////////////////////////////////////////
-// nsXULTabpanelAccessible
+// XULTabpanelAccessible
 ////////////////////////////////////////////////////////////////////////////////
 
-nsXULTabpanelAccessible::
-  nsXULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
+XULTabpanelAccessible::
+  XULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
   AccessibleWrap(aContent, aDoc)
 {
 }
 
 role
-nsXULTabpanelAccessible::NativeRole()
+XULTabpanelAccessible::NativeRole()
 {
   return roles::PROPERTYPAGE;
 }
 
 Relation
-nsXULTabpanelAccessible::RelationByType(PRUint32 aType)
+XULTabpanelAccessible::RelationByType(PRUint32 aType)
 {
   Relation rel = AccessibleWrap::RelationByType(aType);
   if (aType != nsIAccessibleRelation::RELATION_LABELLED_BY)
     return rel;
 
   // Expose 'LABELLED_BY' relation on tabpanel accessible for tab accessible.
   nsCOMPtr<nsIDOMXULRelatedElement> tabpanelsElm =
     do_QueryInterface(mContent->GetParent());
rename from accessible/src/xul/nsXULTabAccessible.h
rename to accessible/src/xul/XULTabAccessible.h
--- a/accessible/src/xul/nsXULTabAccessible.h
+++ b/accessible/src/xul/XULTabAccessible.h
@@ -1,90 +1,96 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef _nsXULTabAccessible_H_
-#define _nsXULTabAccessible_H_
+#ifndef mozilla_a11y_XULTabAccessible_h__
+#define mozilla_a11y_XULTabAccessible_h__
 
 // NOTE: alphabetically ordered
 #include "XULMenuAccessible.h"
 #include "XULSelectControlAccessible.h"
 
+namespace mozilla {
+namespace a11y {
+
 /**
  * An individual tab, xul:tab element.
  */
-class nsXULTabAccessible : public AccessibleWrap
+class XULTabAccessible : public AccessibleWrap
 {
 public:
   enum { eAction_Switch = 0 };
 
-  nsXULTabAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // nsIAccessible
   NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
   NS_IMETHOD DoAction(PRUint8 index);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual PRUint64 NativeState();
   virtual PRUint64 NativeInteractiveState() const;
   virtual Relation RelationByType(PRUint32 aType);
 
   // ActionAccessible
   virtual PRUint8 ActionCount();
 };
 
 
 /**
  * A container of tab objects, xul:tabs element.
  */
-class nsXULTabsAccessible : public XULSelectControlAccessible
+class XULTabsAccessible : public XULSelectControlAccessible
 {
 public:
-  nsXULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
   virtual void Value(nsString& aValue);
   virtual nsresult GetNameInternal(nsAString& aName);
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
 
   // ActionAccessible
   virtual PRUint8 ActionCount();
 };
 
 
 /** 
  * A container of tab panels, xul:tabpanels element.
  */
-class nsXULTabpanelsAccessible : public AccessibleWrap
+class XULTabpanelsAccessible : public AccessibleWrap
 {
 public:
-  nsXULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
 };
 
 
 /**
  * A tabpanel object, child elements of xul:tabpanels element. Note,the object
  * is created from nsAccessibilityService::GetAccessibleForDeckChildren()
  * method and we do not use nsIAccessibleProvider interface here because
  * all children of xul:tabpanels element acts as xul:tabpanel element.
  *
  * XXX: we need to move the class logic into generic class since
  * for example we do not create instance of this class for XUL textbox used as
  * a tabpanel.
  */
-class nsXULTabpanelAccessible : public AccessibleWrap
+class XULTabpanelAccessible : public AccessibleWrap
 {
 public:
-  nsXULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc);
+  XULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc);
 
   // Accessible
-  virtual mozilla::a11y::role NativeRole();
+  virtual a11y::role NativeRole();
   virtual Relation RelationByType(PRUint32 aType);
 };
 
+} // namespace a11y
+} // namespace mozilla
+
 #endif