Bug 735136 - get rid of nsHTMLSelectOptionAccessibleGetPositionAndSizeInternal, r=tbsaunde, f=surkov
authorMark Capella <markcapella@twcny.rr.com>
Tue, 20 Mar 2012 10:23:39 +0900
changeset 89786 14cb8f3effcbeb04e5c66a969c67a51040d7c488
parent 89785 2d2525447715e922bf581c531d68339847e31cde
child 89787 47e84e1cc50f5dea0d0104d773b95633519637ac
push id7318
push usersurkov.alexander@gmail.com
push dateTue, 20 Mar 2012 01:23:58 +0000
treeherdermozilla-inbound@14cb8f3effcb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs735136
milestone14.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 735136 - get rid of nsHTMLSelectOptionAccessibleGetPositionAndSizeInternal, r=tbsaunde, f=surkov
accessible/src/html/nsHTMLSelectAccessible.cpp
accessible/src/html/nsHTMLSelectAccessible.h
--- a/accessible/src/html/nsHTMLSelectAccessible.cpp
+++ b/accessible/src/html/nsHTMLSelectAccessible.cpp
@@ -342,41 +342,16 @@ nsHTMLSelectOptionAccessible::GetLevelIn
     parentContent->NodeInfo()->Equals(nsGkAtoms::optgroup) ? 2 : 1;
 
   if (level == 1 && Role() != roles::HEADING)
     level = 0; // In a single level list, the level is irrelevant
 
   return level;
 }
 
-void
-nsHTMLSelectOptionAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
-                                                         PRInt32 *aSetSize)
-{
-  PRInt32 posInSet = 0, setSize = 0;
-  bool isContentFound = false;
-
-  nsIContent* parentContent = mContent->GetParent();
-  for (nsIContent* childContent = parentContent->GetFirstChild(); childContent;
-       childContent = childContent->GetNextSibling()) {
-    if (childContent->NodeInfo()->Equals(mContent->NodeInfo())) {
-      if (!isContentFound) {
-        if (childContent == mContent)
-          isContentFound = true;
-
-        posInSet++;
-      }
-      setSize++;
-    }
-  }
-
-  *aSetSize = setSize;
-  *aPosInSet = posInSet;
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 // nsHTMLSelectOptionAccessible: nsIAccessible
 
 /** select us! close combo box if necessary*/
 NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
 {
   if (aIndex == eAction_Select) {
     aName.AssignLiteral("select"); 
--- a/accessible/src/html/nsHTMLSelectAccessible.h
+++ b/accessible/src/html/nsHTMLSelectAccessible.h
@@ -117,18 +117,16 @@ public:
   NS_IMETHOD SetSelected(bool aSelect);
 
   // nsAccessible
   virtual nsresult GetNameInternal(nsAString& aName);
   virtual mozilla::a11y::role NativeRole();
   virtual PRUint64 NativeState();
 
   virtual PRInt32 GetLevelInternal();
-  virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
-                                          PRInt32 *aSetSize);
 
   // ActionAccessible
   virtual PRUint8 ActionCount();
 
   // Widgets
   virtual nsAccessible* ContainerWidget() const;
 
 protected: