Bug 670148, remove nsIBoxLayout, r=roc
authorNeil Deakin <neil@mozilla.com>
Mon, 11 Jul 2011 10:05:10 -0400
changeset 73390 8c274d9831204f6fb654c5d178caa723b2fe4222
parent 73389 b905a7aa518a3cc181ea92f366ddfa62c9aff3f5
child 73409 b4c5b68a76a40badd67e01757b8b32afb7eecc7b
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs670148
milestone8.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 670148, remove nsIBoxLayout, r=roc
layout/base/nsCSSFrameConstructor.cpp
layout/generic/nsIFrame.h
layout/xul/base/src/grid/nsGrid.cpp
layout/xul/base/src/grid/nsGridLayout2.cpp
layout/xul/base/src/grid/nsGridLayout2.h
layout/xul/base/src/grid/nsGridRowGroupFrame.cpp
layout/xul/base/src/grid/nsGridRowGroupFrame.h
layout/xul/base/src/grid/nsGridRowGroupLayout.cpp
layout/xul/base/src/grid/nsGridRowGroupLayout.h
layout/xul/base/src/grid/nsGridRowLayout.cpp
layout/xul/base/src/grid/nsGridRowLayout.h
layout/xul/base/src/grid/nsGridRowLeafFrame.cpp
layout/xul/base/src/grid/nsGridRowLeafFrame.h
layout/xul/base/src/grid/nsGridRowLeafLayout.cpp
layout/xul/base/src/grid/nsGridRowLeafLayout.h
layout/xul/base/src/grid/nsIGridPart.h
layout/xul/base/src/nsBox.cpp
layout/xul/base/src/nsBoxFrame.cpp
layout/xul/base/src/nsBoxFrame.h
layout/xul/base/src/nsBoxLayout.cpp
layout/xul/base/src/nsBoxLayout.h
layout/xul/base/src/nsDeckFrame.cpp
layout/xul/base/src/nsIBoxLayout.h
layout/xul/base/src/nsListBoxBodyFrame.cpp
layout/xul/base/src/nsListBoxBodyFrame.h
layout/xul/base/src/nsListBoxLayout.cpp
layout/xul/base/src/nsListBoxLayout.h
layout/xul/base/src/nsListItemFrame.cpp
layout/xul/base/src/nsListItemFrame.h
layout/xul/base/src/nsMenuPopupFrame.cpp
layout/xul/base/src/nsRootBoxFrame.cpp
layout/xul/base/src/nsSprocketLayout.cpp
layout/xul/base/src/nsSprocketLayout.h
layout/xul/base/src/nsStackFrame.cpp
layout/xul/base/src/nsStackLayout.cpp
layout/xul/base/src/nsStackLayout.h
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -102,17 +102,17 @@
 #include "nsRuleNode.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsChildIterator.h"
 #include "nsCSSRendering.h"
 #include "nsLayoutErrors.h"
 #include "nsLayoutUtils.h"
 #include "nsAutoPtr.h"
 #include "nsBoxFrame.h"
-#include "nsIBoxLayout.h"
+#include "nsBoxLayout.h"
 #include "nsImageFrame.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsContentErrors.h"
 #include "nsIPrincipal.h"
 #include "nsIDOMWindowInternal.h"
 #include "nsStyleUtil.h"
 #include "nsBox.h"
 #include "nsTArray.h"
@@ -313,17 +313,17 @@ NS_NewMenuFrame (nsIPresShell* aPresShel
 nsIFrame*
 NS_NewMenuBarFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 nsIFrame*
 NS_NewTreeBodyFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 // grid
 nsresult
-NS_NewGridLayout2 ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
+NS_NewGridLayout2 ( nsIPresShell* aPresShell, nsBoxLayout** aNewLayout );
 nsIFrame*
 NS_NewGridRowLeafFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewGridRowGroupFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 // end grid
 
 nsIFrame*
@@ -3942,17 +3942,17 @@ PRBool IsXULDisplayType(const nsStyleDis
   { _int, SIMPLE_XUL_FCDATA(_func) }
 #define SCROLLABLE_XUL_INT_CREATE(_int, _func)                          \
   { _int, SCROLLABLE_XUL_FCDATA(_func) }
 
 static
 nsIFrame* NS_NewGridBoxFrame(nsIPresShell* aPresShell,
                              nsStyleContext* aStyleContext)
 {
-  nsCOMPtr<nsIBoxLayout> layout;
+  nsCOMPtr<nsBoxLayout> layout;
   NS_NewGridLayout2(aPresShell, getter_AddRefs(layout));
   if (!layout) {
     return nsnull;
   }
 
   return NS_NewBoxFrame(aPresShell, aStyleContext, PR_FALSE, layout);
 }
 
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -86,17 +86,17 @@ class nsIAtom;
 class nsPresContext;
 class nsIPresShell;
 class nsRenderingContext;
 class nsIView;
 class nsIWidget;
 class nsIDOMRange;
 class nsISelectionController;
 class nsBoxLayoutState;
-class nsIBoxLayout;
+class nsBoxLayout;
 class nsILineIterator;
 #ifdef ACCESSIBILITY
 class nsAccessible;
 #endif
 class nsDisplayListBuilder;
 class nsDisplayListSet;
 class nsDisplayList;
 class gfxSkipChars;
@@ -2589,18 +2589,18 @@ NS_PTR_TO_INT32(frame->Properties().Get(
     return (mParent && mParent->IsBoxFrame()) ? mParent : nsnull;
   }
   // Box methods.  Note that these do NOT just get the CSS border, padding,
   // etc.  They also talk to nsITheme.
   NS_IMETHOD GetBorderAndPadding(nsMargin& aBorderAndPadding);
   NS_IMETHOD GetBorder(nsMargin& aBorder)=0;
   NS_IMETHOD GetPadding(nsMargin& aBorderAndPadding)=0;
   NS_IMETHOD GetMargin(nsMargin& aMargin)=0;
-  virtual void SetLayoutManager(nsIBoxLayout* aLayout) { }
-  virtual nsIBoxLayout* GetLayoutManager() { return nsnull; }
+  virtual void SetLayoutManager(nsBoxLayout* aLayout) { }
+  virtual nsBoxLayout* GetLayoutManager() { return nsnull; }
   NS_HIDDEN_(nsresult) GetClientRect(nsRect& aContentRect);
 
   // For nsSprocketLayout
   virtual Valignment GetVAlign() const = 0;
   virtual Halignment GetHAlign() const = 0;
 
   PRBool IsHorizontal() const { return (mState & NS_STATE_IS_HORIZONTAL) != 0; }
   PRBool IsNormalDirection() const { return (mState & NS_STATE_IS_DIRECTION_NORMAL) != 0; }
--- a/layout/xul/base/src/grid/nsGrid.cpp
+++ b/layout/xul/base/src/grid/nsGrid.cpp
@@ -591,17 +591,17 @@ nsGrid::GetMaxRowSize(nsBoxLayoutState& 
 
 // static
 nsIGridPart*
 nsGrid::GetPartFromBox(nsIBox* aBox)
 {
   if (!aBox)
     return nsnull;
 
-  nsIBoxLayout* layout = aBox->GetLayoutManager();
+  nsBoxLayout* layout = aBox->GetLayoutManager();
   return layout ? layout->AsGridPart() : nsnull;
 }
 
 nsMargin
 nsGrid::GetBoxTotalMargin(nsIBox* aBox, PRBool aIsHorizontal)
 {
   nsMargin margin(0,0,0,0);
   // walk the boxes parent chain getting the border/padding/margin of our parent rows
--- a/layout/xul/base/src/grid/nsGridLayout2.cpp
+++ b/layout/xul/base/src/grid/nsGridLayout2.cpp
@@ -45,17 +45,17 @@
 #include "nsGridLayout2.h"
 #include "nsGridRowGroupLayout.h"
 #include "nsGridRow.h"
 #include "nsBox.h"
 #include "nsIScrollableFrame.h"
 #include "nsSprocketLayout.h"
 
 nsresult
-NS_NewGridLayout2( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout)
+NS_NewGridLayout2( nsIPresShell* aPresShell, nsBoxLayout** aNewLayout)
 {
   *aNewLayout = new nsGridLayout2(aPresShell);
   NS_IF_ADDREF(*aNewLayout);
 
   return NS_OK;
   
 } 
 
--- a/layout/xul/base/src/grid/nsGridLayout2.h
+++ b/layout/xul/base/src/grid/nsGridLayout2.h
@@ -48,24 +48,24 @@
 
 class nsGridRowGroupLayout;
 class nsGridRowLayout;
 class nsGridRow;
 class nsBoxLayoutState;
 class nsGridCell;
 
 /**
- * The nsIBoxLayout implementation for a grid.
+ * The nsBoxLayout implementation for a grid.
  */
 class nsGridLayout2 : public nsStackLayout, 
                       public nsIGridPart
 {
 public:
 
-  friend nsresult NS_NewGridLayout2(nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout);
+  friend nsresult NS_NewGridLayout2(nsIPresShell* aPresShell, nsBoxLayout** aNewLayout);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual void IntrinsicWidthsDirty(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
 
   virtual nsGridRowGroupLayout* CastToRowGroupLayout() { return nsnull; }
   virtual nsGridLayout2* CastToGridLayout() { return this; }
--- a/layout/xul/base/src/grid/nsGridRowGroupFrame.cpp
+++ b/layout/xul/base/src/grid/nsGridRowGroupFrame.cpp
@@ -43,23 +43,23 @@
 //
 
 #include "nsGridRowGroupFrame.h"
 #include "nsGridRowLeafLayout.h"
 #include "nsGridRow.h"
 #include "nsBoxLayoutState.h"
 #include "nsGridLayout2.h"
 
-already_AddRefed<nsIBoxLayout> NS_NewGridRowGroupLayout();
+already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout();
 
 nsIFrame*
 NS_NewGridRowGroupFrame(nsIPresShell* aPresShell,
                         nsStyleContext* aContext)
 {
-  nsCOMPtr<nsIBoxLayout> layout = NS_NewGridRowGroupLayout();
+  nsCOMPtr<nsBoxLayout> layout = NS_NewGridRowGroupLayout();
   if (!layout) {
     return nsnull;
   }
 
   return new (aPresShell) nsGridRowGroupFrame(aPresShell, aContext, layout);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsGridRowGroupFrame)
--- a/layout/xul/base/src/grid/nsGridRowGroupFrame.h
+++ b/layout/xul/base/src/grid/nsGridRowGroupFrame.h
@@ -63,17 +63,17 @@ public:
   NS_IMETHOD GetFrameName(nsAString& aResult) const
   {
       return MakeFrameName(NS_LITERAL_STRING("nsGridRowGroup"), aResult);
   }
 #endif
 
   nsGridRowGroupFrame(nsIPresShell* aPresShell,
                       nsStyleContext* aContext,
-                      nsIBoxLayout* aLayoutManager):
+                      nsBoxLayout* aLayoutManager):
     nsBoxFrame(aPresShell, aContext, PR_FALSE, aLayoutManager) {}
 
   virtual nscoord GetFlex(nsBoxLayoutState& aBoxLayoutState);
 
 }; // class nsGridRowGroupFrame
 
 
 
--- a/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp
+++ b/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp
@@ -49,19 +49,19 @@
 
 #include "nsGridRowGroupLayout.h"
 #include "nsCOMPtr.h"
 #include "nsIScrollableFrame.h"
 #include "nsBoxLayoutState.h"
 #include "nsGridLayout2.h"
 #include "nsGridRow.h"
 
-already_AddRefed<nsIBoxLayout> NS_NewGridRowGroupLayout()
+already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout()
 {
-  nsIBoxLayout* layout = new nsGridRowGroupLayout();
+  nsBoxLayout* layout = new nsGridRowGroupLayout();
   NS_IF_ADDREF(layout);
   return layout;
 } 
 
 nsGridRowGroupLayout::nsGridRowGroupLayout():nsGridRowLayout(), mRowCount(0)
 {
 }
 
--- a/layout/xul/base/src/grid/nsGridRowGroupLayout.h
+++ b/layout/xul/base/src/grid/nsGridRowGroupLayout.h
@@ -43,23 +43,23 @@
 **/
 
 #ifndef nsGridRowGroupLayout_h___
 #define nsGridRowGroupLayout_h___
 
 #include "nsGridRowLayout.h"
 
 /**
- * The nsIBoxLayout implementation for nsGridRowGroupFrame.
+ * The nsBoxLayout implementation for nsGridRowGroupFrame.
  */
 class nsGridRowGroupLayout : public nsGridRowLayout
 {
 public:
 
-  friend already_AddRefed<nsIBoxLayout> NS_NewGridRowGroupLayout();
+  friend already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout();
 
   virtual nsGridRowGroupLayout* CastToRowGroupLayout() { return this; }
   virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual void CountRowsColumns(nsIBox* aBox, PRInt32& aRowCount, PRInt32& aComputedColumnCount);
   virtual void DirtyRows(nsIBox* aBox, nsBoxLayoutState& aState);
   virtual PRInt32 BuildRows(nsIBox* aBox, nsGridRow* aRows);
--- a/layout/xul/base/src/grid/nsGridRowLayout.cpp
+++ b/layout/xul/base/src/grid/nsGridRowLayout.cpp
@@ -123,17 +123,17 @@ nsGridRowLayout::GetGrid(nsIBox* aBox, P
    PRInt32 index = -1;
    nsIBox* child = aBox->GetChildBox();
    PRInt32 count = 0;
    while(child)
    {
      // if there is a scrollframe walk inside it to its child
      nsIBox* childBox = nsGrid::GetScrolledBox(child);
 
-     nsIBoxLayout* layout = childBox->GetLayoutManager();
+     nsBoxLayout* layout = childBox->GetLayoutManager();
      nsIGridPart* gridRow = nsGrid::GetPartFromBox(childBox);
      if (gridRow) 
      {
        if (layout == aRequestor) {
           index = count;
           break;
        }
        count += gridRow->GetRowCount();
--- a/layout/xul/base/src/grid/nsGridRowLayout.h
+++ b/layout/xul/base/src/grid/nsGridRowLayout.h
@@ -48,18 +48,18 @@
 #include "nsSprocketLayout.h"
 #include "nsIGridPart.h"
 class nsGridRowGroupLayout;
 class nsGridLayout2;
 class nsBoxLayoutState;
 class nsGrid;
 
 /**
- * A common base class for nsGridRowLeafLayout (the nsIBoxLayout object
- * for a grid row or column) and nsGridRowGroupLayout (the nsIBoxLayout
+ * A common base class for nsGridRowLeafLayout (the nsBoxLayout object
+ * for a grid row or column) and nsGridRowGroupLayout (the nsBoxLayout
  * object for a grid row group or column group).
  */
 // XXXldb This needs a name that indicates that it's a base class for
 // both row and rows (row-group).
 class nsGridRowLayout : public nsSprocketLayout,
                         public nsIGridPart
 {
 public:
--- a/layout/xul/base/src/grid/nsGridRowLeafFrame.cpp
+++ b/layout/xul/base/src/grid/nsGridRowLeafFrame.cpp
@@ -43,23 +43,23 @@
 //
 
 #include "nsGridRowLeafFrame.h"
 #include "nsGridRowLeafLayout.h"
 #include "nsGridRow.h"
 #include "nsBoxLayoutState.h"
 #include "nsGridLayout2.h"
 
-already_AddRefed<nsIBoxLayout> NS_NewGridRowLeafLayout();
+already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout();
 
 nsIFrame*
 NS_NewGridRowLeafFrame(nsIPresShell* aPresShell,
                        nsStyleContext* aContext)
 {
-  nsCOMPtr<nsIBoxLayout> layout = NS_NewGridRowLeafLayout();
+  nsCOMPtr<nsBoxLayout> layout = NS_NewGridRowLeafLayout();
   if (!layout) {
     return nsnull;
   }
   
   return new (aPresShell) nsGridRowLeafFrame(aPresShell, aContext, PR_FALSE,
                                              layout);
 }
 
--- a/layout/xul/base/src/grid/nsGridRowLeafFrame.h
+++ b/layout/xul/base/src/grid/nsGridRowLeafFrame.h
@@ -68,17 +68,17 @@ public:
   {
       return MakeFrameName(NS_LITERAL_STRING("nsGridRowLeaf"), aResult);
   }
 #endif
 
   nsGridRowLeafFrame(nsIPresShell* aPresShell,
                      nsStyleContext* aContext,
                      PRBool aIsRoot,
-                     nsIBoxLayout* aLayoutManager):
+                     nsBoxLayout* aLayoutManager):
     nsBoxFrame(aPresShell, aContext, aIsRoot, aLayoutManager) {}
 
   NS_IMETHOD GetBorderAndPadding(nsMargin& aBorderAndPadding);
 
 }; // class nsGridRowLeafFrame
 
 
 
--- a/layout/xul/base/src/grid/nsGridRowLeafLayout.cpp
+++ b/layout/xul/base/src/grid/nsGridRowLeafLayout.cpp
@@ -46,19 +46,19 @@
 #include "nsGridRowGroupLayout.h"
 #include "nsGridRow.h"
 #include "nsBoxLayoutState.h"
 #include "nsBox.h"
 #include "nsIScrollableFrame.h"
 #include "nsBoxFrame.h"
 #include "nsGridLayout2.h"
 
-already_AddRefed<nsIBoxLayout> NS_NewGridRowLeafLayout()
+already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout()
 {
-  nsIBoxLayout* layout = new nsGridRowLeafLayout();
+  nsBoxLayout* layout = new nsGridRowLeafLayout();
   NS_IF_ADDREF(layout);
   return layout;
 } 
 
 nsGridRowLeafLayout::nsGridRowLeafLayout():nsGridRowLayout()
 {
 }
 
--- a/layout/xul/base/src/grid/nsGridRowLeafLayout.h
+++ b/layout/xul/base/src/grid/nsGridRowLeafLayout.h
@@ -44,25 +44,25 @@
 
 #ifndef nsGridRowLeafLayout_h___
 #define nsGridRowLeafLayout_h___
 
 #include "nsGridRowLayout.h"
 #include "nsCOMPtr.h"
 
 /**
- * The nsIBoxLayout implementation for nsGridRowLeafFrame.
+ * The nsBoxLayout implementation for nsGridRowLeafFrame.
  */
 // XXXldb This needs a better name that indicates that it's for any grid
 // row.
 class nsGridRowLeafLayout : public nsGridRowLayout
 {
 public:
 
-  friend already_AddRefed<nsIBoxLayout> NS_NewGridRowLeafLayout();
+  friend already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout();
 
   virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual void ChildAddedOrRemoved(nsIBox* aBox, nsBoxLayoutState& aState);
   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual void CountRowsColumns(nsIBox* aBox, PRInt32& aRowCount, PRInt32& aComputedColumnCount);
   virtual void DirtyRows(nsIBox* aBox, nsBoxLayoutState& aState);
--- a/layout/xul/base/src/grid/nsIGridPart.h
+++ b/layout/xul/base/src/grid/nsIGridPart.h
@@ -48,17 +48,17 @@ class nsGridRow;
 class nsGridLayout2;
 
 // 07373ed7-e947-4a5e-b36c-69f7c195677b
 #define NS_IGRIDPART_IID \
 { 0x07373ed7, 0xe947, 0x4a5e, \
   { 0xb3, 0x6c, 0x69, 0xf7, 0xc1, 0x95, 0x67, 0x7b } }
 
 /**
- * An additional interface implemented by nsIBoxLayout implementations
+ * An additional interface implemented by nsBoxLayout implementations
  * for parts of a grid (excluding cells, which are not special).
  */
 class nsIGridPart : public nsISupports {
 
 public:
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGRIDPART_IID)
 
--- a/layout/xul/base/src/nsBox.cpp
+++ b/layout/xul/base/src/nsBox.cpp
@@ -48,17 +48,17 @@
 #include "nsGkAtoms.h"
 #include "nsFrameManager.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMNamedNodeMap.h"
 #include "nsIDOMAttr.h"
 #include "nsIDocument.h"
 #include "nsITheme.h"
 #include "nsIServiceManager.h"
-#include "nsIBoxLayout.h"
+#include "nsBoxLayout.h"
 #include "FrameLayerBuilder.h"
 
 using namespace mozilla;
 
 #ifdef DEBUG_LAYOUT
 PRInt32 gIndent = 0;
 #endif
 
--- a/layout/xul/base/src/nsBoxFrame.cpp
+++ b/layout/xul/base/src/nsBoxFrame.cpp
@@ -73,17 +73,17 @@
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsHTMLParts.h"
 #include "nsIViewManager.h"
 #include "nsIView.h"
 #include "nsIPresShell.h"
 #include "nsCSSRendering.h"
 #include "nsIServiceManager.h"
-#include "nsIBoxLayout.h"
+#include "nsBoxLayout.h"
 #include "nsSprocketLayout.h"
 #include "nsIDocument.h"
 #include "nsIScrollableFrame.h"
 #include "nsWidgetsCID.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsHTMLContainerFrame.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMElement.h"
@@ -115,46 +115,46 @@ using namespace mozilla;
 #endif
 
 #ifdef DEBUG_LAYOUT
 PRBool nsBoxFrame::gDebug = PR_FALSE;
 nsIBox* nsBoxFrame::mDebugChild = nsnull;
 #endif
 
 nsIFrame*
-NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot, nsIBoxLayout* aLayoutManager)
+NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot, nsBoxLayout* aLayoutManager)
 {
   return new (aPresShell) nsBoxFrame(aPresShell, aContext, aIsRoot, aLayoutManager);
 }
 
 nsIFrame*
 NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsBoxFrame(aPresShell, aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsBoxFrame)
 
 nsBoxFrame::nsBoxFrame(nsIPresShell* aPresShell,
                        nsStyleContext* aContext,
                        PRBool aIsRoot,
-                       nsIBoxLayout* aLayoutManager) :
+                       nsBoxLayout* aLayoutManager) :
   nsContainerFrame(aContext)
 {
   mState |= NS_STATE_IS_HORIZONTAL;
   mState |= NS_STATE_AUTO_STRETCH;
 
   if (aIsRoot) 
      mState |= NS_STATE_IS_ROOT;
 
   mValign = vAlign_Top;
   mHalign = hAlign_Left;
   
   // if no layout manager specified us the static sprocket layout
-  nsCOMPtr<nsIBoxLayout> layout = aLayoutManager;
+  nsCOMPtr<nsBoxLayout> layout = aLayoutManager;
 
   if (layout == nsnull) {
     NS_NewSprocketLayout(aPresShell, layout);
   }
 
   SetLayoutManager(layout);
 }
 
--- a/layout/xul/base/src/nsBoxFrame.h
+++ b/layout/xul/base/src/nsBoxFrame.h
@@ -66,38 +66,38 @@ class nsBoxLayoutState;
 #define NS_STATE_EQUAL_SIZE              NS_FRAME_STATE_BIT(30)
 //#define NS_STATE_IS_DIRECTION_NORMAL     NS_FRAME_STATE_BIT(31)  moved to nsIFrame.h
 #define NS_FRAME_MOUSE_THROUGH_ALWAYS    NS_FRAME_STATE_BIT(60)
 #define NS_FRAME_MOUSE_THROUGH_NEVER     NS_FRAME_STATE_BIT(61)
 
 nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell,
                          nsStyleContext* aContext,
                          PRBool aIsRoot,
-                         nsIBoxLayout* aLayoutManager);
+                         nsBoxLayout* aLayoutManager);
 nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell,
                          nsStyleContext* aContext);
 
 class nsBoxFrame : public nsContainerFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   friend nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, 
                                   nsStyleContext* aContext,
                                   PRBool aIsRoot,
-                                  nsIBoxLayout* aLayoutManager);
+                                  nsBoxLayout* aLayoutManager);
   friend nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell,
                                   nsStyleContext* aContext);
 
   // gets the rect inside our border and debug border. If you wish to paint inside a box
   // call this method to get the rect so you don't draw on the debug border or outer border.
 
   // ------ nsIBox -------------
-  virtual void SetLayoutManager(nsIBoxLayout* aLayout) { mLayoutManager = aLayout; }
-  virtual nsIBoxLayout* GetLayoutManager() { return mLayoutManager; }
+  virtual void SetLayoutManager(nsBoxLayout* aLayout) { mLayoutManager = aLayout; }
+  virtual nsBoxLayout* GetLayoutManager() { return mLayoutManager; }
 
   NS_IMETHOD RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIBox* aChild);
 
   virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState);
   virtual nscoord GetFlex(nsBoxLayoutState& aBoxLayoutState);
   virtual nscoord GetBoxAscent(nsBoxLayoutState& aBoxLayoutState);
@@ -176,17 +176,17 @@ public:
   NS_IMETHOD DidReflow(nsPresContext*           aPresContext,
                        const nsHTMLReflowState*  aReflowState,
                        nsDidReflowStatus         aStatus);
 
   virtual PRBool HonorPrintBackgroundSettings();
 
   virtual ~nsBoxFrame();
   
-  nsBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot = PR_FALSE, nsIBoxLayout* aLayoutManager = nsnull);
+  nsBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRBool aIsRoot = PR_FALSE, nsBoxLayout* aLayoutManager = nsnull);
 
   // virtual so nsStackFrame, nsButtonBoxFrame, nsSliderFrame and nsMenuFrame
   // can override it
   NS_IMETHOD BuildDisplayListForChildren(nsDisplayListBuilder*   aBuilder,
                                          const nsRect&           aDirtyRect,
                                          const nsDisplayListSet& aLists);
 
   NS_IMETHOD BuildDisplayList(nsDisplayListBuilder*   aBuilder,
@@ -235,17 +235,17 @@ protected:
     virtual void DestroyFrom(nsIFrame* aDestructRoot);
 
     nsSize mPrefSize;
     nsSize mMinSize;
     nsSize mMaxSize;
     nscoord mFlex;
     nscoord mAscent;
 
-    nsCOMPtr<nsIBoxLayout> mLayoutManager;
+    nsCOMPtr<nsBoxLayout> mLayoutManager;
 
 protected:
     nsresult RegUnregAccessKey(PRBool aDoReg);
 
   NS_HIDDEN_(void) CheckBoxOrder(nsBoxLayoutState& aState);
 
 private: 
 
--- a/layout/xul/base/src/nsBoxLayout.cpp
+++ b/layout/xul/base/src/nsBoxLayout.cpp
@@ -39,27 +39,20 @@
 //
 // Eric Vaughan
 // Netscape Communications
 //
 // See documentation in associated header file
 //
 
 #include "nsBox.h"
-#include "nsPresContext.h"
 #include "nsCOMPtr.h"
-#include "nsIContent.h"
 #include "nsHTMLContainerFrame.h"
-#include "nsIFrame.h"
 #include "nsBoxLayout.h"
 
-nsBoxLayout::nsBoxLayout()
-{
-}
-
 void
 nsBoxLayout::AddBorderAndPadding(nsIBox* aBox, nsSize& aSize)
 {
   nsBox::AddBorderAndPadding(aBox, aSize);
 }
 
 void
 nsBoxLayout::AddMargin(nsIBox* aBox, nsSize& aSize)
@@ -126,47 +119,9 @@ nsBoxLayout::AddSmallestSize(nsSize& aSi
 {
   if (aSize2.width < aSize.width)
      aSize.width = aSize2.width;
 
   if (aSize2.height < aSize.height)
      aSize.height = aSize2.height;
 }
 
-void
-nsBoxLayout::ChildrenInserted(nsIBox* aBox, nsBoxLayoutState& aState,
-                              nsIBox* aPrevBox,
-                              const nsFrameList::Slice& aNewChildren)
-{
-}
-
-void
-nsBoxLayout::ChildrenAppended(nsIBox* aBox, nsBoxLayoutState& aState,
-                              const nsFrameList::Slice& aNewChildren)
-{
-}
-
-void
-nsBoxLayout::ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList)
-{
-}
-
-void
-nsBoxLayout::ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList)
-{
-}
-
-void
-nsBoxLayout::IntrinsicWidthsDirty(nsIBox* aBox, nsBoxLayoutState& aState)
-{
-}
-
-// nsISupports
-NS_IMPL_ADDREF(nsBoxLayout)
-NS_IMPL_RELEASE(nsBoxLayout)
-
-//
-// QueryInterface
-//
-NS_INTERFACE_MAP_BEGIN(nsBoxLayout)
-  NS_INTERFACE_MAP_ENTRY(nsIBoxLayout)
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
+NS_IMPL_ISUPPORTS1(nsBoxLayout, nsBoxLayout)
--- a/layout/xul/base/src/nsBoxLayout.h
+++ b/layout/xul/base/src/nsBoxLayout.h
@@ -33,46 +33,57 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsBoxLayout_h___
 #define nsBoxLayout_h___
 
