Bug 774040 - remove unused field. r=roc.
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Sun, 15 Jul 2012 00:20:24 -0400
changeset 102062 4d18d941e2a78fd58e23b96d345cab05eabf8342
parent 102061 36990f97c3e88955a5c86ffdae09f7e81bedb40b
child 102063 d4eff6c7ddc829c77fe2c79a507cbb76a0188214
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs774040
milestone16.0a1
Bug 774040 - remove unused field. r=roc.
layout/tables/BasicTableLayoutStrategy.cpp
layout/tables/SpanningCellSorter.cpp
layout/tables/SpanningCellSorter.h
--- a/layout/tables/BasicTableLayoutStrategy.cpp
+++ b/layout/tables/BasicTableLayoutStrategy.cpp
@@ -252,17 +252,17 @@ GetColWidthInfo(nsRenderingContext *aRen
  */
 void
 BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths(nsRenderingContext* aRenderingContext)
 {
     nsTableFrame *tableFrame = mTableFrame;
     nsTableCellMap *cellMap = tableFrame->GetCellMap();
 
     mozilla::AutoStackArena arena;
-    SpanningCellSorter spanningCells(tableFrame->PresContext()->PresShell());
+    SpanningCellSorter spanningCells;
 
     // Loop over the columns to consider the columns and cells *without*
     // a colspan.
     PRInt32 col, col_end;
     for (col = 0, col_end = cellMap->GetColCount(); col < col_end; ++col) {
         nsTableColFrame *colFrame = tableFrame->GetColFrame(col);
         if (!colFrame) {
             NS_ERROR("column frames out of sync with cell map");
--- a/layout/tables/SpanningCellSorter.cpp
+++ b/layout/tables/SpanningCellSorter.cpp
@@ -9,19 +9,18 @@
  */
 
 #include "SpanningCellSorter.h"
 #include "nsQuickSort.h"
 #include "nsIPresShell.h"
 
 //#define DEBUG_SPANNING_CELL_SORTER
 
-SpanningCellSorter::SpanningCellSorter(nsIPresShell *aPresShell)
-  : mPresShell(aPresShell)
-  , mState(ADDING)
+SpanningCellSorter::SpanningCellSorter()
+  : mState(ADDING)
   , mSortedHashTable(nsnull)
 {
     memset(mArray, 0, sizeof(mArray));
     mHashTable.entryCount = 0;
 }
 
 SpanningCellSorter::~SpanningCellSorter()
 {
--- a/layout/tables/SpanningCellSorter.h
+++ b/layout/tables/SpanningCellSorter.h
@@ -17,17 +17,17 @@ class nsIPresShell;
 /**
  * The SpanningCellSorter is responsible for accumulating lists of cells
  * with colspans so that those cells can later be enumerated, sorted
  * from lowest number of columns spanned to highest.  It does not use a
  * stable sort (in fact, it currently reverses).
  */
 class NS_STACK_CLASS SpanningCellSorter {
 public:
-    SpanningCellSorter(nsIPresShell *aPresShell);
+    SpanningCellSorter();
     ~SpanningCellSorter();
 
     struct Item {
         PRInt32 row, col;
         Item *next;
     };
 
     /**
@@ -39,17 +39,16 @@ public:
 
     /**
      * Get the next *list* of cells.  Each list contains all the cells
      * for a colspan value, and the lists are given in order from lowest
      * to highest colspan.  The colspan value is filled in to *aColSpan.
      */
     Item* GetNext(PRInt32 *aColSpan);
 private:
-    nsIPresShell *mPresShell;
 
     enum State { ADDING, ENUMERATING_ARRAY, ENUMERATING_HASH, DONE };
     State mState;
 
     // store small colspans in an array for fast sorting and
     // enumeration, and large colspans in a hash table
 
     enum { ARRAY_BASE = 2 };