Bug 1053986 - Rename nsIFrame::GetHAlign to GetXULHAlign. r?dholbert draft
authorL. David Baron <dbaron@dbaron.org>
Wed, 20 Apr 2016 12:16:58 -0700
changeset 354386 c0da8734ac0e893473028b990be27b93041fc152
parent 354385 e60f66c3513e2dc54f6ce720b9f449de5f021689
child 354387 440b42fd76924175fbeb691c05f9c30f7c0a02d0
push id16058
push userdbaron@mozilla.com
push dateWed, 20 Apr 2016 19:17:15 +0000
reviewersdholbert
bugs1053986
milestone48.0a1
Bug 1053986 - Rename nsIFrame::GetHAlign to GetXULHAlign. r?dholbert Written purely with sed, over .h and .cpp files in layout/. MozReview-Commit-ID: FW1DjQ2uCnk
layout/generic/nsIFrame.h
layout/xul/nsBox.h
layout/xul/nsBoxFrame.h
layout/xul/nsSprocketLayout.cpp
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2917,17 +2917,17 @@ public:
   virtual nsresult GetXULPadding(nsMargin& aBorderAndPadding)=0;
   virtual nsresult GetXULMargin(nsMargin& aMargin)=0;
   virtual void SetXULLayoutManager(nsBoxLayout* aLayout) { }
   virtual nsBoxLayout* GetXULLayoutManager() { return nullptr; }
   nsresult GetXULClientRect(nsRect& aContentRect);
 
   // For nsSprocketLayout
   virtual Valignment GetXULVAlign() const = 0;
-  virtual Halignment GetHAlign() const = 0;
+  virtual Halignment GetXULHAlign() const = 0;
 
   bool IsHorizontal() const { return (mState & NS_STATE_IS_HORIZONTAL) != 0; }
   bool IsNormalDirection() const { return (mState & NS_STATE_IS_DIRECTION_NORMAL) != 0; }
 
   nsresult Redraw(nsBoxLayoutState& aState);
   virtual nsresult RelayoutChildAtOrdinal(nsIFrame* aChild)=0;
 
 #ifdef DEBUG_LAYOUT
--- a/layout/xul/nsBox.h
+++ b/layout/xul/nsBox.h
@@ -32,17 +32,17 @@ public:
   virtual void SetXULBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect,
                             bool aRemoveOverflowAreas = false) override;
 
   virtual nsresult GetXULBorder(nsMargin& aBorderAndPadding) override;
   virtual nsresult GetXULPadding(nsMargin& aBorderAndPadding) override;
   virtual nsresult GetXULMargin(nsMargin& aMargin) override;
 
   virtual Valignment GetXULVAlign() const override { return vAlign_Top; }
-  virtual Halignment GetHAlign() const override { return hAlign_Left; }
+  virtual Halignment GetXULHAlign() const override { return hAlign_Left; }
 
   virtual nsresult RelayoutChildAtOrdinal(nsIFrame* aChild) override;
 
 #ifdef DEBUG_LAYOUT
   NS_IMETHOD GetDebugBoxAt(const nsPoint& aPoint, nsIFrame** aBox);
   virtual nsresult GetDebug(bool& aDebug) override;
   virtual nsresult SetDebug(nsBoxLayoutState& aState, bool aDebug) override;
 
--- a/layout/xul/nsBoxFrame.h
+++ b/layout/xul/nsBoxFrame.h
@@ -66,17 +66,17 @@ public:
   virtual nsSize GetXULMaxSize(nsBoxLayoutState& aBoxLayoutState) override;
   virtual nscoord GetXULFlex() override;
   virtual nscoord GetXULBoxAscent(nsBoxLayoutState& aBoxLayoutState) override;
 #ifdef DEBUG_LAYOUT
   virtual nsresult SetDebug(nsBoxLayoutState& aBoxLayoutState, bool aDebug) override;
   virtual nsresult GetDebug(bool& aDebug) override;
 #endif
   virtual Valignment GetXULVAlign() const override { return mValign; }
-  virtual Halignment GetHAlign() const override { return mHalign; }
+  virtual Halignment GetXULHAlign() const override { return mHalign; }
   NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) override;
 
   virtual bool ComputesOwnOverflowArea() override { return false; }
 
   // ----- child and sibling operations ---
 
   // ----- public methods -------
   
--- a/layout/xul/nsSprocketLayout.cpp
+++ b/layout/xul/nsSprocketLayout.cpp
@@ -109,17 +109,17 @@ HandleBoxPack(nsIFrame* aBox, const nsFr
     }
     else {
       // The reverse direction. |y| decreases as we move through our children.
       aY = aClientRect.y + aOriginalRect.height;
     }
   }
 
   // Get our pack/alignment information.
-  nsIFrame::Halignment halign = aBox->GetHAlign();
+  nsIFrame::Halignment halign = aBox->GetXULHAlign();
   nsIFrame::Valignment valign = aBox->GetXULVAlign();
 
   // The following code handles box PACKING.  Packing comes into play in the case where the computed size for 
   // all of our children (now stored in our client rect) is smaller than the size available for
   // the box (stored in |aOriginalRect|).  
   // 
   // Here we adjust our |x| and |y| variables accordingly so that we start at the beginning,
   // middle, or end of the box.
@@ -937,17 +937,17 @@ nsSprocketLayout::AlignChildren(nsIFrame
 
   if (isHorizontal) {
     valign = aBox->GetXULVAlign();
     if (valign == nsBoxFrame::vAlign_BaseLine) {
       maxAscent = aBox->GetXULBoxAscent(aState);
     }
   } else {
     isLTR = GetFrameDirection(aBox) == NS_STYLE_DIRECTION_LTR;
-    halign = aBox->GetHAlign();
+    halign = aBox->GetXULHAlign();
   }
 
   nsIFrame* child = nsBox::GetChildXULBox(aBox);
   while (child) {
 
     nsMargin margin;
     child->GetXULMargin(margin);
     nsRect childRect = child->GetRect();