-#include "nsIBoxLayout.h"
+#include "nsISupports.h"
+#include "nsIFrame.h"
 
-class nsBoxLayout : public nsIBoxLayout {
+#define NS_BOX_LAYOUT_IID \
+{ 0x09d522a7, 0x304c, 0x4137, \
+ { 0xaf, 0xc9, 0xe0, 0x80, 0x2e, 0x89, 0xb7, 0xe8 } }
+
+class nsIGridPart;
+
+class nsBoxLayout : public nsISupports {
 
 public:
 
-  nsBoxLayout();
+  nsBoxLayout() {}
   virtual ~nsBoxLayout() {}
 
   NS_DECL_ISUPPORTS
 
+  NS_DECLARE_STATIC_IID_ACCESSOR(NS_BOX_LAYOUT_IID)
+
   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aState);
 
   virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nscoord GetAscent(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual void ChildrenInserted(nsIBox* aBox, nsBoxLayoutState& aState,
                                 nsIBox* aPrevBox,
-                                const nsFrameList::Slice& aNewChildren);
+                                const nsFrameList::Slice& aNewChildren) {}
   virtual void ChildrenAppended(nsIBox* aBox, nsBoxLayoutState& aState,
-                                const nsFrameList::Slice& aNewChildren);
-  virtual void ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList);
-  virtual void ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList);
-  virtual void IntrinsicWidthsDirty(nsIBox* aBox, nsBoxLayoutState& aState);
+                                const nsFrameList::Slice& aNewChildren) {}
+  virtual void ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList) {}
+  virtual void ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList) {}
+  virtual void IntrinsicWidthsDirty(nsIBox* aBox, nsBoxLayoutState& aState) {}
 
   virtual void AddBorderAndPadding(nsIBox* aBox, nsSize& aSize);
   virtual void AddMargin(nsIBox* aChild, nsSize& aSize);
   virtual void AddMargin(nsSize& aSize, const nsMargin& aMargin);
 
   virtual nsIGridPart* AsGridPart() { return nsnull; }
 
   static void AddLargestSize(nsSize& aSize, const nsSize& aToAdd);
   static void AddSmallestSize(nsSize& aSize, const nsSize& aToAdd);
 };
 
