本文整理匯總了C++中DO_GLOBAL_REFLOW_COUNT函數的典型用法代碼示例。如果您正苦於以下問題:C++ DO_GLOBAL_REFLOW_COUNT函數的具體用法?C++ DO_GLOBAL_REFLOW_COUNT怎麽用?C++ DO_GLOBAL_REFLOW_COUNT使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DO_GLOBAL_REFLOW_COUNT函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP
nsLegendFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsLegendFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (mState & NS_FRAME_FIRST_REFLOW) {
nsFormControlFrame::RegUnRegAccessKey(static_cast<nsIFrame*>(this), PR_TRUE);
}
return nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}
示例2: DO_GLOBAL_REFLOW_COUNT
NS_METHOD
nsImageControlFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!GetPrevInFlow() && (mState & NS_FRAME_FIRST_REFLOW)) {
nsFormControlFrame::RegUnRegAccessKey(this, PR_TRUE);
}
return nsImageControlFrameSuper::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}
示例3: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP
nsRootBoxFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsRootBoxFrame");
#ifdef DEBUG_REFLOW
gReflows++;
printf("----Reflow %d----\n", gReflows);
#endif
return nsBoxFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}
示例4: while
nsresult
nsPlaceholderFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
#ifdef DEBUG
// We should be getting reflowed before our out-of-flow.
// If this is our first reflow, and our out-of-flow has already received its
// first reflow (before us), complain.
// XXXdholbert This "look for a previous continuation or IB-split sibling"
// code could use nsLayoutUtils::GetPrevContinuationOrIBSplitSibling(), if
// we ever add a function like that. (We currently have a "Next" version.)
if ((GetStateBits() & NS_FRAME_FIRST_REFLOW) &&
!(mOutOfFlowFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
// Unfortunately, this can currently happen when the placeholder is in a
// later continuation or later IB-split sibling than its out-of-flow (as
// is the case in some of our existing unit tests). So for now, in that
// case, we'll warn instead of asserting.
bool isInContinuationOrIBSplit = false;
nsIFrame* ancestor = this;
while ((ancestor = ancestor->GetParent())) {
if (ancestor->GetPrevContinuation() ||
ancestor->Properties().Get(IBSplitPrevSibling())) {
isInContinuationOrIBSplit = true;
break;
}
}
if (isInContinuationOrIBSplit) {
NS_WARNING("Out-of-flow frame got reflowed before its placeholder");
} else {
NS_ERROR("Out-of-flow frame got reflowed before its placeholder");
}
}
#endif
DO_GLOBAL_REFLOW_COUNT("nsPlaceholderFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.Width() = 0;
aDesiredSize.Height() = 0;
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
return NS_OK;
}
示例5: DO_GLOBAL_REFLOW_COUNT
nsresult
nsLeafFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsLeafFrame");
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("enter nsLeafFrame::Reflow: aMaxSize=%d,%d",
aReflowState.AvailableWidth(), aReflowState.AvailableHeight()));
NS_PRECONDITION(mState & NS_FRAME_IN_REFLOW, "frame is not in reflow");
DoReflow(aPresContext, aMetrics, aReflowState, aStatus);
FinishAndStoreOverflow(&aMetrics);
return NS_OK;
}
示例6: DO_GLOBAL_REFLOW_COUNT
void
nsTableColFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableColFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.ClearSize();
const nsStyleVisibility* colVis = StyleVisibility();
bool collapseCol = (NS_STYLE_VISIBILITY_COLLAPSE == colVis->mVisible);
if (collapseCol) {
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
tableFrame->SetNeedToCollapse(true);
}
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
}
示例7: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP
nsPlaceholderFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsPlaceholderFrame", aReflowState.reason);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.width = 0;
aDesiredSize.height = 0;
aDesiredSize.ascent = 0;
aDesiredSize.descent = 0;
if (aDesiredSize.mComputeMEW) {
aDesiredSize.mMaxElementWidth = 0;
}
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
return NS_OK;
}
示例8: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP nsProgressFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsProgressFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_ASSERTION(mBarDiv, "Progress bar div must exist!");
NS_ASSERTION(!GetPrevContinuation(),
"nsProgressFrame should not have continuations; if it does we "
"need to call RegUnregAccessKey only for the first.");
if (mState & NS_FRAME_FIRST_REFLOW) {
nsFormControlFrame::RegUnRegAccessKey(this, true);
}
nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
NS_ASSERTION(barFrame, "The progress frame should have a child with a frame!");
ReflowBarFrame(barFrame, aPresContext, aReflowState, aStatus);
aDesiredSize.width = aReflowState.ComputedWidth() +
aReflowState.mComputedBorderPadding.LeftRight();
aDesiredSize.height = aReflowState.ComputedHeight() +
aReflowState.mComputedBorderPadding.TopBottom();
aDesiredSize.height = NS_CSS_MINMAX(aDesiredSize.height,
aReflowState.mComputedMinHeight,
aReflowState.mComputedMaxHeight);
aDesiredSize.SetOverflowAreasToDesiredBounds();
ConsiderChildOverflow(aDesiredSize.mOverflowAreas, barFrame);
FinishAndStoreOverflow(&aDesiredSize);
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
return NS_OK;
}
示例9: DO_GLOBAL_REFLOW_COUNT
NS_METHOD nsTableColGroupFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableColGroupFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_ASSERTION(nsnull!=mContent, "bad state -- null content for frame");
nsresult rv=NS_OK;
const nsStyleVisibility* groupVis = GetStyleVisibility();
bool collapseGroup = (NS_STYLE_VISIBILITY_COLLAPSE == groupVis->mVisible);
if (collapseGroup) {
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
tableFrame->SetNeedToCollapse(true);
}
// for every content child that (is a column thingy and does not already have a frame)
// create a frame and adjust it's style
for (nsIFrame *kidFrame = mFrames.FirstChild(); kidFrame;
kidFrame = kidFrame->GetNextSibling()) {
// Give the child frame a chance to reflow, even though we know it'll have 0 size
nsHTMLReflowMetrics kidSize;
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
nsSize(0,0));
nsReflowStatus status;
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, 0, 0, 0, status);
FinishReflowChild(kidFrame, aPresContext, nsnull, kidSize, 0, 0, 0);
}
aDesiredSize.width=0;
aDesiredSize.height=0;
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
return rv;
}
示例10: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP nsFileControlFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFileControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE;
if (mState & NS_FRAME_FIRST_REFLOW) {
mTextFrame = GetTextControlFrame(aPresContext, this);
NS_ENSURE_TRUE(mTextFrame, NS_ERROR_UNEXPECTED);
if (mCachedState) {
mTextFrame->SetFormProperty(nsGkAtoms::value, *mCachedState);
delete mCachedState;
mCachedState = nsnull;
}
}
// The Areaframe takes care of all our reflow
return nsAreaFrame::Reflow(aPresContext, aDesiredSize, aReflowState,
aStatus);
}
示例11: DO_GLOBAL_REFLOW_COUNT
/* virtual */ void
nsRubyTextContainerFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsRubyTextContainerFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// All rt children have already been reflowed. All we need to do is clean up
// the line layout.
aStatus = NS_FRAME_COMPLETE;
mozilla::WritingMode lineWM = aReflowState.mLineLayout->GetWritingMode();
mozilla::WritingMode frameWM = aReflowState.GetWritingMode();
mozilla::LogicalMargin borderPadding =
aReflowState.ComputedLogicalBorderPadding();
aDesiredSize.ISize(lineWM) = mISize;
nsLayoutUtils::SetBSizeFromFontMetrics(this, aDesiredSize, aReflowState,
borderPadding, lineWM, frameWM);
nscoord bsize = aDesiredSize.BSize(lineWM);
if (!mLines.empty()) {
// Okay to use BlockStartAscent because it has just been correctly set by
// nsLayoutUtils::SetBSizeFromFontMetrics.
mLines.begin()->SetLogicalAscent(aDesiredSize.BlockStartAscent());
mLines.begin()->SetBounds(aReflowState.GetWritingMode(), 0, 0, mISize,
bsize, mISize);
}
if (mLineLayout) {
mLineLayout->EndLineReflow();
mLineLayout = nullptr;
}
}
示例12: DO_GLOBAL_REFLOW_COUNT
nsresult
nsPageBreakFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsPageBreakFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// Override reflow, since we don't want to deal with what our
// computed values are.
aDesiredSize.width = GetIntrinsicWidth();
aDesiredSize.height = (aReflowState.availableHeight == NS_UNCONSTRAINEDSIZE ?
0 : aReflowState.availableHeight);
// round the height down to the nearest pixel
aDesiredSize.height -=
aDesiredSize.height % nsPresContext::CSSPixelsToAppUnits(1);
// Note: not using NS_FRAME_FIRST_REFLOW here, since it's not clear whether
// DidReflow will always get called before the next Reflow() call.
mHaveReflowed = PR_TRUE;
aStatus = NS_FRAME_COMPLETE;
return NS_OK;
}
示例13: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP
SpacerFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("SpacerFrame", aReflowState.reason);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
aStatus = NS_FRAME_COMPLETE;
// By default, we have no area
aMetrics.width = 0;
aMetrics.height = 0;
aMetrics.ascent = 0;
aMetrics.descent = 0;
const nsStylePosition* position = GetStylePosition();
PRUint8 type = GetType();
switch (type) {
case TYPE_WORD:
break;
case TYPE_LINE:
aStatus = NS_INLINE_LINE_BREAK_AFTER(NS_FRAME_COMPLETE);
if (eStyleUnit_Coord == position->mHeight.GetUnit()) {
aMetrics.width = position->mHeight.GetCoordValue();
}
aMetrics.ascent = aMetrics.height;
break;
case TYPE_IMAGE:
// width
nsStyleUnit unit = position->mWidth.GetUnit();
if (eStyleUnit_Coord == unit) {
aMetrics.width = position->mWidth.GetCoordValue();
}
else if (eStyleUnit_Percent == unit)
{
if (NS_UNCONSTRAINEDSIZE != aReflowState.availableWidth)
{
float factor = position->mWidth.GetPercentValue();
aMetrics.width = NSToCoordRound (factor * aReflowState.availableWidth);
}
}
// height
unit = position->mHeight.GetUnit();
if (eStyleUnit_Coord == unit) {
aMetrics.height = position->mHeight.GetCoordValue();
}
else if (eStyleUnit_Percent == unit)
{
if (NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight)
{
float factor = position->mHeight.GetPercentValue();
aMetrics.width = NSToCoordRound (factor * aReflowState.availableHeight);
}
}
// accent
aMetrics.ascent = aMetrics.height;
break;
}
if (aMetrics.width || aMetrics.height) {
// Make sure that the other dimension is non-zero
if (!aMetrics.width) aMetrics.width = 1;
if (!aMetrics.height) aMetrics.height = 1;
}
if (aMetrics.mComputeMEW) {
aMetrics.SetMEWToActualWidth(aReflowState.mStylePosition->mWidth.GetUnit());
}
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
return NS_OK;
}
示例14: DO_GLOBAL_REFLOW_COUNT
NS_IMETHODIMP
nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aReflowStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFirstLetterFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aReflowStatus);
nsresult rv = NS_OK;
// Grab overflow list
DrainOverflowFrames(aPresContext);
nsIFrame* kid = mFrames.FirstChild();
// Setup reflow state for our child
nsSize availSize(aReflowState.availableWidth, aReflowState.availableHeight);
const nsMargin& bp = aReflowState.mComputedBorderPadding;
nscoord lr = bp.left + bp.right;
nscoord tb = bp.top + bp.bottom;
NS_ASSERTION(availSize.width != NS_UNCONSTRAINEDSIZE,
"should no longer use unconstrained widths");
availSize.width -= lr;
if (NS_UNCONSTRAINEDSIZE != availSize.height) {
availSize.height -= tb;
}
// Reflow the child
if (!aReflowState.mLineLayout) {
// When there is no lineLayout provided, we provide our own. The
// only time that the first-letter-frame is not reflowing in a
// line context is when its floating.
nsHTMLReflowState rs(aPresContext, aReflowState, kid, availSize);
nsLineLayout ll(aPresContext, nsnull, &aReflowState, nsnull);
ll.BeginLineReflow(bp.left, bp.top, availSize.width, NS_UNCONSTRAINEDSIZE,
PR_FALSE, PR_TRUE);
rs.mLineLayout = ≪
ll.SetFirstLetterStyleOK(PR_TRUE);
kid->WillReflow(aPresContext);
kid->Reflow(aPresContext, aMetrics, rs, aReflowStatus);
ll.EndLineReflow();
}
else {
// Pretend we are a span and reflow the child frame
nsLineLayout* ll = aReflowState.mLineLayout;
PRBool pushedFrame;
NS_ASSERTION(ll->GetFirstLetterStyleOK() || GetPrevInFlow(),
"First-in-flow first-letter should have first-letter style enabled in nsLineLayout!");
ll->BeginSpan(this, &aReflowState, bp.left, availSize.width);
ll->ReflowFrame(kid, aReflowStatus, &aMetrics, pushedFrame);
ll->EndSpan(this);
}
// 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, nsnull, NS_FRAME_REFLOW_FINISHED);
aMetrics.width += lr;
aMetrics.height += tb;
aMetrics.ascent += bp.top;
mBaseline = aMetrics.ascent;
// Ensure that the overflow rect contains the child textframe's overflow rect.
// Note that if this is floating, the overline/underline drawable area is in
// the overflow rect of the child textframe.
aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea,
nsRect(0, 0, aMetrics.width, aMetrics.height));
ConsiderChildOverflow(aMetrics.mOverflowArea, kid);
// Create a continuation or remove existing continuations based on
// the reflow completion status.
if (NS_FRAME_IS_COMPLETE(aReflowStatus)) {
if (aReflowState.mLineLayout) {
aReflowState.mLineLayout->SetFirstLetterStyleOK(PR_FALSE);
}
nsIFrame* kidNextInFlow = kid->GetNextInFlow();
if (kidNextInFlow) {
// Remove all of the childs next-in-flows
static_cast<nsContainerFrame*>(kidNextInFlow->GetParent())
->DeleteNextInFlowChild(aPresContext, kidNextInFlow);
}
}
else {
// Create a continuation for the child frame if it doesn't already
// have one.
nsIFrame* nextInFlow;
rv = CreateNextInFlow(aPresContext, this, kid, nextInFlow);
if (NS_FAILED(rv)) {
return rv;
}
// And then push it to our overflow list
if (nextInFlow) {
kid->SetNextSibling(nsnull);
SetOverflowFrames(aPresContext, nextInFlow);
}
//.........這裏部分代碼省略.........
示例15: DO_GLOBAL_REFLOW_COUNT
void
nsLeafBoxFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
// This is mostly a copy of nsBoxFrame::Reflow().
// We aren't able to share an implementation because of the frame
// class hierarchy. If you make changes here, please keep
// nsBoxFrame::Reflow in sync.
DO_GLOBAL_REFLOW_COUNT("nsLeafBoxFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_ASSERTION(aReflowState.ComputedWidth() >=0 &&
aReflowState.ComputedHeight() >= 0, "Computed Size < 0");
#ifdef DO_NOISY_REFLOW
printf("\n-------------Starting LeafBoxFrame Reflow ----------------------------\n");
printf("%p ** nsLBF::Reflow %d R: ", this, myCounter++);
switch (aReflowState.reason) {
case eReflowReason_Initial:
printf("Ini");break;
case eReflowReason_Incremental:
printf("Inc");break;
case eReflowReason_Resize:
printf("Rsz");break;
case eReflowReason_StyleChange:
printf("Sty");break;
case eReflowReason_Dirty:
printf("Drt ");
break;
default:printf("<unknown>%d", aReflowState.reason);break;
}
printSize("AW", aReflowState.AvailableWidth());
printSize("AH", aReflowState.AvailableHeight());
printSize("CW", aReflowState.ComputedWidth());
printSize("CH", aReflowState.ComputedHeight());
printf(" *\n");
#endif
aStatus = NS_FRAME_COMPLETE;
// create the layout state
nsBoxLayoutState state(aPresContext, aReflowState.rendContext);
nsSize computedSize(aReflowState.ComputedWidth(),aReflowState.ComputedHeight());
nsMargin m;
m = aReflowState.ComputedPhysicalBorderPadding();
//GetBorderAndPadding(m);
// this happens sometimes. So lets handle it gracefully.
if (aReflowState.ComputedHeight() == 0) {
nsSize minSize = GetMinSize(state);
computedSize.height = minSize.height - m.top - m.bottom;
}
nsSize prefSize(0,0);
// if we are told to layout intrinic then get our preferred size.
if (computedSize.width == NS_INTRINSICSIZE || computedSize.height == NS_INTRINSICSIZE) {
prefSize = GetPrefSize(state);
nsSize minSize = GetMinSize(state);
nsSize maxSize = GetMaxSize(state);
prefSize = BoundsCheck(minSize, prefSize, maxSize);
}
// get our desiredSize
if (aReflowState.ComputedWidth() == NS_INTRINSICSIZE) {
computedSize.width = prefSize.width;
} else {
computedSize.width += m.left + m.right;
}
if (aReflowState.ComputedHeight() == NS_INTRINSICSIZE) {
computedSize.height = prefSize.height;
} else {
computedSize.height += m.top + m.bottom;
}
// handle reflow state min and max sizes
// XXXbz the width handling here seems to be wrong, since
// mComputedMin/MaxWidth is a content-box size, whole
// computedSize.width is a border-box size...
if (computedSize.width > aReflowState.ComputedMaxWidth())
computedSize.width = aReflowState.ComputedMaxWidth();
if (computedSize.width < aReflowState.ComputedMinWidth())
computedSize.width = aReflowState.ComputedMinWidth();
// Now adjust computedSize.height for our min and max computed
// height. The only problem is that those are content-box sizes,
// while computedSize.height is a border-box size. So subtract off
// m.TopBottom() before adjusting, then readd it.
computedSize.height = std::max(0, computedSize.height - m.TopBottom());
//.........這裏部分代碼省略.........