Bug 1425078 - Remove nsDisplayList::AppendNewToTop and nsDisplayList::AppendNewToBottom r=mattwoodrow

MozReview-Commit-ID: E3neKT2sV4Q
This commit is contained in:
Miko Mynttinen
2017-12-13 11:23:04 -06:00
parent 408c755b50
commit 896b0f3d84
44 changed files with 122 additions and 142 deletions

View File

@@ -5203,7 +5203,7 @@ PresShell::AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
nsIFrame* aFrame,
const nsRect& aBounds)
{
aList.AppendNewToBottom(new (&aBuilder)
aList.AppendToBottom(new (&aBuilder)
nsDisplaySolidColor(&aBuilder, aFrame, aBounds, NS_RGB(115, 115, 115)));
}
@@ -5287,7 +5287,7 @@ PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
}
if (!addedScrollingBackgroundColor || forceUnscrolledItem) {
aList.AppendNewToBottom(
aList.AppendToBottom(
new (&aBuilder) nsDisplaySolidColor(&aBuilder, aFrame, aBounds, bgcolor));
}
}

View File

@@ -489,7 +489,7 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
nsDisplayList* aForeground)
{
if (mFrame->StyleEffects()->mBoxShadow) {
aBackground->AppendNewToTop(new (aBuilder)
aBackground->AppendToTop(new (aBuilder)
nsDisplayButtonBoxShadowOuter(aBuilder, this));
}
@@ -498,13 +498,13 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
aBuilder, mFrame, buttonRect, aBackground);
aBackground->AppendNewToTop(new (aBuilder)
aBackground->AppendToTop(new (aBuilder)
nsDisplayButtonBorder(aBuilder, this));
// Only display focus rings if we actually have them. Since at most one
// button would normally display a focus ring, most buttons won't have them.
if (mInnerFocusStyle && mInnerFocusStyle->StyleBorder()->HasBorder()) {
aForeground->AppendNewToTop(new (aBuilder)
aForeground->AppendToTop(new (aBuilder)
nsDisplayButtonForeground(aBuilder, this));
}
return NS_OK;

View File

@@ -1574,7 +1574,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if ((!IsThemed(disp) ||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) &&
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));
}
}

View File

@@ -196,7 +196,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!(GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) &&
IsVisibleForPainting(aBuilder)) {
if (StyleEffects()->mBoxShadow) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayBoxShadowOuter(aBuilder, this));
}
@@ -205,7 +205,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
aLists.BorderBackground(),
/* aAllowWillPaintBorderOptimization = */ false);
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayFieldSetBorder(aBuilder, this));
DisplayOutlineUnconditional(aBuilder, aLists);

View File

@@ -178,7 +178,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// XXX Because we have an opaque widget and we get called to paint with
// this frame as the root of a stacking context we need make sure to draw
// some opaque color over the whole widget. (Bug 511323)
aLists.BorderBackground()->AppendNewToBottom(
aLists.BorderBackground()->AppendToBottom(
new (aBuilder) nsDisplaySolidColor(aBuilder,
this, nsRect(aBuilder->ToReferenceFrame(this), GetSize()),
mLastDropdownBackstopColor));

View File

@@ -304,7 +304,7 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return; // the native theme displays its own visual indication of focus
}
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayRangeFocusRing(aBuilder, this));
}

View File

@@ -154,7 +154,7 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
// we can't just associate the display item with the list frame,
// because then the list's scrollframe won't clip it (the scrollframe
// only clips contained descendants).
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayListFocus(aBuilder, this));
}
}

View File

@@ -858,7 +858,7 @@ TextOverflow::CreateMarkers(const nsLineBox* aLine,
nsDisplayItem* marker = new (mBuilder)
nsDisplayTextOverflowMarker(mBuilder, mBlock, markerRect,
aLine->GetLogicalAscent(), mIStart.mStyle, aLineNumber, 0);
mMarkerList.AppendNewToTop(marker);
mMarkerList.AppendToTop(marker);
}
if (aCreateIEnd) {
@@ -875,7 +875,7 @@ TextOverflow::CreateMarkers(const nsLineBox* aLine,
nsDisplayItem* marker = new (mBuilder)
nsDisplayTextOverflowMarker(mBuilder, mBlock, markerRect,
aLine->GetLogicalAscent(), mIEnd.mStyle, aLineNumber, 1);
mMarkerList.AppendNewToTop(marker);
mMarkerList.AppendToTop(marker);
}
}