+NS_DEFINE_STATIC_IID_ACCESSOR(nsBoxLayout, NS_BOX_LAYOUT_IID)
+
 #endif
 
--- a/layout/xul/base/src/nsDeckFrame.cpp
+++ b/layout/xul/base/src/nsDeckFrame.cpp
@@ -65,17 +65,17 @@ NS_NewDeckFrame(nsIPresShell* aPresShell
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsDeckFrame)
 
 
 nsDeckFrame::nsDeckFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
   : nsBoxFrame(aPresShell, aContext), mIndex(0)
 {
-  nsCOMPtr<nsIBoxLayout> layout;
+  nsCOMPtr<nsBoxLayout> layout;
   NS_NewStackLayout(aPresShell, layout);
   SetLayoutManager(layout);
 }
 
 nsIAtom*
 nsDeckFrame::GetType() const
 {
   return nsGkAtoms::deckFrame;
deleted file mode 100644
--- a/layout/xul/base/src/nsIBoxLayout.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef nsIBoxLayout_h___
-#define nsIBoxLayout_h___
-
-#include "nsISupports.h"
-#include "nsIFrame.h"
-
-class nsBoxLayout;
-class nsBoxLayoutState;
-class nsRenderingContext;
-class nsIGridPart;
-struct nsRect;
-
-// 6a529924-c73d-4fae-af7a-0e8084e701d5
-#define NS_IBOX_LAYOUT_IID \
-{ 0x6a529924, 0xc73d, 0x4fae, \
- { 0xaf, 0x7a, 0x0e, 0x80, 0x84, 0xe7, 0x01, 0xd5 } }
-
-class nsIBoxLayout : public nsISupports {
-
-public:
-
-  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBOX_LAYOUT_IID)
-
-  NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aState)=0;
-
-  virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState)=0;
-  virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState)=0;
-  virtual nsSize GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState)=0;
-  virtual nscoord GetAscent(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState)=0;
-
-  // FIXME: Bug 507416.  The Children* notifications don't actually
-  // use all those arguments.  Can we just simplify the signatures?
-  virtual void ChildrenInserted(nsIBox* aBox, nsBoxLayoutState& aState,
-                                nsIBox* aPrevBox,
-                                const nsFrameList::Slice& aNewChildren)=0;
-  virtual void ChildrenAppended(nsIBox* aBox, nsBoxLayoutState& aState,
-                                const nsFrameList::Slice& aNewChildren)=0;
-  virtual void ChildrenRemoved(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList)=0;
-  virtual void ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList)=0;
-  virtual void IntrinsicWidthsDirty(nsIBox* aBox, nsBoxLayoutState& aState)=0;
-
-  // Returns this if it is an nsIGridPart, not refcounted
-  virtual nsIGridPart* AsGridPart() = 0;
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsIBoxLayout, NS_IBOX_LAYOUT_IID)
-
-#endif
--- a/layout/xul/base/src/nsListBoxBodyFrame.cpp
+++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp
@@ -159,17 +159,17 @@ nsListScrollSmoother::Stop()
 }
 
 NS_IMPL_ISUPPORTS1(nsListScrollSmoother, nsITimerCallback)
 
 /////////////// nsListBoxBodyFrame //////////////////
 
 nsListBoxBodyFrame::nsListBoxBodyFrame(nsIPresShell* aPresShell,
                                        nsStyleContext* aContext,
-                                       nsIBoxLayout* aLayoutManager)
+                                       nsBoxLayout* aLayoutManager)
   : nsBoxFrame(aPresShell, aContext, PR_FALSE, aLayoutManager),
     mTopFrame(nsnull),
     mBottomFrame(nsnull),
     mLinkupFrame(nsnull),
     mScrollSmoother(nsnull),
     mRowsToPrepend(0),
     mRowCount(-1),
     mRowHeight(0),
