From 42d80bc47870bd4e73b2fac5d5ea9b960829ffe2 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Wed, 8 Apr 2015 11:32:40 -0400 Subject: [PATCH] bug 1155829 - declare MaiAtkObject in nsMai.h r=yzen Next we will start adding methods to it that are used outside AccessibleWrap.cpp. --- accessible/atk/AccessibleWrap.cpp | 24 +++--------------------- accessible/atk/nsMai.h | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/accessible/atk/AccessibleWrap.cpp b/accessible/atk/AccessibleWrap.cpp index 99182af05f20..a0b8a7d17fd8 100644 --- a/accessible/atk/AccessibleWrap.cpp +++ b/accessible/atk/AccessibleWrap.cpp @@ -123,28 +123,12 @@ static const GInterfaceInfo atk_if_infos[] = { (GInterfaceFinalizeFunc) nullptr, nullptr} }; -/** - * This MaiAtkObject is a thin wrapper, in the MAI namespace, for AtkObject - */ -struct MaiAtkObject -{ - AtkObject parent; - /* - * The AccessibleWrap whose properties and features are exported - * via this object instance. - */ - uintptr_t accWrap; - - /* - * Shutdown this AtkObject. - */ - void Shutdown(); -}; - // This is or'd with the pointer in MaiAtkObject::accWrap if the wrap-ee is a // proxy. static const uintptr_t IS_PROXY = 1; +static GQuark quark_mai_hyperlink = 0; + void MaiAtkObject::Shutdown() { @@ -225,8 +209,6 @@ static const char * GetUniqueMaiAtkTypeName(uint16_t interfacesBits); static gpointer parent_class = nullptr; -static GQuark quark_mai_hyperlink = 0; - GType mai_atk_object_get_type(void) { @@ -270,7 +252,7 @@ AccessibleWrap::ShutdownAtkObject() if (!mAtkObject) return; - MOZ_ASSERT(IS_MAI_OBJECT(mAtkObject)); + NS_ASSERTION(IS_MAI_OBJECT(mAtkObject), "wrong type of atk object"); if (IS_MAI_OBJECT(mAtkObject)) MAI_ATK_OBJECT(mAtkObject)->Shutdown(); diff --git a/accessible/atk/nsMai.h b/accessible/atk/nsMai.h index 0e61086e28e9..d37cd9cab555 100644 --- a/accessible/atk/nsMai.h +++ b/accessible/atk/nsMai.h @@ -51,4 +51,22 @@ IsAtkVersionAtLeast(int aMajor, int aMinor) (aMajor == atkMajorVersion && aMinor <= atkMinorVersion); } +/** + * This MaiAtkObject is a thin wrapper, in the MAI namespace, for AtkObject + */ +struct MaiAtkObject +{ + AtkObject parent; + /* + * The AccessibleWrap whose properties and features are exported + * via this object instance. + */ + uintptr_t accWrap; + + /* + * Shutdown this AtkObject. + */ + void Shutdown(); +}; + #endif /* __NS_MAI_H__ */