本文整理汇总了C++中nsDisplayListSet::BlockBorderBackgrounds方法的典型用法代码示例。如果您正苦于以下问题:C++ nsDisplayListSet::BlockBorderBackgrounds方法的具体用法?C++ nsDisplayListSet::BlockBorderBackgrounds怎么用?C++ nsDisplayListSet::BlockBorderBackgrounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsDisplayListSet
的用法示例。
在下文中一共展示了nsDisplayListSet::BlockBorderBackgrounds方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: childLists
void
nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DisplayBorderBackgroundOutline(aBuilder, aLists);
// Our children are all grid-level boxes, which behave the same as
// inline-blocks in painting, so their borders/backgrounds all go on
// the BlockBorderBackgrounds list.
// Also, we capture positioned descendants so we can sort them by
// CSS 'order'.
nsDisplayList positionedDescendants;
nsDisplayListSet childLists(aLists.BlockBorderBackgrounds(),
aLists.BlockBorderBackgrounds(),
aLists.Floats(),
aLists.Content(),
&positionedDescendants,
aLists.Outlines());
typedef GridItemCSSOrderIterator::OrderState OrderState;
OrderState order = mIsNormalFlowInCSSOrder ? OrderState::eKnownOrdered
: OrderState::eKnownUnordered;
GridItemCSSOrderIterator iter(this, kPrincipalList, order);
for (; !iter.AtEnd(); iter.Next()) {
nsIFrame* child = *iter;
BuildDisplayListForChild(aBuilder, child, aDirtyRect, childLists,
::GetDisplayFlagsForGridItem(child));
}
positionedDescendants.SortByCSSOrder(aBuilder);
aLists.PositionedDescendants()->AppendToTop(&positionedDescendants);
}
示例2: WrapLists
nsresult nsDisplayWrapper::WrapLists(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsDisplayListSet& aIn, const nsDisplayListSet& aOut)
{
nsresult rv = WrapListsInPlace(aBuilder, aFrame, aIn);
NS_ENSURE_SUCCESS(rv, rv);
if (&aOut == &aIn)
return NS_OK;
aOut.BorderBackground()->AppendToTop(aIn.BorderBackground());
aOut.BlockBorderBackgrounds()->AppendToTop(aIn.BlockBorderBackgrounds());
aOut.Floats()->AppendToTop(aIn.Floats());
aOut.Content()->AppendToTop(aIn.Content());
aOut.PositionedDescendants()->AppendToTop(aIn.PositionedDescendants());
aOut.Outlines()->AppendToTop(aIn.Outlines());
return NS_OK;
}
示例3: MoveTo
void nsDisplayListSet::MoveTo(const nsDisplayListSet& aDestination) const
{
aDestination.BorderBackground()->AppendToTop(BorderBackground());
aDestination.BlockBorderBackgrounds()->AppendToTop(BlockBorderBackgrounds());
aDestination.Floats()->AppendToTop(Floats());
aDestination.Content()->AppendToTop(Content());
aDestination.PositionedDescendants()->AppendToTop(PositionedDescendants());
aDestination.Outlines()->AppendToTop(Outlines());
}
示例4: set
void
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) {
// Paint our background and border in a special way.
// REVIEW: We don't really need to check frame emptiness here; if it's empty,
// the background/border display item won't do anything, and if it isn't empty,
// we need to paint the outline
if (!(GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) &&
IsVisibleForPainting(aBuilder)) {
if (StyleEffects()->mBoxShadow) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayBoxShadowOuter(aBuilder, this));
}
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
aBuilder, this, VisualBorderRectRelativeToSelf(),
aLists.BorderBackground(),
/* aAllowWillPaintBorderOptimization = */ false);
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayFieldSetBorderBackground(aBuilder, this));
DisplayOutlineUnconditional(aBuilder, aLists);
DO_GLOBAL_REFLOW_COUNT_DSP("nsFieldSetFrame");
}
if (GetPrevInFlow()) {
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
}
nsDisplayListCollection contentDisplayItems;
if (nsIFrame* inner = GetInner()) {
// Collect the inner frame's display items into their own collection.
// We need to be calling BuildDisplayList on it before the legend in
// case it contains out-of-flow frames whose placeholders are in the
// legend. However, we want the inner frame's display items to be
// after the legend's display items in z-order, so we need to save them
// and append them later.
BuildDisplayListForChild(aBuilder, inner, aDirtyRect, contentDisplayItems);
}
if (nsIFrame* legend = GetLegend()) {
// The legend's background goes on our BlockBorderBackgrounds list because
// it's a block child.
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
BuildDisplayListForChild(aBuilder, legend, aDirtyRect, set);
}
// Put the inner frame's display items on the master list. Note that this
// moves its border/background display items to our BorderBackground() list,
// which isn't really correct, but it's OK because the inner frame is
// anonymous and can't have its own border and background.
contentDisplayItems.MoveTo(aLists);
}
示例5: set
void
nsDeckFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// only paint the selected box
nsIFrame* box = GetSelectedBox();
if (!box)
return;
// Putting the child in the background list. This is a little weird but
// it matches what we were doing before.
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
BuildDisplayListForChild(aBuilder, box, aDirtyRect, set);
}
示例6: PrintDisplayListSetItem
void
nsFrame::PrintDisplayListSet(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aSet,
std::stringstream& aStream,
bool aDumpHtml)
{
if (aDumpHtml) {
aStream << "<ul>";
}
PrintDisplayListSetItem(aBuilder, "[BorderBackground]", *(aSet.BorderBackground()), aStream, aDumpHtml);
PrintDisplayListSetItem(aBuilder, "[BlockBorderBackgrounds]", *(aSet.BlockBorderBackgrounds()), aStream, aDumpHtml);
PrintDisplayListSetItem(aBuilder, "[Floats]", *(aSet.Floats()), aStream, aDumpHtml);
PrintDisplayListSetItem(aBuilder, "[PositionedDescendants]", *(aSet.PositionedDescendants()), aStream, aDumpHtml);
PrintDisplayListSetItem(aBuilder, "[Outlines]", *(aSet.Outlines()), aStream, aDumpHtml);
PrintDisplayListSetItem(aBuilder, "[Content]", *(aSet.Content()), aStream, aDumpHtml);
if (aDumpHtml) {
aStream << "</ul>";
}
}
示例7: WrapListsInPlace
nsresult nsDisplayWrapper::WrapListsInPlace(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsDisplayListSet& aLists)
{
nsresult rv;
if (WrapBorderBackground()) {
// Our border-backgrounds are in-flow
rv = WrapDisplayList(aBuilder, aFrame, aLists.BorderBackground(), this);
NS_ENSURE_SUCCESS(rv, rv);
}
// Our block border-backgrounds are in-flow
rv = WrapDisplayList(aBuilder, aFrame, aLists.BlockBorderBackgrounds(), this);
NS_ENSURE_SUCCESS(rv, rv);
// The floats are not in flow
rv = WrapEachDisplayItem(aBuilder, aLists.Floats(), this);
NS_ENSURE_SUCCESS(rv, rv);
// Our child content is in flow
rv = WrapDisplayList(aBuilder, aFrame, aLists.Content(), this);
NS_ENSURE_SUCCESS(rv, rv);
// The positioned descendants may not be in-flow
rv = WrapEachDisplayItem(aBuilder, aLists.PositionedDescendants(), this);
NS_ENSURE_SUCCESS(rv, rv);
// The outlines may not be in-flow
return WrapEachDisplayItem(aBuilder, aLists.Outlines(), this);
}