@@ -1503,22 +1503,22 @@ nsListBoxBodyFrame::RemoveChildFrame(nsB
   mFrames.RemoveFrame(aFrame);
   if (mLayoutManager)
     mLayoutManager->ChildrenRemoved(this, aState, aFrame);
   aFrame->Destroy();
 }
 
 // Creation Routines ///////////////////////////////////////////////////////////////////////
 
-already_AddRefed<nsIBoxLayout> NS_NewListBoxLayout();
+already_AddRefed<nsBoxLayout> NS_NewListBoxLayout();
 
 nsIFrame*
 NS_NewListBoxBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
-  nsCOMPtr<nsIBoxLayout> layout = NS_NewListBoxLayout();
+  nsCOMPtr<nsBoxLayout> layout = NS_NewListBoxLayout();
   if (!layout) {
     return nsnull;
   }
 
   return new (aPresShell) nsListBoxBodyFrame(aPresShell, aContext, layout);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsListBoxBodyFrame)
--- a/layout/xul/base/src/nsListBoxBodyFrame.h
+++ b/layout/xul/base/src/nsListBoxBodyFrame.h
@@ -55,17 +55,17 @@ class nsListScrollSmoother;
 nsIFrame* NS_NewListBoxBodyFrame(nsIPresShell* aPresShell,
                                  nsStyleContext* aContext);
 
 class nsListBoxBodyFrame : public nsBoxFrame,
                            public nsIScrollbarMediator,
                            public nsIReflowCallback
 {
   nsListBoxBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
-                     nsIBoxLayout* aLayoutManager);
+                     nsBoxLayout* aLayoutManager);
   virtual ~nsListBoxBodyFrame();
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsListBoxBodyFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // non-virtual nsIListBoxObject
--- a/layout/xul/base/src/nsListBoxLayout.cpp
+++ b/layout/xul/base/src/nsListBoxLayout.cpp
@@ -48,17 +48,17 @@
 #include "nsINameSpaceManager.h"
 #include "nsGkAtoms.h"
 #include "nsContentUtils.h"
 
 nsListBoxLayout::nsListBoxLayout() : nsGridRowGroupLayout()
 {
 }
 
