From a1748be3b4b3aaf35fb2d70e08993c0fda93f3cf Mon Sep 17 00:00:00 2001 From: Mark Capella Date: Wed, 6 Jun 2012 06:27:51 -0400 Subject: [PATCH] Bug 759309 - de-ns-ify nsHTMLCanvasAccessible, r=surkov --HG-- rename : accessible/src/html/nsHTMLCanvasAccessible.cpp => accessible/src/html/HTMLCanvasAccessible.cpp rename : accessible/src/html/nsHTMLCanvasAccessible.h => accessible/src/html/HTMLCanvasAccessible.h --- accessible/src/base/nsAccessibilityService.cpp | 4 ++-- ...Accessible.cpp => HTMLCanvasAccessible.cpp} | 8 ++++---- ...nvasAccessible.h => HTMLCanvasAccessible.h} | 18 ++++++++++++------ accessible/src/html/Makefile.in | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) rename accessible/src/html/{nsHTMLCanvasAccessible.cpp => HTMLCanvasAccessible.cpp} (71%) rename accessible/src/html/{nsHTMLCanvasAccessible.h => HTMLCanvasAccessible.h} (52%) diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index f970df06614..a2bf0b63dd3 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -14,6 +14,7 @@ #endif #include "DocAccessible-inl.h" #include "FocusManager.h" +#include "HTMLCanvasAccessible.h" #include "HTMLElementAccessibles.h" #include "HTMLImageMapAccessible.h" #include "HTMLLinkAccessible.h" @@ -24,7 +25,6 @@ #include "nsAccUtils.h" #include "nsARIAMap.h" #include "nsIAccessibleProvider.h" -#include "nsHTMLCanvasAccessible.h" #include "nsHTMLTableAccessibleWrap.h" #include "nsXFormsFormControlsAccessible.h" #include "nsXFormsWidgetsAccessible.h" @@ -236,7 +236,7 @@ nsAccessibilityService::CreateHTMLCanvasAccessible(nsIContent* aContent, nsIPresShell* aPresShell) { Accessible* accessible = - new nsHTMLCanvasAccessible(aContent, GetDocAccessible(aPresShell)); + new HTMLCanvasAccessible(aContent, GetDocAccessible(aPresShell)); NS_ADDREF(accessible); return accessible; } diff --git a/accessible/src/html/nsHTMLCanvasAccessible.cpp b/accessible/src/html/HTMLCanvasAccessible.cpp similarity index 71% rename from accessible/src/html/nsHTMLCanvasAccessible.cpp rename to accessible/src/html/HTMLCanvasAccessible.cpp index c3d25adc130..a088b8ec260 100644 --- a/accessible/src/html/nsHTMLCanvasAccessible.cpp +++ b/accessible/src/html/HTMLCanvasAccessible.cpp @@ -3,20 +3,20 @@ * 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 "nsHTMLCanvasAccessible.h" +#include "HTMLCanvasAccessible.h" #include "Role.h" using namespace mozilla::a11y; -nsHTMLCanvasAccessible:: - nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc) : +HTMLCanvasAccessible:: + HTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc) : HyperTextAccessible(aContent, aDoc) { } role -nsHTMLCanvasAccessible::NativeRole() +HTMLCanvasAccessible::NativeRole() { return roles::CANVAS; } diff --git a/accessible/src/html/nsHTMLCanvasAccessible.h b/accessible/src/html/HTMLCanvasAccessible.h similarity index 52% rename from accessible/src/html/nsHTMLCanvasAccessible.h rename to accessible/src/html/HTMLCanvasAccessible.h index 8b79bc1686d..447689a7a2b 100644 --- a/accessible/src/html/nsHTMLCanvasAccessible.h +++ b/accessible/src/html/HTMLCanvasAccessible.h @@ -5,20 +5,26 @@ #include "HyperTextAccessible.h" -#ifndef _nsHTMLCanvasAccessible_H_ -#define _nsHTMLCanvasAccessible_H_ +#ifndef mozilla_a11y_HTMLCanvasAccessible_h__ +#define mozilla_a11y_HTMLCanvasAccessible_h__ + +namespace mozilla { +namespace a11y { /** * HTML canvas accessible (html:canvas). */ -class nsHTMLCanvasAccessible : public HyperTextAccessible +class HTMLCanvasAccessible : public HyperTextAccessible { public: - nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc); - virtual ~nsHTMLCanvasAccessible() { } + HTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc); + virtual ~HTMLCanvasAccessible() { } // Accessible - virtual mozilla::a11y::role NativeRole(); + virtual a11y::role NativeRole(); }; +} // namespace a11y +} // namespace mozilla + #endif diff --git a/accessible/src/html/Makefile.in b/accessible/src/html/Makefile.in index 7fd5cb0c559..09b4a049349 100644 --- a/accessible/src/html/Makefile.in +++ b/accessible/src/html/Makefile.in @@ -17,13 +17,13 @@ LIBXUL_LIBRARY = 1 CPPSRCS = \ + HTMLCanvasAccessible.cpp \ HTMLElementAccessibles.cpp \ HTMLFormControlAccessible.cpp \ HTMLImageMapAccessible.cpp \ HTMLLinkAccessible.cpp \ HTMLListAccessible.cpp \ HTMLSelectAccessible.cpp \ - nsHTMLCanvasAccessible.cpp \ nsHTMLTableAccessible.cpp \ $(NULL)