本文整理汇总了C++中nsIFrame::GetNextSibling方法的典型用法代码示例。如果您正苦于以下问题:C++ nsIFrame::GetNextSibling方法的具体用法?C++ nsIFrame::GetNextSibling怎么用?C++ nsIFrame::GetNextSibling使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsIFrame
的用法示例。
在下文中一共展示了nsIFrame::GetNextSibling方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddStateBits
nsIFrame*
nsFieldSetFrame::MaybeSetLegend(nsIFrame* aFrameList, nsIAtom* aListName)
{
if (!mLegendFrame && aFrameList->GetType() == nsLayoutAtoms::legendFrame) {
NS_ASSERTION(!aListName, "Unexpected frame list when adding legend frame");
mLegendFrame = aFrameList;
aFrameList = mLegendFrame->GetNextSibling();
mLegendFrame->SetNextSibling(mContentFrame);
mFrames.SetFrames(mLegendFrame);
AddStateBits(NS_FRAME_IS_DIRTY);
if (GetParent()) {
GetParent()->ReflowDirtyChild(mLegendFrame->GetPresContext()->GetPresShell(), this);
}
}
return aFrameList;
}
示例2: GetPresContext
NS_IMETHODIMP
nsFieldSetFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
// For reference, see bug 70648, bug 276104 and bug 236071.
if (aOldFrame == mLegendFrame) {
NS_ASSERTION(!aListName, "Unexpected frame list when removing legend frame");
NS_ASSERTION(mLegendFrame->GetParent() == this, "Legend Parent has wrong parent");
NS_ASSERTION(mLegendFrame->GetNextSibling() == mContentFrame, "mContentFrame is not next sibling");
nsPresContext* presContext = GetPresContext();
mFrames.DestroyFrame(presContext, mLegendFrame);
mLegendFrame = nsnull;
AddStateBits(NS_FRAME_IS_DIRTY);
if (GetParent()) {
GetParent()->ReflowDirtyChild(presContext->GetPresShell(), this);
}
return NS_OK;
}
return mContentFrame->RemoveFrame(aListName, aOldFrame);
}