-////////// nsIBoxLayout //////////////
+////////// nsBoxLayout //////////////
 
 nsSize
 nsListBoxLayout::GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState)
 {
   nsSize pref = nsGridRowGroupLayout::GetPrefSize(aBox, aBoxLayoutState);
 
   nsListBoxBodyFrame* frame = static_cast<nsListBoxBodyFrame*>(aBox);
   if (frame) {
@@ -237,14 +237,14 @@ nsListBoxLayout::LayoutInternal(nsIBox* 
     aBox->Redraw(aState, &tempRect);
   }
 
   return NS_OK;
 }
 
 // Creation Routines ///////////////////////////////////////////////////////////////////////
 
-already_AddRefed<nsIBoxLayout> NS_NewListBoxLayout()
+already_AddRefed<nsBoxLayout> NS_NewListBoxLayout()
 {
-  nsIBoxLayout* layout = new nsListBoxLayout();
+  nsBoxLayout* layout = new nsListBoxLayout();
   NS_IF_ADDREF(layout);
   return layout;
 } 
--- a/layout/xul/base/src/nsListBoxLayout.h
+++ b/layout/xul/base/src/nsListBoxLayout.h
@@ -45,17 +45,17 @@
 
 class nsBoxLayoutState;
 
 class nsListBoxLayout : public nsGridRowGroupLayout
 {
 public:
   nsListBoxLayout();
 
-  // nsIBoxLayout
+  // nsBoxLayout
   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aState);
   virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
 
 protected:
   NS_IMETHOD LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState);
 };
--- a/layout/xul/base/src/nsListItemFrame.cpp
+++ b/layout/xul/base/src/nsListItemFrame.cpp
@@ -38,22 +38,22 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsListItemFrame.h"
 
 #include "nsCOMPtr.h"
 #include "nsINameSpaceManager.h" 
 #include "nsGkAtoms.h"
 #include "nsDisplayList.h"
-#include "nsIBoxLayout.h"
+#include "nsBoxLayout.h"
 
 nsListItemFrame::nsListItemFrame(nsIPresShell* aPresShell,
                                  nsStyleContext* aContext,
                                  PRBool aIsRoot,
-                                 nsIBoxLayout* aLayoutManager)
+                                 nsBoxLayout* aLayoutManager)
   : nsGridRowLeafFrame(aPresShell, aContext, aIsRoot, aLayoutManager) 
 {
 }
 
 nsListItemFrame::~nsListItemFrame()
 {
 }
 
@@ -80,22 +80,22 @@ nsListItemFrame::BuildDisplayListForChil
       return NS_OK;
   }
   
   return nsGridRowLeafFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
 }
 
 // Creation Routine ///////////////////////////////////////////////////////////////////////
 
-already_AddRefed<nsIBoxLayout> NS_NewGridRowLeafLayout();
+already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout();
 
 nsIFrame*
 NS_NewListItemFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
-  nsCOMPtr<nsIBoxLayout> layout = NS_NewGridRowLeafLayout();
+  nsCOMPtr<nsBoxLayout> layout = NS_NewGridRowLeafLayout();
   if (!layout) {
     return nsnull;
   }
   
   return new (aPresShell) nsListItemFrame(aPresShell, aContext, PR_FALSE, layout);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsListItemFrame)
--- a/layout/xul/base/src/nsListItemFrame.h
+++ b/layout/xul/base/src/nsListItemFrame.h
@@ -59,12 +59,12 @@ public:
 
   // nsIBox
   virtual nsSize GetPrefSize(nsBoxLayoutState& aState);
   
 protected:
   nsListItemFrame(nsIPresShell* aPresShell,
                   nsStyleContext *aContext,
                   PRBool aIsRoot = nsnull,
-                  nsIBoxLayout* aLayoutManager = nsnull);
+                  nsBoxLayout* aLayoutManager = nsnull);
   virtual ~nsListItemFrame();
 
 }; // class nsListItemFrame
--- a/layout/xul/base/src/nsMenuPopupFrame.cpp
+++ b/layout/xul/base/src/nsMenuPopupFrame.cpp
@@ -69,17 +69,16 @@
 #include "nsIRootBox.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsLayoutUtils.h"
 #include "nsContentUtils.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsEventStateManager.h"
-#include "nsIBoxLayout.h"
 #include "nsIPopupBoxObject.h"
 #include "nsPIWindowRoot.h"
 #include "nsIReflowCallback.h"
 #include "nsBindingManager.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIBaseWindow.h"
 #include "nsISound.h"
 #include "nsIRootBox.h"