View File

@@ -75,7 +75,7 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
new (aBuilder) nsDisplayWrapList(aBuilder, this, &topLayerList);
wrapList->SetOverrideZIndex(
std::numeric_limits<decltype(wrapList->ZIndex())>::max());
aLists.PositionedDescendants()->AppendNewToTop(wrapList);
aLists.PositionedDescendants()->AppendToTop(wrapList);
}
}

View File

@@ -786,7 +786,7 @@ nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayBullet(aBuilder, this));
}

View File

@@ -508,11 +508,11 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
dependentFrame = nullptr;
}
}
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayCanvasBackgroundColor(aBuilder, this));
if (isThemed) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayCanvasThemedBackground(aBuilder, this));
return;
}
@@ -571,18 +571,18 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
bgItem = new (aBuilder) nsDisplayCanvasBackgroundImage(bgData);
bgItem->SetDependentFrame(aBuilder, dependentFrame);
}
thisItemList.AppendNewToTop(
thisItemList.AppendToTop(
nsDisplayFixedPosition::CreateForFixedBackground(aBuilder, this, bgItem, i));
} else {
nsDisplayCanvasBackgroundImage* bgItem = new (aBuilder) nsDisplayCanvasBackgroundImage(bgData);
bgItem->SetDependentFrame(aBuilder, dependentFrame);
thisItemList.AppendNewToTop(bgItem);
thisItemList.AppendToTop(bgItem);
}
if (layers.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) {
DisplayListClipState::AutoSaveRestore blendClip(aBuilder);
thisItemList.AppendNewToTop(
thisItemList.AppendToTop(
new (aBuilder) nsDisplayBlendMode(aBuilder, this, &thisItemList,
layers.mLayers[i].mBlendMode,
thisItemASR, i + 1));
@@ -593,7 +593,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (needBlendContainer) {
const ActiveScrolledRoot* containerASR = contASRTracker.GetContainerASR();
DisplayListClipState::AutoSaveRestore blendContainerClip(aBuilder);
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
nsDisplayBlendContainer::CreateForBackgroundBlendMode(aBuilder, this,
aLists.BorderBackground(),
containerASR));
@@ -631,7 +631,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!StyleVisibility()->IsVisible())
return;
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayCanvasFocus(aBuilder, this));
}

View File

@@ -1285,7 +1285,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (IsVisibleForPainting(aBuilder)) {
aLists.BorderBackground()->
AppendNewToTop(new (aBuilder) nsDisplayColumnRule(aBuilder, this));
AppendToTop(new (aBuilder) nsDisplayColumnRule(aBuilder, this));
}
// Our children won't have backgrounds so it doesn't matter where we put them.

View File

