Bug 899931 - Part a: Remove unused nsListControlFrame::{IsContentSelected, IsContentSelectedByIndex}; r=dzbarsky
authorMs2ger <ms2ger@gmail.com>
Fri, 02 Aug 2013 09:06:57 +0200
changeset 153237 136f1614f09240b3e9bc9032d0fe8ca70570f2ca
parent 153236 4782b24db6b3666ff979da12da29d8523efeff2b
child 153238 ad1c42bfcc98ce552a6282f6c42b2acfbed78de8
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdzbarsky
bugs899931
milestone25.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 899931 - Part a: Remove unused nsListControlFrame::{IsContentSelected, IsContentSelectedByIndex}; r=dzbarsky
layout/forms/nsListControlFrame.cpp
layout/forms/nsListControlFrame.h
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -1070,37 +1070,16 @@ nsListControlFrame::GetOption(nsIDOMHTML
       return option.forget();
     }
   } else {
     NS_ERROR("Couldn't get option by index from collection!");
   }
   return nullptr;
 }
 
-bool 
-nsListControlFrame::IsContentSelected(nsIContent* aContent) const
-{
-  bool isSelected = false;
-
-  nsCOMPtr<nsIDOMHTMLOptionElement> optEl = do_QueryInterface(aContent);
-  if (optEl)
-    optEl->GetSelected(&isSelected);
-
-  return isSelected;
-}
-
-bool 
-nsListControlFrame::IsContentSelectedByIndex(int32_t aIndex) const 
-{
-  nsCOMPtr<nsIContent> content = GetOptionContent(aIndex);
-  NS_ASSERTION(content, "Failed to retrieve option content");
-
-  return IsContentSelected(content);
-}
-
 NS_IMETHODIMP
 nsListControlFrame::OnOptionSelected(int32_t aIndex, bool aSelected)
 {
   if (aSelected) {
     ScrollToIndex(aIndex);
   }
   return NS_OK;
 }
--- a/layout/forms/nsListControlFrame.h
+++ b/layout/forms/nsListControlFrame.h
@@ -322,28 +322,16 @@ protected:
   nsresult GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent, int32_t& aCurIndex);
 
   /**
    * For a given index it returns the nsIContent object 
    * from the select.
    */
   already_AddRefed<nsIContent> GetOptionContent(int32_t aIndex) const;
 
-  /** 
-   * For a given piece of content, it determines whether the 
-   * content (an option) is selected or not.
-   * @return true if it is, false if it is NOT.
-   */
-  bool     IsContentSelected(nsIContent* aContent) const;
-
-  /**
-   * For a given index is return whether the content is selected.
-   */
-  bool     IsContentSelectedByIndex(int32_t aIndex) const;
-
   bool     CheckIfAllFramesHere();
   int32_t  GetIndexFromContent(nsIContent *aContent);
   bool     IsLeftButton(nsIDOMEvent* aMouseEvent);
 
   // guess at a row height based on our own style.
   nscoord  CalcFallbackRowHeight(float aFontSizeInflation);
 
   // CalcIntrinsicHeight computes our intrinsic height (taking the "size"