Bug 1008917 - part 9,10, make DidReflow() return type 'void'. r=roc

This commit is contained in:
Mats Palmgren 2014-05-12 17:40:29 +00:00
parent 372d6a6e99
commit f027a24698
12 changed files with 29 additions and 39 deletions

View File

@ -1434,16 +1434,15 @@ nsListControlFrame::AboutToRollup()
}
}
nsresult
void
nsListControlFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus)
{
nsresult rv;
bool wasInterrupted = !mHasPendingInterruptAtStartOfReflow &&
aPresContext->HasPendingInterrupt();
rv = nsHTMLScrollFrame::DidReflow(aPresContext, aReflowState, aStatus);
nsHTMLScrollFrame::DidReflow(aPresContext, aReflowState, aStatus);
if (mNeedToReset && !wasInterrupted) {
mNeedToReset = false;
@ -1460,7 +1459,6 @@ nsListControlFrame::DidReflow(nsPresContext* aPresContext,
}
mHasPendingInterruptAtStartOfReflow = false;
return rv;
}
nsIAtom*

View File

@ -77,9 +77,9 @@ public:
nsIFrame* aParent,
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,

View File

@ -4282,7 +4282,7 @@ nsFrame::WillReflow(nsPresContext* aPresContext)
return NS_OK;
}
nsresult
void
nsFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus)
@ -4308,8 +4308,6 @@ nsFrame::DidReflow(nsPresContext* aPresContext,
aReflowState->mPercentHeightObserver->NotifyPercentHeight(*aReflowState);
}
}
return NS_OK;
}
void

View File

@ -322,9 +322,9 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
/**
* NOTE: aStatus is assumed to be already-initialized. The reflow statuses of

View File

@ -1885,9 +1885,9 @@ public:
* XXX Don't we want the semantics to dictate that we only call this once for
* a given reflow?
*/
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) = 0;
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) = 0;
// XXX Maybe these three should be a separate interface?

View File

@ -800,7 +800,7 @@ nsIntPoint nsObjectFrame::GetWindowOriginInPixels(bool aWindowless)
PresContext()->AppUnitsToDevPixels(origin.y));
}
nsresult
void
nsObjectFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus)
@ -814,12 +814,12 @@ nsObjectFrame::DidReflow(nsPresContext* aPresContext,
objContent->HasNewFrame(this);
}
nsresult rv = nsObjectFrameSuper::DidReflow(aPresContext, aReflowState, aStatus);
nsObjectFrameSuper::DidReflow(aPresContext, aReflowState, aStatus);
// The view is created hidden; once we have reflowed it and it has been
// positioned then we show it.
if (aStatus != nsDidReflowStatus::FINISHED)
return rv;
return;
if (HasView()) {
nsView* view = GetView();
@ -827,8 +827,6 @@ nsObjectFrame::DidReflow(nsPresContext* aPresContext,
if (vm)
vm->SetViewVisibility(view, IsHidden() ? nsViewVisibility_kHide : nsViewVisibility_kShow);
}
return rv;
}
/* static */ void

View File

@ -62,9 +62,9 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) MOZ_OVERRIDE;

View File

@ -119,8 +119,7 @@ public:
return nsContainerFrame::WillReflow(aPresContext);
}
virtual nsresult
DidReflow(nsPresContext* aPresContext,
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE

View File

@ -451,18 +451,16 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext,
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
}
nsresult
void
nsSVGOuterSVGFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus)
{
nsresult rv = nsSVGOuterSVGFrameBase::DidReflow(aPresContext,aReflowState,aStatus);
nsSVGOuterSVGFrameBase::DidReflow(aPresContext,aReflowState,aStatus);
// Make sure elements styled by :hover get updated if script/animation moves
// them under or out from under the pointer:
PresContext()->PresShell()->SynthesizeMouseMove(false);
return rv;
}
/* virtual */ bool

View File

@ -54,9 +54,9 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus) MOZ_OVERRIDE;
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual bool UpdateOverflow() MOZ_OVERRIDE;

View File

@ -550,16 +550,15 @@ nsBoxFrame::GetInitialAutoStretch(bool& aStretch)
return true;
}
nsresult
void
nsBoxFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus)
{
nsFrameState preserveBits =
mState & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN);
nsresult rv = nsFrame::DidReflow(aPresContext, aReflowState, aStatus);
nsFrame::DidReflow(aPresContext, aReflowState, aStatus);
mState |= preserveBits;
return rv;
}
bool

View File

@ -129,9 +129,9 @@ public:
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
#endif
virtual nsresult DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual void DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus) MOZ_OVERRIDE;
virtual bool HonorPrintBackgroundSettings() MOZ_OVERRIDE;