@@ -2274,7 +2274,7 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
return;
}
aList->AppendNewToTop(new (aBuilder)
aList->AppendToTop(new (aBuilder)
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
}
@@ -2286,7 +2286,7 @@ nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
return;
}
aLists.Outlines()->AppendNewToTop(
aLists.Outlines()->AppendToTop(
new (aBuilder) nsDisplayOutline(aBuilder, this));
}
@@ -2307,7 +2307,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
if (!IsVisibleForPainting(aBuilder))
return;
aList->AppendNewToTop(new (aBuilder) nsDisplayCaret(aBuilder, this));
aList->AppendToTop(new (aBuilder) nsDisplayCaret(aBuilder, this));
}
nscolor
@@ -2346,7 +2346,7 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
nsCSSShadowArray* shadows = StyleEffects()->mBoxShadow;
if (shadows && shadows->HasShadowWithInset(false)) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayBoxShadowOuter(aBuilder, this));
}
@@ -2354,14 +2354,14 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
aForceBackground);
if (shadows && shadows->HasShadowWithInset(true)) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayBoxShadowInner(aBuilder, this));
}
// If there's a themed background, we should not create a border item.
// It won't be rendered.
if (!bgIsThemed && StyleBorder()->HasBorder()) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayBorder(aBuilder, this));
}
@@ -2497,14 +2497,14 @@ DisplayDebugBorders(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
// Draw a border around the child
// REVIEW: From nsContainerFrame::PaintChild
if (nsFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) {
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, aFrame, PaintDebugBorder, "DebugBorder",
DisplayItemType::TYPE_DEBUG_BORDER));
}
// Draw a border around the current event target
if (nsFrame::GetShowEventTargetFrameBorder() &&
aFrame->PresShell()->GetDrawEventTargetFrame() == aFrame) {
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, aFrame, PaintEventTargetBorder, "EventTargetBorder",
DisplayItemType::TYPE_EVENT_TARGET_BORDER));
}
@@ -3056,7 +3056,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
if (aBuilder->BuildCompositorHitTestInfo()) {
CompositorHitTestInfo info = GetCompositorHitTestInfo(aBuilder);
if (info != CompositorHitTestInfo::eInvisibleToHitTest) {
set.BorderBackground()->AppendNewToBottom(
set.BorderBackground()->AppendToBottom(
new (aBuilder) nsDisplayCompositorHitTestInfo(aBuilder, this, info));
}
}
@@ -3076,7 +3076,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
dirtyRect + aBuilder->GetCurrentFrameOffsetToReferenceFrame(),
NS_RGBA(255, 0, 0, 64), false);
color->SetOverrideZIndex(INT32_MAX);
set.PositionedDescendants()->AppendNewToTop(color);
set.PositionedDescendants()->AppendToTop(color);
}
// Sort PositionedDescendants() in CSS 'z-order' order. The list is already
@@ -3143,7 +3143,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
*/
if (aBuilder->ContainsBlendMode()) {
DisplayListClipState::AutoSaveRestore blendContainerClipState(aBuilder);
resultList.AppendNewToTop(
resultList.AppendToTop(
nsDisplayBlendContainer::CreateForMixBlendMode(aBuilder, this, &resultList,
containerItemASR));
if (aCreatedContainerItem) {
@@ -3174,7 +3174,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
bool handleOpacity = !usingMask && !useOpacity;
/* List now emptied, so add the new list to the top. */
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayFilter(aBuilder, this, &resultList,
handleOpacity));
}
@@ -3194,7 +3194,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
? aBuilder->CurrentActiveScrolledRoot()
: containerItemASR;
/* List now emptied, so add the new list to the top. */
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayMask(aBuilder, this, &resultList, !useOpacity,
maskASR));
}
@@ -3216,7 +3216,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
// The clip we would set on an element with opacity would clip
// all descendant content, but some should not be clipped.
DisplayListClipState::AutoSaveRestore opacityClipState(aBuilder);
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList,
containerItemASR,
opacityItemForEventsAndPluginsOnly));
@@ -3286,13 +3286,13 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
new (aBuilder) nsDisplayTransform(aBuilder, this,
&resultList, visibleRect, 0,
allowAsyncAnimation);
resultList.AppendNewToTop(transformItem);
resultList.AppendToTop(transformItem);
if (hasPerspective) {
if (clipCapturedBy == ContainerItemType::ePerspective) {
clipState.Restore();
}
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayPerspective(
aBuilder, this,
GetContainingBlock(0, disp)->GetContent()->GetPrimaryFrame(),
@@ -3306,7 +3306,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
if (clipCapturedBy == ContainerItemType::eOwnLayerForTransformWithRoundedClip) {
clipState.Restore();
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayOwnLayer(aBuilder, this, &resultList,
aBuilder->CurrentActiveScrolledRoot(),
nsDisplayOwnLayerFlags::eNone,
@@ -3329,7 +3329,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
// we need to take the containerItemASR since we might have fixed children.
const ActiveScrolledRoot* fixedASR =
ActiveScrolledRoot::PickAncestor(containerItemASR, aBuilder->CurrentActiveScrolledRoot());
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayFixedPosition(aBuilder, this, &resultList, fixedASR));
if (aCreatedContainerItem) {
*aCreatedContainerItem = true;
@@ -3345,7 +3345,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
// item's ASR is the ASR of the fixed descendant.
const ActiveScrolledRoot* stickyASR =
ActiveScrolledRoot::PickAncestor(containerItemASR, aBuilder->CurrentActiveScrolledRoot());
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayStickyPosition(aBuilder, this, &resultList, stickyASR));
if (aCreatedContainerItem) {
*aCreatedContainerItem = true;
@@ -3359,7 +3359,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
if (useBlendMode) {
DisplayListClipState::AutoSaveRestore blendModeClipState(aBuilder);
resultList.AppendNewToTop(
resultList.AppendToTop(
new (aBuilder) nsDisplayBlendMode(aBuilder, this, &resultList,
effects->mMixBlendMode,
containerItemASR));
@@ -3494,7 +3494,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (aBuilder->BuildCompositorHitTestInfo()) {
CompositorHitTestInfo info = child->GetCompositorHitTestInfo(aBuilder);
if (info != CompositorHitTestInfo::eInvisibleToHitTest) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayCompositorHitTestInfo(aBuilder, child, info));
}
}
@@ -3721,9 +3721,9 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
nsDisplayItem* item =
new (aBuilder) nsDisplayCompositorHitTestInfo(aBuilder, child, info);
if (isPositioned) {
list.AppendNewToTop(item);
list.AppendToTop(item);
} else {
aLists.BorderBackground()->AppendNewToTop(item);
aLists.BorderBackground()->AppendToTop(item);
}
}
}
@@ -3739,9 +3739,9 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (isPositioned) {
// We need this nsDisplayLayerEventRegions to be sorted with the positioned
// elements as positioned elements will be sorted on top of normal elements
list.AppendNewToTop(eventRegions);
list.AppendToTop(eventRegions);
} else {
aLists.BorderBackground()->AppendNewToTop(eventRegions);
aLists.BorderBackground()->AppendToTop(eventRegions);
}
} else {
nsDisplayLayerEventRegions* eventRegions = aBuilder->GetLayerEventRegions();
@@ -3804,14 +3804,14 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (!list.IsEmpty()) {
nsDisplayItem* item = WrapInWrapList(aBuilder, child, &list, wrapListASR, canSkipWrapList);
if (isSVG) {
aLists.Content()->AppendNewToTop(item);
aLists.Content()->AppendToTop(item);
} else {
aLists.PositionedDescendants()->AppendNewToTop(item);
aLists.PositionedDescendants()->AppendToTop(item);
}
}
} else if (!isSVG && disp->IsFloating(child)) {
if (!list.IsEmpty()) {
aLists.Floats()->AppendNewToTop(WrapInWrapList(aBuilder, child, &list, wrapListASR));
aLists.Floats()->AppendToTop(WrapInWrapList(aBuilder, child, &list, wrapListASR));
}
} else {
aLists.Content()->AppendToTop(&list);
@@ -10931,7 +10931,7 @@ nsIFrame::CreateOwnLayerIfNeeded(nsDisplayListBuilder* aBuilder,
if (GetContent() &&
GetContent()->IsXULElement() &&
GetContent()->HasAttr(kNameSpaceID_None, nsGkAtoms::layer)) {
aList->AppendNewToTop(new (aBuilder)
aList->AppendToTop(new (aBuilder)
nsDisplayOwnLayer(aBuilder, this, aList, aBuilder->CurrentActiveScrolledRoot()));
if (aCreatedContainerItem) {
*aCreatedContainerItem = true;

View File

@@ -679,7 +679,7 @@ nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
BuildDisplayListForInline(aBuilder, aLists);
if (mDragger && aBuilder->IsForEventDelivery()) {
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
}
}
@@ -1422,7 +1422,7 @@ void
nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayFramesetBorder(aBuilder, this));
}
@@ -1633,6 +1633,6 @@ void
nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayFramesetBlank(aBuilder, this));
}

View File

@@ -3031,9 +3031,9 @@ AppendInternalItemToTop(const nsDisplayListSet& aLists,
{
if (aZIndex >= 0) {
aItem->SetOverrideZIndex(aZIndex);
aLists.PositionedDescendants()->AppendNewToTop(aItem);
aLists.PositionedDescendants()->AppendToTop(aItem);
} else {
aLists.Content()->AppendNewToTop(aItem);
aLists.Content()->AppendToTop(aItem);
}
}
@@ -3077,7 +3077,7 @@ AppendToTop(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists,
int32_t zIndex = MaxZIndexInList(aLists.PositionedDescendants(), aBuilder);
AppendInternalItemToTop(aLists, newItem, zIndex);
} else {
aLists.BorderBackground()->AppendNewToTop(newItem);
aLists.BorderBackground()->AppendToTop(newItem);
}
}
@@ -3615,7 +3615,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
dirtyRect + aBuilder->GetCurrentFrameOffsetToReferenceFrame(),
NS_RGBA(0, 0, 255, 64), false);
color->SetOverrideZIndex(INT32_MAX);
scrolledContent.PositionedDescendants()->AppendNewToTop(color);
scrolledContent.PositionedDescendants()->AppendToTop(color);
}
}

