Bug 1053986 - Rename nsIFrame::GetLayoutManager to GetXULLayoutManager. r=dholbert
authorL. David Baron <dbaron@dbaron.org>
Wed, 20 Apr 2016 21:28:33 -0700
changeset 332100 9e1500799635f149043c82e9045eb7a9ba45ad27
parent 332099 e81b89fbb11277cb79eca66a9017635d5f250fc0
child 332101 5c37c36f2720bf76df1e088ec228e03a5ecfbe2a
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1053986
milestone48.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 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;