bug 1243077 - add AccessibleOrProxy xpcAccessible::IntlGeneric() r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Fri, 22 Jan 2016 04:05:17 -0500
changeset 282022 dbf99ea0009f26274048de9580f7339fc72b74f9
parent 282021 804f5ebbce3278ae5a1d8ef13968b71541c28c5a
child 282023 1fbe4c374125177878990e53e6133508e67ea4f2
push id29950
push usercbook@mozilla.com
push dateThu, 28 Jan 2016 11:14:03 +0000
treeherdermozilla-central@2b73b0a4d52b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1243077
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1243077 - add AccessibleOrProxy xpcAccessible::IntlGeneric() r=davidb It will be useful to get mIntl without casting it to either Accessible* or ProxyAccessible*. sadly C++ won't let us overload the name Intl() this way so for now this method is named IntlGeneric().
accessible/xpcom/xpcAccessible.h
accessible/xpcom/xpcAccessibleGeneric.h
--- a/accessible/xpcom/xpcAccessible.h
+++ b/accessible/xpcom/xpcAccessible.h
@@ -10,16 +10,17 @@
 #include "nsIAccessible.h"
 
 class nsIAccessible;
 
 namespace mozilla {
 namespace a11y {
 
 class Accessible;
+class AccessibleOrProxy;
 
 /**
  * XPCOM nsIAccessible interface implementation, used by xpcAccessibleGeneric
  * class.
  */
 class xpcAccessible : public nsIAccessible
 {
 public:
@@ -87,16 +88,17 @@ public:
                            int32_t aX, int32_t aY) final override;
 
 protected:
   xpcAccessible() { }
   virtual ~xpcAccessible() {}
 
 private:
   Accessible* Intl();
+  AccessibleOrProxy IntlGeneric();
 
   xpcAccessible(const xpcAccessible&) = delete;
   xpcAccessible& operator =(const xpcAccessible&) = delete;
 };
 
 } // namespace a11y
 } // namespace mozilla
 
--- a/accessible/xpcom/xpcAccessibleGeneric.h
+++ b/accessible/xpcom/xpcAccessibleGeneric.h
@@ -86,16 +86,22 @@ private:
 };
 
 inline Accessible*
 xpcAccessible::Intl()
 {
   return static_cast<xpcAccessibleGeneric*>(this)->mIntl.AsAccessible();
 }
 
+inline AccessibleOrProxy
+xpcAccessible::IntlGeneric()
+{
+  return static_cast<xpcAccessibleGeneric*>(this)->mIntl;
+}
+
 inline Accessible*
 xpcAccessibleHyperLink::Intl()
 {
   return static_cast<xpcAccessibleGeneric*>(this)->mIntl.AsAccessible();
 }
 
 inline Accessible*
 xpcAccessibleSelectable::Intl()