View File

@@ -481,7 +481,7 @@ nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayListClipState::AutoClipContainingBlockDescendantsToContentBox
clip(aBuilder, this, clipFlags);
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayCanvas(aBuilder, this));
DisplaySelectionOverlay(aBuilder, aLists.Content(),

View File

@@ -1844,7 +1844,7 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!imageOK || !mImage || !SizeIsAvailable(currentRequest)) {
// No image yet, or image load failed. Draw the alt-text and an icon
// indicating the status
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayAltFeedback(aBuilder, this));
// This image is visible (we are being asked to paint it) but it's not
@@ -1862,7 +1862,7 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
} else {
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayImage(aBuilder, this, mImage, mPrevImage));
// If we were previously displaying an icon, we're not anymore
@@ -1873,7 +1873,7 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
if (GetShowFrameBorders() && GetImageMap()) {
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this, PaintDebugImageMap, "DebugImageMap",
DisplayItemType::TYPE_DEBUG_IMAGE_MAP));
}

View File

@@ -586,13 +586,13 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
*aBuilder, content, child, backgroundRect, NS_RGBA(0,0,0,0));
}
content.AppendNewToTop(new (aBuilder) nsDisplayTransform(aBuilder, child,
content.AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder, child,
&content, content.GetVisibleRect(), ::ComputePageTransform));
set.Content()->AppendToTop(&content);
if (PresContext()->IsRootPaginatedDocument()) {
set.Content()->AppendNewToTop(new (aBuilder)
set.Content()->AppendToTop(new (aBuilder)
nsDisplayHeaderFooter(aBuilder, this));
}

View File

@@ -272,7 +272,7 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
if (GetShowFrameBorders()) {
aLists.Outlines()->AppendNewToTop(
aLists.Outlines()->AppendToTop(
new (aBuilder) nsDisplayGeneric(aBuilder, this, PaintDebugPlaceholder,
"DebugPlaceholder",
DisplayItemType::TYPE_DEBUG_PLACEHOLDER));

View File

@@ -1192,7 +1192,7 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// determine if we are printing
if (type == nsPresContext::eContext_Print) {
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
DisplayItemType::TYPE_PRINT_PLUGIN));
} else {
@@ -1204,11 +1204,11 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (aBuilder->IsPaintingToWindow() &&
state == LAYER_ACTIVE &&
IsTransparentMode()) {
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayPluginReadback(aBuilder, this));
}
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayPlugin(aBuilder, this));
}
}

