Bug 1466851 part 2. Remove some nsITreeBoxObject properties that are unused from C++. r=mossop
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 05 Jun 2018 23:01:52 -0400
changeset 421489 99016a1b41052d29a024b045bcfc4a6f47d6375f
parent 421488 5b8e7ac3a4a51ee85ec31852935aac78eed09751
child 421490 ada451d2e78d3be6d9791ba72917ac0586ad0067
push id104051
push userbzbarsky@mozilla.com
push dateWed, 06 Jun 2018 03:02:38 +0000
treeherdermozilla-inbound@ada451d2e78d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1466851
milestone62.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 1466851 part 2. Remove some nsITreeBoxObject properties that are unused from C++. r=mossop These properties are unused from C++ and the FakeTreeBoxObject implementations in comm-central are throwing stubs. So it's safe to remove the properties from nsITreeBoxObject (but not TreeBoxObject.webidl, since they're used in JS). Properties in this bucket: horizontalPosition, getPageLength.
layout/xul/tree/TreeBoxObject.cpp
layout/xul/tree/nsITreeBoxObject.idl
--- a/layout/xul/tree/TreeBoxObject.cpp
+++ b/layout/xul/tree/TreeBoxObject.cpp
@@ -301,36 +301,24 @@ NS_IMETHODIMP TreeBoxObject::GetLastVisi
 int32_t TreeBoxObject::HorizontalPosition()
 {
   nsTreeBodyFrame* body = GetTreeBodyFrame();
   if (body)
     return body->GetHorizontalPosition();
   return 0;
 }
 
-NS_IMETHODIMP TreeBoxObject::GetHorizontalPosition(int32_t *aHorizontalPosition)
-{
-  *aHorizontalPosition = HorizontalPosition();
-  return NS_OK;
-}
-
 int32_t TreeBoxObject::GetPageLength()
 {
   nsTreeBodyFrame* body = GetTreeBodyFrame();
   if (body)
     return body->PageLength();
   return 0;
 }
 
-NS_IMETHODIMP TreeBoxObject::GetPageLength(int32_t *aPageLength)
-{
-  *aPageLength = GetPageLength();
-  return NS_OK;
-}
-
 NS_IMETHODIMP TreeBoxObject::GetSelectionRegion(nsIScriptableRegion **aRegion)
 {
   *aRegion = nullptr;
   nsTreeBodyFrame* body = GetTreeBodyFrame();
   if (body)
     return body->GetSelectionRegion(aRegion);
   return NS_OK;
 }
--- a/layout/xul/tree/nsITreeBoxObject.idl
+++ b/layout/xul/tree/nsITreeBoxObject.idl
@@ -47,41 +47,31 @@ interface nsITreeBoxObject : nsISupports
   readonly attribute long rowHeight;
 
   /**
    * Obtain the width of a row.
    */
   readonly attribute long rowWidth;
 
   /**
-   * Get the pixel position of the horizontal scrollbar.
-   */
-  readonly attribute long horizontalPosition;
-
-  /**
    * Return the region for the visible parts of the selection, in device pixels.
    */
   readonly attribute nsIScriptableRegion selectionRegion;
 
   /**
    * Get the index of the first visible row.
    */
   long getFirstVisibleRow();
 
   /**
    * Get the index of the last visible row.
    */
   long getLastVisibleRow();
 
   /**
-   * Gets the number of possible visible rows.
-   */
-  long getPageLength();
-
-  /**
    * Ensures that a row at a given index is visible.
    */
   void ensureRowIsVisible(in long index);
 
   /**
    * Ensures that a given cell in the tree is visible.
    */
   void ensureCellIsVisible(in long row, in TreeColumn col);