bug 1155829 - remove MaiHyperlink::Initialize r=surkov
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Tue, 07 Apr 2015 15:39:39 -0400
changeset 240256 5a16a3825802963b523479515d255b38d92786b6
parent 240255 a83c90ceb41f0ac166fd81a819be602c9dbe63a3
child 240257 86d231dcc30cfd654edbe6311c923914df7f1642
push id28627
push userkwierso@gmail.com
push dateTue, 21 Apr 2015 22:25:44 +0000
treeherdermozilla-central@fcbc5a4f5bb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1155829
milestone40.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 1155829 - remove MaiHyperlink::Initialize r=surkov
accessible/atk/nsMaiHyperlink.cpp
accessible/atk/nsMaiHyperlink.h
--- a/accessible/atk/nsMaiHyperlink.cpp
+++ b/accessible/atk/nsMaiHyperlink.cpp
@@ -116,38 +116,21 @@ MaiHyperlink::GetAtkHyperlink(void)
     return nullptr;
 
     mMaiAtkHyperlink =
         reinterpret_cast<AtkHyperlink *>
                         (g_object_new(mai_atk_hyperlink_get_type(), nullptr));
     NS_ASSERTION(mMaiAtkHyperlink, "OUT OF MEMORY");
     NS_ENSURE_TRUE(mMaiAtkHyperlink, nullptr);
 
-    /* be sure to initialize it with "this" */
-    MaiHyperlink::Initialize(mMaiAtkHyperlink, this);
+    MAI_ATK_HYPERLINK(mMaiAtkHyperlink)->maiHyperlink = this;
 
     return mMaiAtkHyperlink;
 }
 
-/* static */
-
-/* remember to call this static function when a MaiAtkHyperlink
- * is created
- */
-
-nsresult
-MaiHyperlink::Initialize(AtkHyperlink *aObj, MaiHyperlink *aHyperlink)
-{
-    NS_ENSURE_ARG(MAI_IS_ATK_HYPERLINK(aObj));
-    NS_ENSURE_ARG(aHyperlink);
-
-    /* initialize hyperlink */
-    MAI_ATK_HYPERLINK(aObj)->maiHyperlink = aHyperlink;
-    return NS_OK;
-}
 
 /* static functions for ATK callbacks */
 
 void
 classInitCB(AtkHyperlinkClass *aClass)
 {
     GObjectClass *gobject_class = G_OBJECT_CLASS(aClass);
 
--- a/accessible/atk/nsMaiHyperlink.h
+++ b/accessible/atk/nsMaiHyperlink.h
@@ -29,16 +29,14 @@ public:
 public:
   AtkHyperlink *GetAtkHyperlink(void);
   Accessible* GetAccHyperlink()
     { return mHyperlink && mHyperlink->IsLink() ? mHyperlink : nullptr; }
 
 protected:
   Accessible* mHyperlink;
   AtkHyperlink* mMaiAtkHyperlink;
-public:
-  static nsresult Initialize(AtkHyperlink *aObj, MaiHyperlink *aClass);
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif /* __MAI_HYPERLINK_H__ */