View File

@@ -747,7 +747,7 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
content.AppendNewToTop(new (aBuilder)
content.AppendToTop(new (aBuilder)
nsDisplayTransform(aBuilder, this, &content, content.GetVisibleRect(),
::ComputePageSequenceTransform));

View File

@@ -5233,7 +5233,7 @@ nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayText(aBuilder, this, isSelected));
}

View File

@@ -569,7 +569,7 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
clip(aBuilder, this, clipFlags);
if (HasVideoElement() && !shouldDisplayPoster) {
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayVideo(aBuilder, this));
}

View File

@@ -1988,7 +1988,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
// purposes. Normally, users will set the background on the container frame.
// paint the selection background -- beware MathML frames overlap a lot
if (aSelectedRect && !aSelectedRect->IsEmpty()) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayMathMLSelectionRect(aBuilder, aForFrame, *aSelectedRect));
}
else if (mRect.width && mRect.height) {
@@ -2008,7 +2008,7 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
nsDisplayMathMLCharDebug(aBuilder, aForFrame, mRect));
#endif
}
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayMathMLCharForeground(aBuilder, aForFrame, this,
aIndex,
aSelectedRect &&

View File

@@ -624,7 +624,7 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!IsVisibleForPainting(aBuilder))
return;
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
return;
}

View File

@@ -318,7 +318,7 @@ nsMathMLFrame::DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
nscoord w = aMetrics.rightBearing - aMetrics.leftBearing;
nscoord h = aMetrics.ascent + aMetrics.descent;
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayMathMLBoundingMetrics(aBuilder, aFrame, nsRect(x,y,w,h)));
}
#endif
@@ -370,7 +370,7 @@ nsMathMLFrame::DisplayBar(nsDisplayListBuilder* aBuilder,
if (!aFrame->StyleVisibility()->IsVisible() || aRect.IsEmpty())
return;
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayMathMLBar(aBuilder, aFrame, aRect, aIndex));
}

View File

@@ -873,6 +873,6 @@ nsMathMLmencloseFrame::DisplayNotation(nsDisplayListBuilder* aBuilder,
aThickness <= 0)
return;
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayNotation(aBuilder, aFrame, aRect, aThickness, aType));
}

