本文整理汇总了C++中nsFloatCacheFreeList::Head方法的典型用法代码示例。如果您正苦于以下问题:C++ nsFloatCacheFreeList::Head方法的具体用法?C++ nsFloatCacheFreeList::Head怎么用?C++ nsFloatCacheFreeList::Head使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsFloatCacheFreeList
的用法示例。
在下文中一共展示了nsFloatCacheFreeList::Head方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
/**
* Place below-current-line floats.
*/
void
nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
nsLineBox* aLine)
{
nsFloatCache* fc = aList.Head();
while (fc) {
#ifdef DEBUG
if (nsBlockFrame::gNoisyReflow) {
nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
printf("placing bcl float: ");
nsFrame::ListTag(stdout, fc->mFloat);
printf("\n");
}
#endif
// Place the float
bool placed = FlowAndPlaceFloat(fc->mFloat);
nsFloatCache *next = fc->Next();
if (!placed) {
aList.Remove(fc);
delete fc;
aLine->SetHadFloatPushed();
}
fc = next;
}
}
示例2: if
/**
* Place below-current-line floats.
*/
PRBool
nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList, PRBool aForceFit)
{
nsFloatCache* fc = aList.Head();
while (fc) {
{
#ifdef DEBUG
if (nsBlockFrame::gNoisyReflow) {
nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
printf("placing bcl float: ");
nsFrame::ListTag(stdout, fc->mPlaceholder->GetOutOfFlowFrame());
printf("\n");
}
#endif
// Place the float
PRBool isLeftFloat;
nsReflowStatus reflowStatus;
PRBool placed = FlowAndPlaceFloat(fc, &isLeftFloat, reflowStatus, aForceFit);
NS_ASSERTION(placed || !aForceFit,
"If we're in force-fit mode, we should have placed the float");
if (!placed || (NS_FRAME_IS_TRUNCATED(reflowStatus) && !aForceFit)) {
// return before processing all of the floats, since the line will be pushed.
return PR_FALSE;
}
else if (NS_FRAME_IS_NOT_COMPLETE(reflowStatus)) {
// Create a continuation for the incomplete float and its placeholder.
nsresult rv = mBlock->SplitPlaceholder(*this, fc->mPlaceholder);
if (NS_FAILED(rv))
return PR_FALSE;
} else {
// XXX We could deal with truncated frames better by breaking before
// the associated placeholder
NS_WARN_IF_FALSE(!NS_FRAME_IS_TRUNCATED(reflowStatus),
"This situation currently leads to data not printing");
// Float is complete. We need to delete any leftover placeholders now.
nsIFrame* nextPlaceholder = fc->mPlaceholder->GetNextInFlow();
if (nextPlaceholder) {
nsHTMLContainerFrame* parent =
static_cast<nsHTMLContainerFrame*>(nextPlaceholder->GetParent());
parent->DeleteNextInFlowChild(mPresContext, nextPlaceholder);
}
}
}
fc = fc->Next();
}
return PR_TRUE;
}
示例3: if
/**
* Place below-current-line floats.
*/
PRBool
nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList, PRBool aForceFit)
{
nsFloatCache* fc = aList.Head();
while (fc) {
{
#ifdef DEBUG
if (nsBlockFrame::gNoisyReflow) {
nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
printf("placing bcl float: ");
nsFrame::ListTag(stdout, fc->mFloat);
printf("\n");
}
#endif
// Place the float
nsReflowStatus reflowStatus;
PRBool placed = FlowAndPlaceFloat(fc->mFloat, reflowStatus, aForceFit);
NS_ASSERTION(placed || !aForceFit,
"If we're in force-fit mode, we should have placed the float");
if (!placed || (NS_FRAME_IS_TRUNCATED(reflowStatus) && !aForceFit)) {
// return before processing all of the floats, since the line will be pushed.
return PR_FALSE;
}
else if (!NS_FRAME_IS_FULLY_COMPLETE(reflowStatus)) {
// Create a continuation for the incomplete float
nsresult rv = mBlock->SplitFloat(*this, fc->mFloat, reflowStatus);
if (NS_FAILED(rv))
return PR_FALSE;
} else {
// XXX We could deal with truncated frames better by breaking before
// the associated placeholder
NS_WARN_IF_FALSE(!NS_FRAME_IS_TRUNCATED(reflowStatus),
"This situation currently leads to data not printing");
// Float is complete.
}
}
fc = fc->Next();
}
return PR_TRUE;
}