Bug 1053986 - Rename nsIFrame::DumpBox to XULDumpBox. r?dholbert
Written purely with sed, over .h and .cpp files in layout/.
MozReview-Commit-ID: 7fWf9Z1ugB9
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -8838,17 +8838,17 @@ nsFrame::DoLayout(nsBoxLayoutState& aSta
// if our child needs to be bigger. This might happend with
// wrapping text. There is no way to predict its height until we
// reflow it. Now that we know the height reshuffle upward.
if (desiredSize.ISize(outerWM) > ourSize.ISize(outerWM) ||
desiredSize.BSize(outerWM) > ourSize.BSize(outerWM)) {
#ifdef DEBUG_GROW
- DumpBox(stdout);
+ XULDumpBox(stdout);
printf(" GREW from (%d,%d) -> (%d,%d)\n",
ourSize.ISize(outerWM), ourSize.BSize(outerWM),
desiredSize.ISize(outerWM), desiredSize.BSize(outerWM));
#endif
if (desiredSize.ISize(outerWM) > ourSize.ISize(outerWM)) {
ourSize.ISize(outerWM) = desiredSize.ISize(outerWM);
}
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2929,17 +2929,17 @@ public:
nsresult XULRedraw(nsBoxLayoutState& aState);
virtual nsresult XULRelayoutChildAtOrdinal(nsIFrame* aChild)=0;
#ifdef DEBUG_LAYOUT
virtual nsresult SetXULDebug(nsBoxLayoutState& aState, bool aDebug)=0;
virtual nsresult GetXULDebug(bool& aDebug)=0;
- virtual nsresult DumpBox(FILE* out)=0;
+ virtual nsresult XULDumpBox(FILE* out)=0;
#endif
/**
* @return true if this text frame ends with a newline character. It
* should return false if this is not a text frame.
*/
virtual bool HasSignificantTerminalNewline() const;
--- a/layout/xul/nsBox.cpp
+++ b/layout/xul/nsBox.cpp
@@ -80,17 +80,17 @@ nsBox::ListBox(nsAutoString& aResult)
nsAutoString value;
attribute->GetValue(value);
AppendAttribute(name, value, aResult);
}
}
}
nsresult
-nsBox::DumpBox(FILE* aFile)
+nsBox::XULDumpBox(FILE* aFile)
{
nsAutoString s;
ListBox(s);
fprintf(aFile, "%s", NS_LossyConvertUTF16toASCII(s).get());
return NS_OK;
}
void
@@ -118,17 +118,17 @@ nsBox::GetBoxName(nsAutoString& aName)
nsresult
nsBox::BeginLayout(nsBoxLayoutState& aState)
{
#ifdef DEBUG_LAYOUT
nsBoxAddIndents();
printf("XULLayout: ");
- DumpBox(stdout);
+ XULDumpBox(stdout);
printf("\n");
gIndent++;
#endif
// mark ourselves as dirty so no child under us
// can post an incremental layout.
// XXXldb Is this still needed?
mState |= NS_FRAME_HAS_DIRTY_CHILDREN;
--- a/layout/xul/nsBox.h
+++ b/layout/xul/nsBox.h
@@ -41,17 +41,17 @@ public:
virtual nsresult XULRelayoutChildAtOrdinal(nsIFrame* aChild) override;
#ifdef DEBUG_LAYOUT
NS_IMETHOD GetDebugBoxAt(const nsPoint& aPoint, nsIFrame** aBox);
virtual nsresult GetXULDebug(bool& aDebug) override;
virtual nsresult SetXULDebug(nsBoxLayoutState& aState, bool aDebug) override;
- virtual nsresult DumpBox(FILE* out) override;
+ virtual nsresult XULDumpBox(FILE* out) override;
void PropagateDebug(nsBoxLayoutState& aState);
#endif
nsBox();
virtual ~nsBox();
/**
* Returns true if this box clips its children, e.g., if this box is an sc
@@ -113,17 +113,17 @@ private:
//nscoord mX;
//nscoord mY;
};
#ifdef DEBUG_LAYOUT
#define NS_BOX_ASSERTION(box,expr,str) \
if (!(expr)) { \
- box->DumpBox(stdout); \
+ box->XULDumpBox(stdout); \
NS_DebugBreak(NSDebugAssertion, str, #expr, __FILE__, __LINE__); \
}
#else
#define NS_BOX_ASSERTION(box,expr,str) {}
#endif
#endif
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -216,17 +216,17 @@ void nsBoxFrame::UpdateMouseThrough()
}
}
void
nsBoxFrame::CacheAttributes()
{
/*
printf("Caching: ");
- DumpBox(stdout);
+ XULDumpBox(stdout);
printf("\n");
*/
mValign = vAlign_Top;
mHalign = hAlign_Left;
bool orient = false;
GetInitialOrientation(orient);
@@ -1758,23 +1758,23 @@ nsBoxFrame::DisplayDebugInfoFor(nsIFrame
(!isHorizontal && y >= r.y && y < r.y + r.height)) {
aCursor = NS_STYLE_CURSOR_POINTER;
// found it but we already showed it.
if (mDebugChild == child)
return NS_OK;
if (aBox->GetContent()) {
printf("---------------\n");
- DumpBox(stdout);
+ XULDumpBox(stdout);
printf("\n");
}
if (child->GetContent()) {
printf("child #%d: ", count);
- child->DumpBox(stdout);
+ child->XULDumpBox(stdout);
printf("\n");
}
mDebugChild = child;
nsSize prefSizeCSS(NS_INTRINSICSIZE, NS_INTRINSICSIZE);
nsSize minSizeCSS (NS_INTRINSICSIZE, NS_INTRINSICSIZE);
nsSize maxSizeCSS (NS_INTRINSICSIZE, NS_INTRINSICSIZE);
--- a/layout/xul/nsSprocketLayout.cpp
+++ b/layout/xul/nsSprocketLayout.cpp
@@ -484,17 +484,17 @@ nsSprocketLayout::XULLayout(nsIFrame* aB
child->XULLayout(aState);
// If the child was a block or inline (e.g., HTML) it may have changed its rect *during* layout.
// We have to check for this.
nsRect newChildRect(child->GetRect());
if (!newChildRect.IsEqualInterior(childRect)) {
#ifdef DEBUG_GROW
- child->DumpBox(stdout);
+ child->XULDumpBox(stdout);
printf(" GREW from (%d,%d) -> (%d,%d)\n", childRect.width, childRect.height, newChildRect.width, newChildRect.height);
#endif
newChildRect.Inflate(margin);
childRect.Inflate(margin);
// The child changed size during layout. The ChildResized method handles this
// scenario.
ChildResized(aBox,