View File

@@ -656,7 +656,7 @@ nsMathMLmfracFrame::DisplaySlash(nsDisplayListBuilder* aBuilder,
if (!aFrame->StyleVisibility()->IsVisible() || aRect.IsEmpty())
return;
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayMathMLSlash(aBuilder, aFrame, aRect, aThickness,
StyleVisibility()->mDirection));
}

View File

@@ -1232,7 +1232,7 @@ nsMathMLmtdFrame::ProcessBorders(nsTableFrame* aFrame,
nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists)
{
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplaymtdBorder(aBuilder, this));
return NS_OK;
}

View File

@@ -2200,7 +2200,7 @@ nsDisplayListBuilder::AppendNewScrollInfoItemForHoisting(nsDisplayScrollInfoLaye
{
MOZ_ASSERT(ShouldBuildScrollInfoItemsForHoisting());
MOZ_ASSERT(mScrollInfoItemsForHoisting);
mScrollInfoItemsForHoisting->AppendNewToTop(aScrollInfoItem);
mScrollInfoItemsForHoisting->AppendToTop(aScrollInfoItem);
}
bool
@@ -3526,7 +3526,7 @@ SpecialCutoutRegionCase(nsDisplayListBuilder* aBuilder,
nsRegion region;
region.Sub(aBackgroundRect, *static_cast<nsRegion*>(cutoutRegion));
region.MoveBy(aBuilder->ToReferenceFrame(aFrame));
aList->AppendNewToTop(
aList->AppendToTop(
new (aBuilder) nsDisplaySolidColorRegion(aBuilder, aFrame, region, aColor));
return true;
@@ -3641,14 +3641,14 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0));
}
bgItem->SetDependentFrame(aBuilder, dependentFrame);
bgItemList.AppendNewToTop(bgItem);
bgItemList.AppendToTop(bgItem);
}
if (isThemed) {
nsITheme* theme = presContext->GetTheme();
if (theme->NeedToClearBackgroundBehindWidget(aFrame, aFrame->StyleDisplay()->mAppearance) &&
aBuilder->IsInChromeDocumentOrPopup() && !aBuilder->IsInTransform()) {
bgItemList.AppendNewToTop(
bgItemList.AppendToTop(
new (aBuilder) nsDisplayClearBackground(aBuilder, aFrame));
}
if (aSecondaryReferenceFrame) {
@@ -3658,12 +3658,12 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
bgRect,
aFrame);
bgItem->Init(aBuilder);
bgItemList.AppendNewToTop(bgItem);
bgItemList.AppendToTop(bgItem);
} else {
nsDisplayThemedBackground* bgItem =
new (aBuilder) nsDisplayThemedBackground(aBuilder, aFrame, bgRect);
bgItem->Init(aBuilder);
bgItemList.AppendNewToTop(bgItem);
bgItemList.AppendToTop(bgItem);
}
aList->AppendToTop(&bgItemList);
return true;
@@ -3743,14 +3743,14 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
}
bgItem->SetDependentFrame(aBuilder, dependentFrame);
if (aSecondaryReferenceFrame) {
thisItemList.AppendNewToTop(
thisItemList.AppendToTop(
nsDisplayTableFixedPosition::CreateForFixedBackground(aBuilder,
aSecondaryReferenceFrame,
bgItem,
i,
aFrame));
} else {
thisItemList.AppendNewToTop(
thisItemList.AppendToTop(
nsDisplayFixedPosition::CreateForFixedBackground(aBuilder, aFrame, bgItem, i));
}
@@ -3766,7 +3766,7 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
bgItem = new (aBuilder) nsDisplayBackgroundImage(bgData);
}
bgItem->SetDependentFrame(aBuilder, dependentFrame);
thisItemList.AppendNewToTop(bgItem);
thisItemList.AppendToTop(bgItem);
}
if (bg->mImage.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) {
@@ -3775,12 +3775,12 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
// fine, because the item will have a scrolled clip that limits the
// item with respect to asr.
if (aSecondaryReferenceFrame) {
thisItemList.AppendNewToTop(
thisItemList.AppendToTop(
new (aBuilder) nsDisplayTableBlendMode(aBuilder, aSecondaryReferenceFrame, &thisItemList,
bg->mImage.mLayers[i].mBlendMode,
asr, i + 1, aFrame));
} else {
thisItemList.AppendNewToTop(
thisItemList.AppendToTop(
new (aBuilder) nsDisplayBlendMode(aBuilder, aFrame, &thisItemList,
bg->mImage.mLayers[i].mBlendMode,
asr, i + 1));
@@ -3792,11 +3792,11 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
if (needBlendContainer) {
DisplayListClipState::AutoSaveRestore blendContainerClip(aBuilder);
if (aSecondaryReferenceFrame) {
bgItemList.AppendNewToTop(
bgItemList.AppendToTop(
nsDisplayTableBlendContainer::CreateForBackgroundBlendMode(aBuilder, aSecondaryReferenceFrame,
&bgItemList, asr, aFrame));
} else {
bgItemList.AppendNewToTop(
bgItemList.AppendToTop(
nsDisplayBlendContainer::CreateForBackgroundBlendMode(aBuilder, aFrame, &bgItemList, asr));
}
}

View File

@@ -2735,40 +2735,20 @@ public:
* be in a list and cannot be null.
*/
void AppendToTop(nsDisplayItem* aItem) {
NS_ASSERTION(aItem, "No item to append!");
NS_ASSERTION(!aItem->mAbove, "Already in a list!");
MOZ_ASSERT(aItem, "No item to append!");
MOZ_ASSERT(!aItem->mAbove, "Already in a list!");
mTop->mAbove = aItem;
mTop = aItem;
mLength++;
}
/**
* Append a new item to the top of the list. The intended usage is
* AppendNewToTop(new ...);
*/
void AppendNewToTop(nsDisplayItem* aItem) {
if (aItem) {
AppendToTop(aItem);
}
}
/**
* Append a new item to the bottom of the list. The intended usage is
* AppendNewToBottom(new ...);
*/
void AppendNewToBottom(nsDisplayItem* aItem) {
if (aItem) {
AppendToBottom(aItem);
}
}
/**
* Append a new item to the bottom of the list. The item must be non-null
* and not already in a list.
*/
void AppendToBottom(nsDisplayItem* aItem) {
NS_ASSERTION(aItem, "No item to append!");
NS_ASSERTION(!aItem->mAbove, "Already in a list!");
MOZ_ASSERT(aItem, "No item to append!");
MOZ_ASSERT(!aItem->mAbove, "Already in a list!");
aItem->mAbove = mSentinel.mAbove;
mSentinel.mAbove = aItem;
if (mTop == &mSentinel) {
@@ -3309,7 +3289,7 @@ protected:
PR_BEGIN_MACRO \
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
PresShell()->IsPaintingFrameCounts()) { \
aLists.Outlines()->AppendNewToTop( \
aLists.Outlines()->AppendToTop( \
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name)); \
} \
PR_END_MACRO
@@ -3318,7 +3298,7 @@ protected:
PR_BEGIN_MACRO \
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
PresShell()->IsPaintingFrameCounts()) { \
aLists.Outlines()->AppendNewToTop( \
aLists.Outlines()->AppendToTop( \
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name, _color)); \
} \
PR_END_MACRO

View File

@@ -259,7 +259,7 @@ SVGGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return;
}
DisplayOutline(aBuilder, aLists);
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplaySVGGeometry(aBuilder, this));
}

View File

@@ -3202,7 +3202,7 @@ SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return;
}
DisplayOutline(aBuilder, aLists);
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplaySVGText(aBuilder, this));
}

