本文整理汇总了C++中nsTableFrame::IsFloating方法的典型用法代码示例。如果您正苦于以下问题:C++ nsTableFrame::IsFloating方法的具体用法?C++ nsTableFrame::IsFloating怎么用?C++ nsTableFrame::IsFloating使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsTableFrame
的用法示例。
在下文中一共展示了nsTableFrame::IsFloating方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iter
//.........这里部分代码省略.........
(cellFrame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_HEIGHT) ||
HasPctHeight()) {
// Reflow the cell to fit the available width, height
// XXX The old IR_ChildIsDirty code used availCellWidth here.
nsSize kidAvailSize(availCellWidth, aReflowState.availableHeight);
// Reflow the child
nsTableCellReflowState kidReflowState(aPresContext, aReflowState,
kidFrame, kidAvailSize, false);
InitChildReflowState(*aPresContext, kidAvailSize, borderCollapse,
kidReflowState);
nsReflowStatus status;
rv = ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState,
x, 0, NS_FRAME_INVALIDATE_ON_MOVE, status);
// allow the table to determine if/how the table needs to be rebalanced
// If any of the cells are not complete, then we're not complete
if (NS_FRAME_IS_NOT_COMPLETE(status)) {
aStatus = NS_FRAME_NOT_COMPLETE;
}
}
else {
if (x != kidRect.x) {
kidFrame->InvalidateFrameSubtree();
}
desiredSize.width = cellDesiredSize.width;
desiredSize.height = cellDesiredSize.height;
desiredSize.mOverflowAreas = cellFrame->GetOverflowAreas();
// if we are in a floated table, our position is not yet established, so we cannot reposition our views
// the containing block will do this for us after positioning the table
if (!aTableFrame.IsFloating()) {
// Because we may have moved the frame we need to make sure any views are
// positioned properly. We have to do this, because any one of our parent
// frames could have moved and we have no way of knowing...
nsTableFrame::RePositionViews(kidFrame);
}
}
if (NS_UNCONSTRAINEDSIZE == aReflowState.availableHeight) {
if (!GetPrevInFlow()) {
// Calculate the cell's actual height given its pass2 height. This
// function takes into account the specified height (in the style)
CalculateCellActualHeight(cellFrame, desiredSize.height);
}
// height may have changed, adjust descent to absorb any excess difference
nscoord ascent;
if (!kidFrame->GetFirstPrincipalChild()->GetFirstPrincipalChild())
ascent = desiredSize.height;
else
ascent = ((nsTableCellFrame *)kidFrame)->GetCellBaseline();
nscoord descent = desiredSize.height - ascent;
UpdateHeight(desiredSize.height, ascent, descent, &aTableFrame, cellFrame);
}
else {
cellMaxHeight = NS_MAX(cellMaxHeight, desiredSize.height);
PRInt32 rowSpan = aTableFrame.GetEffectiveRowSpan((nsTableCellFrame&)*kidFrame);
if (1 == rowSpan) {
SetContentHeight(cellMaxHeight);
}
}
// Place the child
desiredSize.width = availCellWidth;