--- a/layout/xul/base/src/nsRootBoxFrame.cpp
+++ b/layout/xul/base/src/nsRootBoxFrame.cpp
@@ -144,17 +144,17 @@ NS_NewRootBoxFrame(nsIPresShell* aPresSh
 
 NS_IMPL_FRAMEARENA_HELPERS(nsRootBoxFrame)
 
 nsRootBoxFrame::nsRootBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext):
   nsBoxFrame(aShell, aContext, PR_TRUE)
 {
   mPopupSetFrame = nsnull;
 
-  nsCOMPtr<nsIBoxLayout> layout;
+  nsCOMPtr<nsBoxLayout> layout;
   NS_NewStackLayout(aShell, layout);
   SetLayoutManager(layout);
 }
 
 NS_IMETHODIMP
 nsRootBoxFrame::AppendFrames(nsIAtom*        aListName,
                              nsFrameList&    aFrameList)
 {
--- a/layout/xul/base/src/nsSprocketLayout.cpp
+++ b/layout/xul/base/src/nsSprocketLayout.cpp
@@ -49,27 +49,27 @@
 #include "nsPresContext.h"
 #include "nsCOMPtr.h"
 #include "nsIContent.h"
 #include "nsIPresShell.h"
 #include "nsHTMLContainerFrame.h"
 #include "nsBoxFrame.h"
 #include "nsBoxFrame.h"
 
-nsIBoxLayout* nsSprocketLayout::gInstance = nsnull;
+nsBoxLayout* nsSprocketLayout::gInstance = nsnull;
 
 //#define DEBUG_GROW
 
 #define DEBUG_SPRING_SIZE 8
 #define DEBUG_BORDER_SIZE 2
 #define COIL_SIZE 8
 
 
 nsresult
-NS_NewSprocketLayout( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout)
+NS_NewSprocketLayout( nsIPresShell* aPresShell, nsCOMPtr<nsBoxLayout>& aNewLayout)
 {
   if (!nsSprocketLayout::gInstance) {
     nsSprocketLayout::gInstance = new nsSprocketLayout();
     NS_IF_ADDREF(nsSprocketLayout::gInstance);
   }
   // we have not instance variables so just return our static one.
   aNewLayout = nsSprocketLayout::gInstance;
   return NS_OK;
--- a/layout/xul/base/src/nsSprocketLayout.h
+++ b/layout/xul/base/src/nsSprocketLayout.h
@@ -84,23 +84,23 @@ public:
 
 #define SET_WIDTH(size, coord, isHorizontal)  if (isHorizontal) { (size).width  = (coord); } else { (size).height = (coord); }
 #define SET_HEIGHT(size, coord, isHorizontal) if (isHorizontal) { (size).height = (coord); } else { (size).width  = (coord); }
 #define SET_X(size, coord, isHorizontal) if (isHorizontal) { (size).x = (coord); } else { (size).y  = (coord); }
 #define SET_Y(size, coord, isHorizontal) if (isHorizontal) { (size).y = (coord); } else { (size).x  = (coord); }
 
 #define SET_COORD(aX, aY, coord, isHorizontal) if (isHorizontal) { aX = (coord); } else { aY  = (coord); }
 
-nsresult NS_NewSprocketLayout(nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout);
+nsresult NS_NewSprocketLayout(nsIPresShell* aPresShell, nsCOMPtr<nsBoxLayout>& aNewLayout);
 
 class nsSprocketLayout : public nsBoxLayout {
 
 public:
 
-  friend nsresult NS_NewSprocketLayout(nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout);
+  friend nsresult NS_NewSprocketLayout(nsIPresShell* aPresShell, nsCOMPtr<nsBoxLayout>& aNewLayout);
   static void Shutdown();
 
   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aState);
 
   virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nscoord GetAscent(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
@@ -157,15 +157,15 @@ protected:
   virtual PRBool GetDefaultFlex(PRInt32& aFlex);
 
   virtual void GetFrameState(nsIBox* aBox, nsFrameState& aState);
 
 private:
 
 
   // because the sprocket layout manager has no instance variables. We 
-  // can make a static on and reuse it everywhere.
-  static nsIBoxLayout* gInstance;
+  // can make a static one and reuse it everywhere.
+  static nsBoxLayout* gInstance;
 
 };
 
 #endif
 
--- a/layout/xul/base/src/nsStackFrame.cpp
+++ b/layout/xul/base/src/nsStackFrame.cpp
@@ -59,17 +59,17 @@ NS_NewStackFrame(nsIPresShell* aPresShel
   return new (aPresShell) nsStackFrame(aPresShell, aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsStackFrame)
 
 nsStackFrame::nsStackFrame(nsIPresShell* aPresShell, nsStyleContext* aContext):
   nsBoxFrame(aPresShell, aContext)
 {
-  nsCOMPtr<nsIBoxLayout> layout;
+  nsCOMPtr<nsBoxLayout> layout;
   NS_NewStackLayout(aPresShell, layout);
   SetLayoutManager(layout);
 }
 
 // REVIEW: The old code put everything in the background layer. To be more
 // consistent with the way other frames work, I'm putting everything in the
 // Content() (i.e., foreground) layer (see nsFrame::BuildDisplayListForChild,
 // the case for stacking context but non-positioned, non-floating frames).
--- a/layout/xul/base/src/nsStackLayout.cpp
+++ b/layout/xul/base/src/nsStackLayout.cpp
@@ -47,25 +47,25 @@
 #include "nsCOMPtr.h"
 #include "nsBoxLayoutState.h"
 #include "nsBox.h"
 #include "nsBoxFrame.h"
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsINameSpaceManager.h"
 
-nsIBoxLayout* nsStackLayout::gInstance = nsnull;
+nsBoxLayout* nsStackLayout::gInstance = nsnull;
 
 #define SPECIFIED_LEFT (1 << NS_SIDE_LEFT)
 #define SPECIFIED_RIGHT (1 << NS_SIDE_RIGHT)
 #define SPECIFIED_TOP (1 << NS_SIDE_TOP)
 #define SPECIFIED_BOTTOM (1 << NS_SIDE_BOTTOM)
 
 nsresult
-NS_NewStackLayout( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout)
+NS_NewStackLayout( nsIPresShell* aPresShell, nsCOMPtr<nsBoxLayout>& aNewLayout)
 {
   if (!nsStackLayout::gInstance) {
     nsStackLayout::gInstance = new nsStackLayout();
     NS_IF_ADDREF(nsStackLayout::gInstance);
   }
   // we have not instance variables so just return our static one.
   aNewLayout = nsStackLayout::gInstance;
   return NS_OK;
--- a/layout/xul/base/src/nsStackLayout.h
+++ b/layout/xul/base/src/nsStackLayout.h
@@ -45,23 +45,23 @@
 **/
 
 #ifndef nsStackLayout_h___
 #define nsStackLayout_h___
 
 #include "nsBoxLayout.h"
 #include "nsCOMPtr.h"
 
-nsresult NS_NewStackLayout(nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout);
+nsresult NS_NewStackLayout(nsIPresShell* aPresShell, nsCOMPtr<nsBoxLayout>& aNewLayout);
 
 class nsStackLayout : public nsBoxLayout
 {
 public:
 
-  friend nsresult NS_NewStackLayout(nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout);
+  friend nsresult NS_NewStackLayout(nsIPresShell* aPresShell, nsCOMPtr<nsBoxLayout>& aNewLayout);
   static void Shutdown();
 
   nsStackLayout();
 
   NS_IMETHOD Layout(nsIBox* aBox, nsBoxLayoutState& aState);
 
   virtual nsSize GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
   virtual nsSize GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState);
@@ -70,16 +70,16 @@ public:
 
   // get the child offsets for aChild and set them in aMargin. Returns a
   // bitfield mask of the SPECIFIED_LEFT, SPECIFIED_RIGHT, SPECIFIED_TOP and
   // SPECIFIED_BOTTOM offsets indicating which sides have been specified by
   // attributes. 
   static PRUint8 GetOffset(nsBoxLayoutState& aState, nsIBox* aChild, nsMargin& aMargin);
 
 private:
-  static nsIBoxLayout* gInstance;
+  static nsBoxLayout* gInstance;
 
 }; // class nsStackLayout
 
 
 
 #endif