mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 810355 - Convert nsDidReflowStatus into an enum class; r=dholbert
This commit is contained in:
parent
ea996d18ea
commit
c284cd4124
@ -7562,7 +7562,7 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
|
||||
nsContainerFrame::SyncWindowProperties(mPresContext, target,
|
||||
target->GetView(), rcx);
|
||||
|
||||
target->DidReflow(mPresContext, nullptr, NS_FRAME_REFLOW_FINISHED);
|
||||
target->DidReflow(mPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||
if (target == rootFrame && size.height == NS_UNCONSTRAINEDSIZE) {
|
||||
mPresContext->SetVisibleArea(boundsRelativeToTarget);
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
|
||||
// protocol, but things seem to work fine without it... Is that just an
|
||||
// implementation detail of nsHTMLScrollFrame that we're depending on?
|
||||
nsHTMLScrollFrame::DidReflow(aPresContext, &state,
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
|
||||
// Now compute the height we want to have
|
||||
nscoord computedHeight = CalcIntrinsicHeight(HeightOfARow(), length);
|
||||
@ -548,7 +548,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
|
||||
// protocol, but things seem to work fine without it... Is that just an
|
||||
// implementation detail of nsHTMLScrollFrame that we're depending on?
|
||||
nsHTMLScrollFrame::DidReflow(aPresContext, &state,
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
|
||||
// Now compute the height we want to have.
|
||||
// Note: no need to apply min/max constraints, since we have no such
|
||||
|
@ -450,7 +450,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
|
||||
nsContainerFrame::PositionChildViews(aKidFrame);
|
||||
}
|
||||
|
||||
aKidFrame->DidReflow(aPresContext, &kidReflowState, NS_FRAME_REFLOW_FINISHED);
|
||||
aKidFrame->DidReflow(aPresContext, &kidReflowState, nsDidReflowStatus::FINISHED);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (nsBlockFrame::gNoisyReflow) {
|
||||
|
@ -5813,7 +5813,7 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
}
|
||||
// Pass floatRS so the frame hierarchy can be used (redoFloatRS has the same hierarchy)
|
||||
aFloat->DidReflow(aState.mPresContext, &floatRS,
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
|
||||
#ifdef NOISY_FLOAT
|
||||
printf("end ReflowFloat %p, sized to %d,%d\n",
|
||||
@ -6786,7 +6786,7 @@ nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
|
||||
nscoord y = aState.mContentArea.y;
|
||||
aBulletFrame->SetRect(nsRect(x, y, aMetrics.width, aMetrics.height));
|
||||
aBulletFrame->DidReflow(aState.mPresContext, &aState.mReflowState,
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
}
|
||||
|
||||
// This is used to scan frames for any float placeholders, add their
|
||||
|
@ -391,7 +391,7 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
|
||||
nscoord yMost = y - backupContainingBlockAdvance + mMetrics.height;
|
||||
if (yMost > mSpace.YMost()) {
|
||||
// didn't fit, we must acquit.
|
||||
mFrame->DidReflow(mPresContext, &aReflowState, NS_FRAME_REFLOW_FINISHED);
|
||||
mFrame->DidReflow(mPresContext, &aReflowState, nsDidReflowStatus::FINISHED);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1051,7 +1051,7 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
|
||||
}
|
||||
}
|
||||
|
||||
return aKidFrame->DidReflow(aPresContext, aReflowState, NS_FRAME_REFLOW_FINISHED);
|
||||
return aKidFrame->DidReflow(aPresContext, aReflowState, nsDidReflowStatus::FINISHED);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -239,7 +239,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
// Place and size the child and update the output metrics
|
||||
kid->SetRect(nsRect(bp.left, bp.top, aMetrics.width, aMetrics.height));
|
||||
kid->FinishAndStoreOverflow(&aMetrics);
|
||||
kid->DidReflow(aPresContext, nullptr, NS_FRAME_REFLOW_FINISHED);
|
||||
kid->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||
|
||||
aMetrics.width += lr;
|
||||
aMetrics.height += tb;
|
||||
|
@ -570,7 +570,7 @@ nsFlexContainerFrame::AppendFlexItemForChild(
|
||||
// FinishReflowChild() (e.g. moving the frame's rect) to happen until we
|
||||
// do our "real" reflow of the child.
|
||||
rv = aChildFrame->DidReflow(aPresContext, &childRSForMeasuringHeight,
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Subtract border/padding in vertical axis, to get _just_
|
||||
|
@ -4197,11 +4197,11 @@ nsFrame::DidReflow(nsPresContext* aPresContext,
|
||||
nsDidReflowStatus aStatus)
|
||||
{
|
||||
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
|
||||
("nsFrame::DidReflow: aStatus=%d", aStatus));
|
||||
("nsFrame::DidReflow: aStatus=%d", static_cast<uint32_t>(aStatus)));
|
||||
|
||||
nsSVGEffects::InvalidateDirectRenderingObservers(this, nsSVGEffects::INVALIDATE_REFLOW);
|
||||
|
||||
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
|
||||
if (nsDidReflowStatus::FINISHED == aStatus) {
|
||||
mState &= ~(NS_FRAME_IN_REFLOW | NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY |
|
||||
NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "nsAlgorithm.h"
|
||||
#include "mozilla/layout/FrameChildList.h"
|
||||
#include "FramePropertyTable.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "mozilla/a11y/AccTypes.h"
|
||||
@ -511,10 +512,10 @@ void NS_MergeReflowStatusInto(nsReflowStatus* aPrimary,
|
||||
/**
|
||||
* DidReflow status values.
|
||||
*/
|
||||
enum nsDidReflowStatus {
|
||||
NS_FRAME_REFLOW_NOT_FINISHED,
|
||||
NS_FRAME_REFLOW_FINISHED
|
||||
};
|
||||
MOZ_BEGIN_ENUM_CLASS(nsDidReflowStatus, uint32_t)
|
||||
NOT_FINISHED,
|
||||
FINISHED
|
||||
MOZ_END_ENUM_CLASS(nsDidReflowStatus)
|
||||
|
||||
/**
|
||||
* When there is no scrollable overflow rect, the visual overflow rect
|
||||
|
@ -961,7 +961,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
// Tell the frame that we're done reflowing it
|
||||
aFrame->DidReflow(mPresContext,
|
||||
isText ? nullptr : reflowStateHolder.addr(),
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
|
||||
if (aMetrics) {
|
||||
*aMetrics = metrics;
|
||||
|
@ -868,7 +868,7 @@ nsObjectFrame::DidReflow(nsPresContext* aPresContext,
|
||||
{
|
||||
// Do this check before calling the superclass, as that clears
|
||||
// NS_FRAME_FIRST_REFLOW
|
||||
if (aStatus == NS_FRAME_REFLOW_FINISHED &&
|
||||
if (aStatus == nsDidReflowStatus::FINISHED &&
|
||||
(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
nsCOMPtr<nsIObjectLoadingContent> objContent(do_QueryInterface(mContent));
|
||||
NS_ASSERTION(objContent, "Why not an object loading content?");
|
||||
@ -879,7 +879,7 @@ nsObjectFrame::DidReflow(nsPresContext* aPresContext,
|
||||
|
||||
// The view is created hidden; once we have reflowed it and it has been
|
||||
// positioned then we show it.
|
||||
if (aStatus != NS_FRAME_REFLOW_FINISHED)
|
||||
if (aStatus != nsDidReflowStatus::FINISHED)
|
||||
return rv;
|
||||
|
||||
if (HasView()) {
|
||||
@ -1515,7 +1515,7 @@ nsObjectFrame::PrintPlugin(nsRenderingContext& aRenderingContext,
|
||||
|
||||
// XXX Nav 4.x always sent a SetWindow call after print. Should we do the same?
|
||||
// XXX Calling DidReflow here makes no sense!!!
|
||||
nsDidReflowStatus status = NS_FRAME_REFLOW_FINISHED; // should we use a special status?
|
||||
nsDidReflowStatus status = nsDidReflowStatus::FINISHED; // should we use a special status?
|
||||
frame->DidReflow(presContext,
|
||||
nullptr, status); // DidReflow will take care of it
|
||||
}
|
||||
|
@ -1438,7 +1438,7 @@ nsMathMLContainerFrame::DidReflowChildren(nsIFrame* aFirst, nsIFrame* aStop)
|
||||
DidReflowChildren(grandchild, nullptr);
|
||||
|
||||
frame->DidReflow(frame->PresContext(), nullptr,
|
||||
NS_FRAME_REFLOW_FINISHED);
|
||||
nsDidReflowStatus::FINISHED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -792,7 +792,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics desiredSize;
|
||||
nsReflowStatus status;
|
||||
ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState, 0, 0, 0, status);
|
||||
kidFrame->DidReflow(aPresContext, nullptr, NS_FRAME_REFLOW_FINISHED);
|
||||
kidFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -1086,7 +1086,7 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
|
||||
(aCellFrame->GetStateBits() &
|
||||
NS_FRAME_FIRST_REFLOW) != 0);
|
||||
|
||||
aCellFrame->DidReflow(aPresContext, nullptr, NS_FRAME_REFLOW_FINISHED);
|
||||
aCellFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||
|
||||
return desiredSize.height;
|
||||
}
|
||||
|
@ -1078,7 +1078,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext,
|
||||
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rowFrame->SetSize(nsSize(rowMetrics.width, rowMetrics.height));
|
||||
rowFrame->DidReflow(aPresContext, nullptr, NS_FRAME_REFLOW_FINISHED);
|
||||
rowFrame->DidReflow(aPresContext, nullptr, nsDidReflowStatus::FINISHED);
|
||||
rowFrame->DidResize();
|
||||
|
||||
if (!aRowForcedPageBreak && !NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
|
||||
|
Loading…
Reference in New Issue
Block a user