Bug 1053986 - Rename nsIFrame::GetVAlign to GetXULVAlign. r?dholbert draft
authorL. David Baron <dbaron@dbaron.org>
Wed, 20 Apr 2016 12:16:58 -0700
changeset 354385 e60f66c3513e2dc54f6ce720b9f449de5f021689
parent 354384 74829595da62c18736554ede022b20cc0f7a4aa4
child 354386 c0da8734ac0e893473028b990be27b93041fc152
push id16058
push userdbaron@mozilla.com
push dateWed, 20 Apr 2016 19:17:15 +0000
reviewersdholbert
bugs1053986
milestone48.0a1
Bug 1053986 - Rename nsIFrame::GetVAlign to GetXULVAlign. r?dholbert Written purely with sed, over .h and .cpp files in layout/. MozReview-Commit-ID: 1CKHdnYFKBx
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
@@ -2916,17 +2916,17 @@ public:
   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* GetXULLayoutManager() { return nullptr; }
   nsresult GetXULClientRect(nsRect& aContentRect);
 
   // For nsSprocketLayout
-  virtual Valignment GetVAlign() const = 0;
+  virtual Valignment GetXULVAlign() 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; }
 
   nsresult Redraw(nsBoxLayoutState& aState);
   virtual nsresult RelayoutChildAtOrdinal(nsIFrame* aChild)=0;
 
--- a/layout/xul/nsBox.h
+++ b/layout/xul/nsBox.h
@@ -31,17 +31,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 GetVAlign() const override { return vAlign_Top; }
+  virtual Valignment GetXULVAlign() const override { return vAlign_Top; }
   virtual Halignment GetHAlign() 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
@@ -65,17 +65,17 @@ public:
   virtual nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
   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 GetVAlign() const override { return mValign; }
+  virtual Valignment GetXULVAlign() const override { return mValign; }
   virtual Halignment GetHAlign() 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
@@ -110,17 +110,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::Valignment valign = aBox->GetVAlign();
+  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.
   //
@@ -931,17 +931,17 @@ nsSprocketLayout::AlignChildren(nsIFrame
 
   // These are only calculated if needed
   nsIFrame::Halignment halign;
   nsIFrame::Valignment valign;
   nscoord maxAscent;
   bool isLTR;
 
   if (isHorizontal) {
-    valign = aBox->GetVAlign();
+    valign = aBox->GetXULVAlign();
     if (valign == nsBoxFrame::vAlign_BaseLine) {
       maxAscent = aBox->GetXULBoxAscent(aState);
     }
   } else {
     isLTR = GetFrameDirection(aBox) == NS_STYLE_DIRECTION_LTR;
     halign = aBox->GetHAlign();
   }