Bug 865615 - Remove Accessible::DOMNode. r=surkov
authorTokio Kajitsuka <kajitsuka-tokio@g.ecc.u-tokyo.ac.jp>
Fri, 23 Mar 2018 00:52:14 +0900
changeset 409602 a5a9d5bca98b389982d314986b9199341e38a9a2
parent 409601 a0a2092724797e534549cc2d80dc9c423bfaf43d
child 409603 dead3908b2cc7051cddf00c321d05d9a72bcbcdd
push id33693
push usernbeleuzu@mozilla.com
push dateFri, 23 Mar 2018 09:52:16 +0000
treeherdermozilla-central@9cb650de48f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs865615
milestone61.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 865615 - Remove Accessible::DOMNode. r=surkov Replace Accessible::DOMNode with Accessible::GetNode version
accessible/generic/Accessible.h
accessible/xul/XULTabAccessible.cpp
--- a/accessible/generic/Accessible.h
+++ b/accessible/generic/Accessible.h
@@ -161,21 +161,17 @@ public:
    * Return frame for this accessible.
    */
   virtual nsIFrame* GetFrame() const;
 
   /**
    * Return DOM node associated with the accessible.
    */
   virtual nsINode* GetNode() const;
-  inline already_AddRefed<nsIDOMNode> DOMNode() const
-  {
-    nsCOMPtr<nsIDOMNode> DOMNode = do_QueryInterface(GetNode());
-    return DOMNode.forget();
-  }
+
   nsIContent* GetContent() const { return mContent; }
   mozilla::dom::Element* Elm() const
     { return mContent && mContent->IsElement() ? mContent->AsElement() : nullptr; }
 
   /**
    * Return node type information of DOM node associated with the accessible.
    */
   bool IsContent() const
--- a/accessible/xul/XULTabAccessible.cpp
+++ b/accessible/xul/XULTabAccessible.cpp
@@ -109,17 +109,17 @@ XULTabAccessible::RelationByType(Relatio
     return rel;
 
   // Expose 'LABEL_FOR' relation on tab accessible for tabpanel accessible.
   nsCOMPtr<nsIDOMXULRelatedElement> tabsElm =
     do_QueryInterface(mContent->GetParent());
   if (!tabsElm)
     return rel;
 
-  nsCOMPtr<nsIDOMNode> domNode(DOMNode());
+  nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(GetNode()));
   nsCOMPtr<nsIDOMNode> tabpanelNode;
   tabsElm->GetRelatedElement(domNode, getter_AddRefs(tabpanelNode));
   if (!tabpanelNode)
     return rel;
 
   nsCOMPtr<nsIContent> tabpanelContent(do_QueryInterface(tabpanelNode));
   rel.AppendTarget(mDoc, tabpanelContent);
   return rel;
@@ -196,17 +196,17 @@ XULTabpanelAccessible::RelationByType(Re
     return rel;
 
   // Expose 'LABELLED_BY' relation on tabpanel accessible for tab accessible.
   nsCOMPtr<nsIDOMXULRelatedElement> tabpanelsElm =
     do_QueryInterface(mContent->GetParent());
   if (!tabpanelsElm)
     return rel;
 
-  nsCOMPtr<nsIDOMNode> domNode(DOMNode());
+  nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(GetNode()));
   nsCOMPtr<nsIDOMNode> tabNode;
   tabpanelsElm->GetRelatedElement(domNode, getter_AddRefs(tabNode));
   if (!tabNode)
     return rel;
 
   nsCOMPtr<nsIContent> tabContent(do_QueryInterface(tabNode));
   rel.AppendTarget(mDoc, tabContent);
   return rel;