View File

@@ -787,9 +787,9 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayListSet set(&newList, &newList, &newList,
&newList, &newList, &newList);
BuildDisplayListForNonBlockChildren(aBuilder, set);
aLists.Content()->AppendNewToTop(new (aBuilder) nsDisplaySVGWrapper(aBuilder, this, &newList));
aLists.Content()->AppendToTop(new (aBuilder) nsDisplaySVGWrapper(aBuilder, this, &newList));
} else if (IsVisibleForPainting(aBuilder) || !aBuilder->IsForPainting()) {
aLists.Content()->AppendNewToTop(
aLists.Content()->AppendToTop(
new (aBuilder) nsDisplayOuterSVG(aBuilder, this));
}
}

View File

@@ -391,7 +391,7 @@ nsTableCellFrame::ProcessBorders(nsTableFrame* aFrame,
if (!GetContentEmpty() ||
StyleTableBorder()->mEmptyCells == NS_STYLE_TABLE_EMPTY_CELLS_SHOW) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayBorder(aBuilder, this));
}
@@ -495,7 +495,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// display outset box-shadows if we need to.
bool hasBoxShadow = !!StyleEffects()->mBoxShadow;
if (hasBoxShadow) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, this));
}
@@ -511,7 +511,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// display inset box-shadows if we need to.
if (hasBoxShadow) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, this));
}
@@ -520,7 +520,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// and display the selection border if we need to
if (IsSelected()) {
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayTableCellSelection(aBuilder, this));
}
}

