本文整理汇总了C++中nsHTMLReflowMetrics::VisualOverflow方法的典型用法代码示例。如果您正苦于以下问题:C++ nsHTMLReflowMetrics::VisualOverflow方法的具体用法?C++ nsHTMLReflowMetrics::VisualOverflow怎么用?C++ nsHTMLReflowMetrics::VisualOverflow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsHTMLReflowMetrics
的用法示例。
在下文中一共展示了nsHTMLReflowMetrics::VisualOverflow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: indent
//.........这里部分代码省略.........
}
} else {
nsSize containingBlockSize =
CalculateContainingBlockSizeForAbsolutes(*reflowState,
nsSize(aMetrics.width,
aMetrics.height));
// Mark frames that depend on changes we just made to this frame as dirty:
// Now we can assume that the padding edge hasn't moved.
// We need to reflow the absolutes if one of them depends on
// its placeholder position, or the containing block size in a
// direction in which the containing block size might have
// changed.
bool cbWidthChanged = aMetrics.width != oldSize.width;
bool isRoot = !GetContent()->GetParent();
// If isRoot and we have auto height, then we are the initial
// containing block and the containing block height is the
// viewport height, which can't change during incremental
// reflow.
bool cbHeightChanged =
!(isRoot && NS_UNCONSTRAINEDSIZE == reflowState->ComputedHeight()) &&
aMetrics.height != oldSize.height;
absoluteContainer->Reflow(this, aPresContext, *reflowState,
state.mReflowStatus,
containingBlockSize.width,
containingBlockSize.height, true,
cbWidthChanged, cbHeightChanged,
&aMetrics.mOverflowAreas);
//XXXfr Why isn't this rv (and others in this file) checked/returned?
}
}
// Determine if we need to repaint our border, background or outline
CheckInvalidateSizeChange(aMetrics);
FinishAndStoreOverflow(&aMetrics);
// Clear the float manager pointer in the block reflow state so we
// don't waste time translating the coordinate system back on a dead
// float manager.
if (needFloatManager)
state.mFloatManager = nsnull;
aStatus = state.mReflowStatus;
#ifdef DEBUG
// Between when we drain pushed floats and when we complete reflow,
// we're allowed to have multiple continuations of the same float on
// our floats list, since a first-in-flow might get pushed to a later
// continuation of its containing block. But it's not permitted
// outside that time.
nsLayoutUtils::AssertNoDuplicateContinuations(this, mFloats);
if (gNoisyReflow) {
IndentBy(stdout, gNoiseIndent);
ListTag(stdout);
printf(": status=%x (%scomplete) metrics=%d,%d carriedMargin=%d",
aStatus, NS_FRAME_IS_COMPLETE(aStatus) ? "" : "not ",
aMetrics.width, aMetrics.height,
aMetrics.mCarriedOutBottomMargin.get());
if (HasOverflowAreas()) {
printf(" overflow-vis={%d,%d,%d,%d}",
aMetrics.VisualOverflow().x,
aMetrics.VisualOverflow().y,
aMetrics.VisualOverflow().width,
aMetrics.VisualOverflow().height);
printf(" overflow-scr={%d,%d,%d,%d}",
aMetrics.ScrollableOverflow().x,
aMetrics.ScrollableOverflow().y,
aMetrics.ScrollableOverflow().width,
aMetrics.ScrollableOverflow().height);
}
printf("\n");
}
if (gLameReflowMetrics) {
PRTime end = PR_Now();
PRInt32 ectc = nsLineBox::GetCtorCount();
PRInt32 numLines = mLines.size();
if (!numLines) numLines = 1;
PRTime delta, perLineDelta, lines;
LL_I2L(lines, numLines);
LL_SUB(delta, end, start);
LL_DIV(perLineDelta, delta, lines);
ListTag(stdout);
char buf[400];
PR_snprintf(buf, sizeof(buf),
": %lld elapsed (%lld per line) (%d lines; %d new lines)",
delta, perLineDelta, numLines, ectc - ctc);
printf("%s\n", buf);
}
#endif
NS_FRAME_SET_TRUNCATION(aStatus, (*reflowState), aMetrics);
return rv;
}