Bug 1053986 - Rename nsIFrame::GetLayoutManager to GetXULLayoutManager. r?dholbert draft
authorL. David Baron <dbaron@dbaron.org>
Wed, 20 Apr 2016 12:16:58 -0700
changeset 354383 8d01388f4196891e1bd0f5dd92cf6803007777a4
parent 354382 b7f8236ed71445495e717b128f3c191e0312eea0
child 354384 74829595da62c18736554ede022b20cc0f7a4aa4
push id16058
push userdbaron@mozilla.com
push dateWed, 20 Apr 2016 19:17:15 +0000
reviewersdholbert
bugs1053986
milestone48.0a1
Bug 1053986 - Rename nsIFrame::GetLayoutManager to GetXULLayoutManager. r?dholbert Written purely with sed, over .h and .cpp files in layout/. MozReview-Commit-ID: LbOjEpXmcH4
layout/generic/nsIFrame.h
layout/xul/grid/nsGrid.cpp
layout/xul/grid/nsGridLayout2.cpp
layout/xul/grid/nsGridRowLayout.cpp
layout/xul/nsBoxFrame.h
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2912,17 +2912,17 @@ public:
   nsresult XULLayout(nsBoxLayoutState& aBoxLayoutState);
   // Box methods.  Note that these do NOT just get the CSS border, padding,
   // etc.  They also talk to nsITheme.
   virtual nsresult GetXULBorderAndPadding(nsMargin& aBorderAndPadding);
   virtual nsresult GetXULBorder(nsMargin& aBorder)=0;
   virtual nsresult GetXULPadding(nsMargin& aBorderAndPadding)=0;
   virtual nsresult GetXULMargin(nsMargin& aMargin)=0;
   virtual void SetXULLayoutManager(nsBoxLayout* aLayout) { }
-  virtual nsBoxLayout* GetLayoutManager() { return nullptr; }
+  virtual nsBoxLayout* GetXULLayoutManager() { return nullptr; }
   nsresult GetClientRect(nsRect& aContentRect);
 
   // For nsSprocketLayout
   virtual Valignment GetVAlign() const = 0;
   virtual Halignment GetHAlign() const = 0;
 
   bool IsHorizontal() const { return (mState & NS_STATE_IS_HORIZONTAL) != 0; }
   bool IsNormalDirection() const { return (mState & NS_STATE_IS_DIRECTION_NORMAL) != 0; }
--- a/layout/xul/grid/nsGrid.cpp
+++ b/layout/xul/grid/nsGrid.cpp
@@ -538,17 +538,17 @@ nsGrid::GetMaxRowSize(nsBoxLayoutState& 
 
 // static
 nsIGridPart*
 nsGrid::GetPartFromBox(nsIFrame* aBox)
 {
   if (!aBox)
     return nullptr;
 
-  nsBoxLayout* layout = aBox->GetLayoutManager();
+  nsBoxLayout* layout = aBox->GetXULLayoutManager();
   return layout ? layout->AsGridPart() : nullptr;
 }
 
 nsMargin
 nsGrid::GetBoxTotalMargin(nsIFrame* aBox, bool aIsHorizontal)
 {
   nsMargin margin(0,0,0,0);
   // walk the boxes parent chain getting the border/padding/margin of our parent rows
--- a/layout/xul/grid/nsGridLayout2.cpp
+++ b/layout/xul/grid/nsGridLayout2.cpp
@@ -46,17 +46,17 @@ nsGridLayout2::AddOffset(nsIFrame* aChil
   aSize.height += offset.top;
 }
 
 NS_IMETHODIMP
 nsGridLayout2::XULLayout(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState)
 {
   // XXX This should be set a better way!
   mGrid.SetBox(aBox);
-  NS_ASSERTION(aBox->GetLayoutManager() == this, "setting incorrect box");
+  NS_ASSERTION(aBox->GetXULLayoutManager() == this, "setting incorrect box");
 
   nsresult rv = nsStackLayout::XULLayout(aBox, aBoxLayoutState);
 #ifdef DEBUG_grid
   mGrid.PrintCellMap();
 #endif
   return rv;
 }
 
@@ -70,17 +70,17 @@ nsGridLayout2::IntrinsicISizesDirty(nsIF
   mGrid.NeedsRebuild(aBoxLayoutState);
 }
 
 nsGrid*
 nsGridLayout2::GetGrid(nsIFrame* aBox, int32_t* aIndex, nsGridRowLayout* aRequestor)
 {
   // XXX This should be set a better way!
   mGrid.SetBox(aBox);
-  NS_ASSERTION(aBox->GetLayoutManager() == this, "setting incorrect box");
+  NS_ASSERTION(aBox->GetXULLayoutManager() == this, "setting incorrect box");
   return &mGrid;
 }
 
 void
 nsGridLayout2::AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal)
 {
   nscoord& size = GET_WIDTH(aSize, aIsHorizontal);
 
--- a/layout/xul/grid/nsGridRowLayout.cpp
+++ b/layout/xul/grid/nsGridRowLayout.cpp
@@ -95,17 +95,17 @@ nsGridRowLayout::GetGrid(nsIFrame* aBox,
    int32_t index = -1;
    nsIFrame* child = nsBox::GetChildXULBox(aBox);
    int32_t count = 0;
    while(child)
    {
      // if there is a scrollframe walk inside it to its child
      nsIFrame* childBox = nsGrid::GetScrolledBox(child);
 
-     nsBoxLayout* layout = childBox->GetLayoutManager();
+     nsBoxLayout* layout = childBox->GetXULLayoutManager();
      nsIGridPart* gridRow = nsGrid::GetPartFromBox(childBox);
      if (gridRow) 
      {
        if (layout == aRequestor) {
           index = count;
           break;
        }
        count += gridRow->GetRowCount();
--- a/layout/xul/nsBoxFrame.h
+++ b/layout/xul/nsBoxFrame.h
@@ -52,17 +52,17 @@ public:
                                   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.
 
   virtual void SetXULLayoutManager(nsBoxLayout* aLayout) override { mLayoutManager = aLayout; }
-  virtual nsBoxLayout* GetLayoutManager() override { return mLayoutManager; }
+  virtual nsBoxLayout* GetXULLayoutManager() override { return mLayoutManager; }
 
   virtual nsresult RelayoutChildAtOrdinal(nsIFrame* aChild) override;
 
   virtual nsSize GetXULPrefSize(nsBoxLayoutState& aBoxLayoutState) override;
   virtual nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
   virtual nsSize GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState) override;
   virtual nscoord GetXULFlex() override;
   virtual nscoord GetXULBoxAscent(nsBoxLayoutState& aBoxLayoutState) override;