View File

@@ -1533,7 +1533,7 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
// Paint the outset box-shadows for the table frames
if (aFrame->StyleEffects()->mBoxShadow) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, aFrame));
}
}
@@ -1601,7 +1601,7 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
// Paint the inset box-shadows for the table frames
if (aFrame->StyleEffects()->mBoxShadow) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, aFrame));
}
}
@@ -1616,13 +1616,13 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
// In the collapsed border model, overlay all collapsed borders.
if (table->IsBorderCollapse()) {
if (table->HasBCBorders()) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayTableBorderCollapse(aBuilder, table));
}
} else {
const nsStyleBorder* borderStyle = aFrame->StyleBorder();
if (borderStyle->HasBorder()) {
aLists.BorderBackground()->AppendNewToTop(
aLists.BorderBackground()->AppendToTop(
new (aBuilder) nsDisplayBorder(aBuilder, table));
}
}

View File

@@ -1333,10 +1333,10 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG_LAYOUT
if (mState & NS_STATE_CURRENTLY_IN_DEBUG) {
destination.BorderBackground()->AppendNewToTop(new (aBuilder)
destination.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this, PaintXULDebugBackground,
"XULDebugBackground"));
destination.Outlines()->AppendNewToTop(new (aBuilder)
destination.Outlines()->AppendToTop(new (aBuilder)
nsDisplayXULDebug(aBuilder, this));
}
#endif
@@ -1369,7 +1369,7 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayListClipState::AutoSaveRestore ownLayerClipState(aBuilder);
// Wrap the list to make it its own layer
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayOwnLayer(aBuilder, this, &masterList, ownLayerASR,
nsDisplayOwnLayerFlags::eNone,
mozilla::layers::FrameMetrics::NULL_SCROLL_ID,

View File

@@ -153,7 +153,7 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
aBuilder, this, GetBackgroundRectRelativeToSelf(),
aLists.BorderBackground());
aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
aLists.BorderBackground()->AppendToTop(new (aBuilder)
nsDisplayXULGroupBorder(aBuilder, this));
DisplayOutline(aBuilder, aLists);

View File

@@ -345,7 +345,7 @@ nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
clip(aBuilder, this, clipFlags);
nsDisplayList list;
list.AppendNewToTop(
list.AppendToTop(
new (aBuilder) nsDisplayXULImage(aBuilder, this));
CreateOwnLayerIfNeeded(aBuilder, &list);

View File

@@ -114,7 +114,7 @@ nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!aBuilder->IsForEventDelivery() || !IsVisibleForPainting(aBuilder))
return;
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayEventReceiver(aBuilder, this));
}

View File

@@ -326,7 +326,7 @@ nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (aBuilder->IsForEventDelivery() && isDraggingThumb()) {
// This is EVIL, we shouldn't be messing with event delivery just to get
// thumb mouse drag events to arrive at the slider!
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayEventReceiver(aBuilder, this));
return;
}
@@ -458,7 +458,7 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
// Wrap the list to make it its own layer.
const ActiveScrolledRoot* ownLayerASR = contASRTracker.GetContainerASR();
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayOwnLayer(aBuilder, this, &masterList, ownLayerASR,
flags, scrollTargetId,
ScrollThumbData{scrollDirection,

View File

@@ -374,7 +374,7 @@ nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (mInner->mDragging && aBuilder->IsForEventDelivery())
{
// XXX It's probably better not to check visibility here, right?
aLists.Outlines()->AppendNewToTop(new (aBuilder)
aLists.Outlines()->AppendToTop(new (aBuilder)
nsDisplayEventReceiver(aBuilder, this));
return;
}

View File

@@ -371,7 +371,7 @@ nsTextBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayXULTextBox(aBuilder, this));
}

View File

@@ -126,7 +126,7 @@ nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
WrapListsInRedirector(aBuilder, set, aLists);
aLists.Content()->AppendNewToTop(new (aBuilder)
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayXULTreeColSplitterTarget(aBuilder, this));
}