Bug 1053986 - Rename nsIFrame::GetOrdinal to GetXULOrdinal. r?dholbert draft
authorL. David Baron <dbaron@dbaron.org>
Wed, 20 Apr 2016 12:16:55 -0700
changeset 354368 c5e8110770484340f2065a1b9cb87bb07cdbb004
parent 354367 1bfc3fcc7e669119305cddf33e5309bb3589cd06
child 354369 fbc0378c809129b52e899ae1d3895240659db193
push id16058
push userdbaron@mozilla.com
push dateWed, 20 Apr 2016 19:17:15 +0000
reviewersdholbert
bugs1053986
milestone48.0a1
Bug 1053986 - Rename nsIFrame::GetOrdinal to GetXULOrdinal. r?dholbert This is a manual subset of changes written with sed, over .h and .cpp files in layout/. MozReview-Commit-ID: Cj9yHRCuqzx
layout/generic/nsIFrame.h
layout/xul/nsBox.cpp
layout/xul/nsBoxFrame.cpp
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2891,17 +2891,17 @@ public:
 
   /**
    * This returns the minimum size for the scroll area if this frame is
    * being scrolled. Usually it's (0,0).
    */
   virtual nsSize GetXULMinSizeForScrollArea(nsBoxLayoutState& aBoxLayoutState) = 0;
 
   // Implemented in nsBox, used in nsBoxFrame
-  uint32_t GetOrdinal();
+  uint32_t GetXULOrdinal();
 
   virtual nscoord GetFlex() = 0;
   virtual nscoord GetBoxAscent(nsBoxLayoutState& aBoxLayoutState) = 0;
   virtual bool IsCollapsed() = 0;
   // This does not alter the overflow area. If the caller is changing
   // the box size, the caller is responsible for updating the overflow
   // area. It's enough to just call Layout or SyncLayout on the
   // box. You can pass true to aRemoveOverflowArea as a
--- a/layout/xul/nsBox.cpp
+++ b/layout/xul/nsBox.cpp
@@ -457,17 +457,17 @@ nsBox::GetFlex()
   nscoord flex = 0;
 
   nsIFrame::AddCSSFlex(this, flex);
 
   return flex;
 }
 
 uint32_t
-nsIFrame::GetOrdinal()
+nsIFrame::GetXULOrdinal()
 {
   uint32_t ordinal = StyleXUL()->mBoxOrdinal;
 
   // When present, attribute value overrides CSS.
   nsIContent* content = GetContent();
   if (content && content->IsXULElement()) {
     nsresult error;
     nsAutoString value;
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -1902,17 +1902,17 @@ nsBoxFrame::SupportsOrdinalsInChildren()
 // template-parameter for the sorting functions.
 bool
 IsBoxOrdinalLEQ(nsIFrame* aFrame1,
                 nsIFrame* aFrame2)
 {
   // If we've got a placeholder frame, use its out-of-flow frame's ordinal val.
   nsIFrame* aRealFrame1 = nsPlaceholderFrame::GetRealFrameFor(aFrame1);
   nsIFrame* aRealFrame2 = nsPlaceholderFrame::GetRealFrameFor(aFrame2);
-  return aRealFrame1->GetOrdinal() <= aRealFrame2->GetOrdinal();
+  return aRealFrame1->GetXULOrdinal() <= aRealFrame2->GetXULOrdinal();
 }
 
 void 
 nsBoxFrame::CheckBoxOrder()
 {
   if (SupportsOrdinalsInChildren() &&
       !nsIFrame::IsFrameListSorted<IsBoxOrdinalLEQ>(mFrames)) {
     nsIFrame::SortFrameList<IsBoxOrdinalLEQ>(mFrames);
@@ -1936,23 +1936,23 @@ nsBoxFrame::LayoutChildAt(nsBoxLayoutSta
 }
 
 nsresult
 nsBoxFrame::RelayoutChildAtOrdinal(nsIFrame* aChild)
 {
   if (!SupportsOrdinalsInChildren())
     return NS_OK;
 
-  uint32_t ord = aChild->GetOrdinal();
+  uint32_t ord = aChild->GetXULOrdinal();
   
   nsIFrame* child = mFrames.FirstChild();
   nsIFrame* newPrevSib = nullptr;
 
   while (child) {
-    if (ord < child->GetOrdinal()) {
+    if (ord < child->GetXULOrdinal()) {
       break;
     }
 
     if (child != aChild) {
       newPrevSib = child;
     }
 
     child = GetNextBox(child);