Bug 1053986 - Rename nsIFrame::SetDebug to SetXULDebug. r=dholbert

Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: KQYtO7JS2Zm
This commit is contained in:
L. David Baron 2016-04-20 21:28:34 -07:00
parent 724e8f5649
commit cbb60bab56
8 changed files with 21 additions and 21 deletions

View File

@ -2931,7 +2931,7 @@ public:
virtual nsresult XULRelayoutChildAtOrdinal(nsIFrame* aChild)=0;
#ifdef DEBUG_LAYOUT
virtual nsresult SetDebug(nsBoxLayoutState& aState, bool aDebug)=0;
virtual nsresult SetXULDebug(nsBoxLayoutState& aState, bool aDebug)=0;
virtual nsresult GetDebug(bool& aDebug)=0;
virtual nsresult DumpBox(FILE* out)=0;

View File

@ -99,11 +99,11 @@ nsBox::PropagateDebug(nsBoxLayoutState& aState)
// propagate debug information
if (mState & NS_STATE_DEBUG_WAS_SET) {
if (mState & NS_STATE_SET_TO_DEBUG)
SetDebug(aState, true);
SetXULDebug(aState, true);
else
SetDebug(aState, false);
SetXULDebug(aState, false);
} else if (mState & NS_STATE_IS_ROOT) {
SetDebug(aState, gDebug);
SetXULDebug(aState, gDebug);
}
}
#endif
@ -945,7 +945,7 @@ nsBox::GetParentXULBox(const nsIFrame* aFrame)
#ifdef DEBUG_LAYOUT
nsresult
nsBox::SetDebug(nsBoxLayoutState& aState, bool aDebug)
nsBox::SetXULDebug(nsBoxLayoutState& aState, bool aDebug)
{
return NS_OK;
}

View File

@ -44,7 +44,7 @@ public:
#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;
virtual nsresult SetXULDebug(nsBoxLayoutState& aState, bool aDebug) override;
virtual nsresult DumpBox(FILE* out) override;
void PropagateDebug(nsBoxLayoutState& aState);

View File

@ -965,7 +965,7 @@ nsBoxFrame::DestroyFrom(nsIFrame* aDestructRoot)
#ifdef DEBUG_LAYOUT
nsresult
nsBoxFrame::SetDebug(nsBoxLayoutState& aState, bool aDebug)
nsBoxFrame::SetXULDebug(nsBoxLayoutState& aState, bool aDebug)
{
// see if our state matches the given debug state
bool debugSet = mState & NS_STATE_CURRENTLY_IN_DEBUG;
@ -1840,7 +1840,7 @@ nsBoxFrame::SetDebugOnChildList(nsBoxLayoutState& aState, nsIFrame* aChild, bool
nsIFrame* child = nsBox::GetChildXULBox(this);
while (child)
{
child->SetDebug(aState, aDebug);
child->SetXULDebug(aState, aDebug);
child = GetNextXULBox(child);
}
}

View File

@ -67,7 +67,7 @@ public:
virtual nscoord GetXULFlex() override;
virtual nscoord GetXULBoxAscent(nsBoxLayoutState& aBoxLayoutState) override;
#ifdef DEBUG_LAYOUT
virtual nsresult SetDebug(nsBoxLayoutState& aBoxLayoutState, bool aDebug) override;
virtual nsresult SetXULDebug(nsBoxLayoutState& aBoxLayoutState, bool aDebug) override;
virtual nsresult GetDebug(bool& aDebug) override;
#endif
virtual Valignment GetXULVAlign() const override { return mValign; }
@ -220,7 +220,7 @@ protected:
private:
#ifdef DEBUG_LAYOUT
nsresult SetDebug(nsPresContext* aPresContext, bool aDebug);
nsresult SetXULDebug(nsPresContext* aPresContext, bool aDebug);
bool GetInitialDebug(bool& aDebug);
void GetDebugPref();

View File

@ -744,7 +744,7 @@ nsMenuFrame::DoLayout(nsBoxLayoutState& aState)
#ifdef DEBUG_LAYOUT
nsresult
nsMenuFrame::SetDebug(nsBoxLayoutState& aState, bool aDebug)
nsMenuFrame::SetXULDebug(nsBoxLayoutState& aState, bool aDebug)
{
// see if our state matches the given debug state
bool debugSet = mState & NS_STATE_CURRENTLY_IN_DEBUG;
@ -753,24 +753,24 @@ nsMenuFrame::SetDebug(nsBoxLayoutState& aState, bool aDebug)
// if it doesn't then tell each child below us the new debug state
if (debugChanged)
{
nsBoxFrame::SetDebug(aState, aDebug);
nsBoxFrame::SetXULDebug(aState, aDebug);
nsMenuPopupFrame* popupFrame = GetPopup();
if (popupFrame)
SetDebug(aState, popupFrame, aDebug);
SetXULDebug(aState, popupFrame, aDebug);
}
return NS_OK;
}
nsresult
nsMenuFrame::SetDebug(nsBoxLayoutState& aState, nsIFrame* aList, bool aDebug)
nsMenuFrame::SetXULDebug(nsBoxLayoutState& aState, nsIFrame* aList, bool aDebug)
{
if (!aList)
return NS_OK;
while (aList) {
if (aList->IsXULBoxFrame())
aList->SetDebug(aState, aDebug);
aList->SetXULDebug(aState, aDebug);
aList = aList->GetNextSibling();
}
@ -1296,7 +1296,7 @@ nsMenuFrame::InsertFrames(ChildListID aListID,
if (HasPopup()) {
#ifdef DEBUG_LAYOUT
nsBoxLayoutState state(PresContext());
SetDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
SetXULDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
#endif
PresContext()->PresShell()->
@ -1325,7 +1325,7 @@ nsMenuFrame::AppendFrames(ChildListID aListID,
#ifdef DEBUG_LAYOUT
nsBoxLayoutState state(PresContext());
SetDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
SetXULDebug(state, aFrameList, mState & NS_STATE_CURRENTLY_IN_DEBUG);
#endif
PresContext()->PresShell()->
FrameNeedsReflow(this, nsIPresShell::eTreeChange,

View File

@ -89,7 +89,7 @@ public:
nsIFrame* aPrevInFlow) override;
#ifdef DEBUG_LAYOUT
virtual nsresult SetDebug(nsBoxLayoutState& aState, bool aDebug) override;
virtual nsresult SetXULDebug(nsBoxLayoutState& aState, bool aDebug) override;
#endif
// The following methods are all overridden so that the menupopup
@ -263,7 +263,7 @@ protected:
protected:
#ifdef DEBUG_LAYOUT
nsresult SetDebug(nsBoxLayoutState& aState, nsIFrame* aList, bool aDebug);
nsresult SetXULDebug(nsBoxLayoutState& aState, nsIFrame* aList, bool aDebug);
#endif
nsresult Notify(nsITimer* aTimer);

View File

@ -402,9 +402,9 @@ nsSliderFrame::DoLayout(nsBoxLayoutState& aState)
#ifdef DEBUG_LAYOUT
if (mState & NS_STATE_DEBUG_WAS_SET) {
if (mState & NS_STATE_SET_TO_DEBUG)
SetDebug(aState, true);
SetXULDebug(aState, true);
else
SetDebug(aState, false);
SetXULDebug(aState, false);
}
#endif