зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland
--HG-- extra : rebase_source : 56ab9b17d93972662082b358c651e7031750a98f
This commit is contained in:
Коммит
28282d4309
|
@ -5217,8 +5217,8 @@ PresShell::AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
const nsRect& aBounds)
|
const nsRect& aBounds)
|
||||||
{
|
{
|
||||||
aList.AppendToBottom(
|
aList.AppendToBottom(new (&aBuilder)
|
||||||
MakeDisplayItem<nsDisplaySolidColor>(&aBuilder, aFrame, aBounds, NS_RGB(115, 115, 115)));
|
nsDisplaySolidColor(&aBuilder, aFrame, aBounds, NS_RGB(115, 115, 115)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -5308,7 +5308,7 @@ PresShell::AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
||||||
|
|
||||||
if (!addedScrollingBackgroundColor || forceUnscrolledItem) {
|
if (!addedScrollingBackgroundColor || forceUnscrolledItem) {
|
||||||
aList.AppendToBottom(
|
aList.AppendToBottom(
|
||||||
MakeDisplayItem<nsDisplaySolidColor>(&aBuilder, aFrame, aBounds, bgcolor));
|
new (&aBuilder) nsDisplaySolidColor(&aBuilder, aFrame, aBounds, bgcolor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3021,7 +3021,7 @@ nsLayoutUtils::GetLayerTransformForFrame(nsIFrame* aFrame,
|
||||||
builder.BeginFrame();
|
builder.BeginFrame();
|
||||||
nsDisplayList list;
|
nsDisplayList list;
|
||||||
nsDisplayTransform* item =
|
nsDisplayTransform* item =
|
||||||
MakeDisplayItem<nsDisplayTransform>(&builder, aFrame, &list, nsRect());
|
new (&builder) nsDisplayTransform(&builder, aFrame, &list, nsRect());
|
||||||
|
|
||||||
*aTransform = item->GetTransform();
|
*aTransform = item->GetTransform();
|
||||||
item->Destroy(&builder);
|
item->Destroy(&builder);
|
||||||
|
|
|
@ -477,8 +477,8 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayList* aForeground)
|
nsDisplayList* aForeground)
|
||||||
{
|
{
|
||||||
if (mFrame->StyleEffects()->mBoxShadow) {
|
if (mFrame->StyleEffects()->mBoxShadow) {
|
||||||
aBackground->AppendToTop(
|
aBackground->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayButtonBoxShadowOuter>(aBuilder, this));
|
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect buttonRect = mFrame->GetRectRelativeToSelf();
|
nsRect buttonRect = mFrame->GetRectRelativeToSelf();
|
||||||
|
@ -486,14 +486,14 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
aBuilder, mFrame, buttonRect, aBackground);
|
aBuilder, mFrame, buttonRect, aBackground);
|
||||||
|
|
||||||
aBackground->AppendToTop(
|
aBackground->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayButtonBorder>(aBuilder, this));
|
nsDisplayButtonBorder(aBuilder, this));
|
||||||
|
|
||||||
// Only display focus rings if we actually have them. Since at most one
|
// 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.
|
// button would normally display a focus ring, most buttons won't have them.
|
||||||
if (mInnerFocusStyle && mInnerFocusStyle->StyleBorder()->HasBorder()) {
|
if (mInnerFocusStyle && mInnerFocusStyle->StyleBorder()->HasBorder()) {
|
||||||
aForeground->AppendToTop(
|
aForeground->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayButtonForeground>(aBuilder, this));
|
nsDisplayButtonForeground(aBuilder, this));
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1599,7 +1599,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) &&
|
!presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) &&
|
||||||
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
|
mDisplayFrame && IsVisibleForPainting(aBuilder)) {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayComboboxFocus>(aBuilder, this));
|
new (aBuilder) nsDisplayComboboxFocus(aBuilder, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,8 +196,8 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (!(GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) &&
|
if (!(GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) &&
|
||||||
IsVisibleForPainting(aBuilder)) {
|
IsVisibleForPainting(aBuilder)) {
|
||||||
if (StyleEffects()->mBoxShadow) {
|
if (StyleEffects()->mBoxShadow) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayBoxShadowOuter>(aBuilder, this));
|
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
|
@ -205,8 +205,8 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
aLists.BorderBackground(),
|
aLists.BorderBackground(),
|
||||||
/* aAllowWillPaintBorderOptimization = */ false);
|
/* aAllowWillPaintBorderOptimization = */ false);
|
||||||
|
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayFieldSetBorder>(aBuilder, this));
|
nsDisplayFieldSetBorder(aBuilder, this));
|
||||||
|
|
||||||
DisplayOutlineUnconditional(aBuilder, aLists);
|
DisplayOutlineUnconditional(aBuilder, aLists);
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// this frame as the root of a stacking context we need make sure to draw
|
// this frame as the root of a stacking context we need make sure to draw
|
||||||
// some opaque color over the whole widget. (Bug 511323)
|
// some opaque color over the whole widget. (Bug 511323)
|
||||||
aLists.BorderBackground()->AppendToBottom(
|
aLists.BorderBackground()->AppendToBottom(
|
||||||
MakeDisplayItem<nsDisplaySolidColor>(aBuilder,
|
new (aBuilder) nsDisplaySolidColor(aBuilder,
|
||||||
this, nsRect(aBuilder->ToReferenceFrame(this), GetSize()),
|
this, nsRect(aBuilder->ToReferenceFrame(this), GetSize()),
|
||||||
mLastDropdownBackstopColor));
|
mLastDropdownBackstopColor));
|
||||||
}
|
}
|
||||||
|
|
|
@ -305,7 +305,7 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayRangeFocusRing>(aBuilder, this));
|
new (aBuilder) nsDisplayRangeFocusRing(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -75,11 +75,11 @@ public:
|
||||||
nsOptionEventGrabberWrapper() {}
|
nsOptionEventGrabberWrapper() {}
|
||||||
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aFrame, nsDisplayList* aList) override {
|
nsIFrame* aFrame, nsDisplayList* aList) override {
|
||||||
return MakeDisplayItem<nsDisplayOptionEventGrabber>(aBuilder, aFrame, aList);
|
return new (aBuilder) nsDisplayOptionEventGrabber(aBuilder, aFrame, aList);
|
||||||
}
|
}
|
||||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) override {
|
nsDisplayItem* aItem) override {
|
||||||
return MakeDisplayItem<nsDisplayOptionEventGrabber>(aBuilder, aItem->Frame(), aItem);
|
return new (aBuilder) nsDisplayOptionEventGrabber(aBuilder, aItem->Frame(), aItem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -154,8 +154,8 @@ nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||||
// we can't just associate the display item with the list frame,
|
// we can't just associate the display item with the list frame,
|
||||||
// because then the list's scrollframe won't clip it (the scrollframe
|
// because then the list's scrollframe won't clip it (the scrollframe
|
||||||
// only clips contained descendants).
|
// only clips contained descendants).
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayListFocus>(aBuilder, this));
|
nsDisplayListFocus(aBuilder, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -861,10 +861,9 @@ TextOverflow::CreateMarkers(const nsLineBox* aLine,
|
||||||
markerLogicalRect.GetPhysicalRect(mBlockWM, mBlockSize) + offset;
|
markerLogicalRect.GetPhysicalRect(mBlockWM, mBlockSize) + offset;
|
||||||
ClipMarker(aContentArea.GetPhysicalRect(mBlockWM, mBlockSize) + offset,
|
ClipMarker(aContentArea.GetPhysicalRect(mBlockWM, mBlockSize) + offset,
|
||||||
markerRect, clipState);
|
markerRect, clipState);
|
||||||
nsDisplayItem* marker =
|
nsDisplayItem* marker = new (mBuilder)
|
||||||
MakeDisplayItem<nsDisplayTextOverflowMarker>(mBuilder, mBlock, markerRect,
|
nsDisplayTextOverflowMarker(mBuilder, mBlock, markerRect,
|
||||||
aLine->GetLogicalAscent(), mIStart.mStyle,
|
aLine->GetLogicalAscent(), mIStart.mStyle, aLineNumber, 0);
|
||||||
aLineNumber, 0);
|
|
||||||
mMarkerList.AppendToTop(marker);
|
mMarkerList.AppendToTop(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -879,10 +878,9 @@ TextOverflow::CreateMarkers(const nsLineBox* aLine,
|
||||||
markerLogicalRect.GetPhysicalRect(mBlockWM, mBlockSize) + offset;
|
markerLogicalRect.GetPhysicalRect(mBlockWM, mBlockSize) + offset;
|
||||||
ClipMarker(aContentArea.GetPhysicalRect(mBlockWM, mBlockSize) + offset,
|
ClipMarker(aContentArea.GetPhysicalRect(mBlockWM, mBlockSize) + offset,
|
||||||
markerRect, clipState);
|
markerRect, clipState);
|
||||||
nsDisplayItem* marker =
|
nsDisplayItem* marker = new (mBuilder)
|
||||||
MakeDisplayItem<nsDisplayTextOverflowMarker>(mBuilder, mBlock, markerRect,
|
nsDisplayTextOverflowMarker(mBuilder, mBlock, markerRect,
|
||||||
aLine->GetLogicalAscent(), mIEnd.mStyle,
|
aLine->GetLogicalAscent(), mIEnd.mStyle, aLineNumber, 1);
|
||||||
aLineNumber, 1);
|
|
||||||
mMarkerList.AppendToTop(marker);
|
mMarkerList.AppendToTop(marker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// Wrap the whole top layer in a single item with maximum z-index,
|
// Wrap the whole top layer in a single item with maximum z-index,
|
||||||
// and append it at the very end, so that it stays at the topmost.
|
// and append it at the very end, so that it stays at the topmost.
|
||||||
nsDisplayWrapList* wrapList =
|
nsDisplayWrapList* wrapList =
|
||||||
MakeDisplayItem<nsDisplayWrapList>(aBuilder, this, &topLayerList);
|
new (aBuilder) nsDisplayWrapList(aBuilder, this, &topLayerList);
|
||||||
wrapList->SetOverrideZIndex(
|
wrapList->SetOverrideZIndex(
|
||||||
std::numeric_limits<decltype(wrapList->ZIndex())>::max());
|
std::numeric_limits<decltype(wrapList->ZIndex())>::max());
|
||||||
aLists.PositionedDescendants()->AppendToTop(wrapList);
|
aLists.PositionedDescendants()->AppendToTop(wrapList);
|
||||||
|
|
|
@ -789,7 +789,7 @@ nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBullet>(aBuilder, this));
|
new (aBuilder) nsDisplayBullet(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<BulletRenderer>
|
Maybe<BulletRenderer>
|
||||||
|
|
|
@ -470,11 +470,11 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayCanvasBackgroundColor>(aBuilder, this));
|
new (aBuilder) nsDisplayCanvasBackgroundColor(aBuilder, this));
|
||||||
|
|
||||||
if (isThemed) {
|
if (isThemed) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayCanvasThemedBackground>(aBuilder, this));
|
new (aBuilder) nsDisplayCanvasThemedBackground(aBuilder, this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,14 +528,14 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
{
|
{
|
||||||
DisplayListClipState::AutoSaveRestore bgImageClip(aBuilder);
|
DisplayListClipState::AutoSaveRestore bgImageClip(aBuilder);
|
||||||
bgImageClip.Clear();
|
bgImageClip.Clear();
|
||||||
bgItem = MakeDisplayItem<nsDisplayCanvasBackgroundImage>(aBuilder, bgData);
|
bgItem = new (aBuilder) nsDisplayCanvasBackgroundImage(bgData);
|
||||||
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
||||||
}
|
}
|
||||||
thisItemList.AppendToTop(
|
thisItemList.AppendToTop(
|
||||||
nsDisplayFixedPosition::CreateForFixedBackground(aBuilder, this, bgItem, i));
|
nsDisplayFixedPosition::CreateForFixedBackground(aBuilder, this, bgItem, i));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
nsDisplayCanvasBackgroundImage* bgItem = MakeDisplayItem<nsDisplayCanvasBackgroundImage>(aBuilder, bgData);
|
nsDisplayCanvasBackgroundImage* bgItem = new (aBuilder) nsDisplayCanvasBackgroundImage(bgData);
|
||||||
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
||||||
thisItemList.AppendToTop(bgItem);
|
thisItemList.AppendToTop(bgItem);
|
||||||
}
|
}
|
||||||
|
@ -543,9 +543,9 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (layers.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) {
|
if (layers.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) {
|
||||||
DisplayListClipState::AutoSaveRestore blendClip(aBuilder);
|
DisplayListClipState::AutoSaveRestore blendClip(aBuilder);
|
||||||
thisItemList.AppendToTop(
|
thisItemList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBlendMode>(aBuilder, this, &thisItemList,
|
new (aBuilder) nsDisplayBlendMode(aBuilder, this, &thisItemList,
|
||||||
layers.mLayers[i].mBlendMode,
|
layers.mLayers[i].mBlendMode,
|
||||||
thisItemASR, i + 1));
|
thisItemASR, i + 1));
|
||||||
}
|
}
|
||||||
aLists.BorderBackground()->AppendToTop(&thisItemList);
|
aLists.BorderBackground()->AppendToTop(&thisItemList);
|
||||||
}
|
}
|
||||||
|
@ -591,8 +591,8 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (!StyleVisibility()->IsVisible())
|
if (!StyleVisibility()->IsVisible())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayCanvasFocus>(aBuilder, this));
|
nsDisplayCanvasFocus(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -190,8 +190,8 @@ public:
|
||||||
|
|
||||||
class nsDisplayCanvasBackgroundImage : public nsDisplayBackgroundImage {
|
class nsDisplayCanvasBackgroundImage : public nsDisplayBackgroundImage {
|
||||||
public:
|
public:
|
||||||
explicit nsDisplayCanvasBackgroundImage(nsDisplayListBuilder* aBuilder, const InitData& aInitData)
|
explicit nsDisplayCanvasBackgroundImage(const InitData& aInitData)
|
||||||
: nsDisplayBackgroundImage(aBuilder, aInitData)
|
: nsDisplayBackgroundImage(aInitData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (IsVisibleForPainting(aBuilder)) {
|
if (IsVisibleForPainting(aBuilder)) {
|
||||||
aLists.BorderBackground()->
|
aLists.BorderBackground()->
|
||||||
AppendToTop(MakeDisplayItem<nsDisplayColumnRule>(aBuilder, this));
|
AppendToTop(new (aBuilder) nsDisplayColumnRule(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our children won't have backgrounds so it doesn't matter where we put them.
|
// Our children won't have backgrounds so it doesn't matter where we put them.
|
||||||
|
|
|
@ -2318,8 +2318,8 @@ nsFrame::DisplaySelectionOverlay(nsDisplayListBuilder* aBuilder,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
aList->AppendToTop(
|
aList->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplaySelectionOverlay>(aBuilder, this, selectionValue));
|
nsDisplaySelectionOverlay(aBuilder, this, selectionValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2331,7 +2331,7 @@ nsFrame::DisplayOutlineUnconditional(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayOutline>(aBuilder, this));
|
new (aBuilder) nsDisplayOutline(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2351,7 +2351,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
|
||||||
if (!IsVisibleForPainting(aBuilder))
|
if (!IsVisibleForPainting(aBuilder))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aList->AppendToTop(MakeDisplayItem<nsDisplayCaret>(aBuilder, this));
|
aList->AppendToTop(new (aBuilder) nsDisplayCaret(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nscolor
|
nscolor
|
||||||
|
@ -2390,23 +2390,23 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
nsCSSShadowArray* shadows = StyleEffects()->mBoxShadow;
|
nsCSSShadowArray* shadows = StyleEffects()->mBoxShadow;
|
||||||
if (shadows && shadows->HasShadowWithInset(false)) {
|
if (shadows && shadows->HasShadowWithInset(false)) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayBoxShadowOuter>(aBuilder, this));
|
nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bgIsThemed = DisplayBackgroundUnconditional(aBuilder, aLists,
|
bool bgIsThemed = DisplayBackgroundUnconditional(aBuilder, aLists,
|
||||||
aForceBackground);
|
aForceBackground);
|
||||||
|
|
||||||
if (shadows && shadows->HasShadowWithInset(true)) {
|
if (shadows && shadows->HasShadowWithInset(true)) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayBoxShadowInner>(aBuilder, this));
|
nsDisplayBoxShadowInner(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's a themed background, we should not create a border item.
|
// If there's a themed background, we should not create a border item.
|
||||||
// It won't be rendered.
|
// It won't be rendered.
|
||||||
if (!bgIsThemed && StyleBorder()->HasBorder()) {
|
if (!bgIsThemed && StyleBorder()->HasBorder()) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayBorder>(aBuilder, this));
|
nsDisplayBorder(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayOutlineUnconditional(aBuilder, aLists);
|
DisplayOutlineUnconditional(aBuilder, aLists);
|
||||||
|
@ -2541,16 +2541,16 @@ DisplayDebugBorders(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
// Draw a border around the child
|
// Draw a border around the child
|
||||||
// REVIEW: From nsContainerFrame::PaintChild
|
// REVIEW: From nsContainerFrame::PaintChild
|
||||||
if (nsFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) {
|
if (nsFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) {
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayGeneric>(aBuilder, aFrame, PaintDebugBorder, "DebugBorder",
|
nsDisplayGeneric(aBuilder, aFrame, PaintDebugBorder, "DebugBorder",
|
||||||
DisplayItemType::TYPE_DEBUG_BORDER));
|
DisplayItemType::TYPE_DEBUG_BORDER));
|
||||||
}
|
}
|
||||||
// Draw a border around the current event target
|
// Draw a border around the current event target
|
||||||
if (nsFrame::GetShowEventTargetFrameBorder() &&
|
if (nsFrame::GetShowEventTargetFrameBorder() &&
|
||||||
aFrame->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
aFrame->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayGeneric>(aBuilder, aFrame, PaintEventTargetBorder, "EventTargetBorder",
|
nsDisplayGeneric(aBuilder, aFrame, PaintEventTargetBorder, "EventTargetBorder",
|
||||||
DisplayItemType::TYPE_EVENT_TARGET_BORDER));
|
DisplayItemType::TYPE_EVENT_TARGET_BORDER));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2654,7 +2654,7 @@ WrapSeparatorTransform(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
|
||||||
int aIndex) {
|
int aIndex) {
|
||||||
if (!aSource->IsEmpty()) {
|
if (!aSource->IsEmpty()) {
|
||||||
nsDisplayTransform *sepIdItem =
|
nsDisplayTransform *sepIdItem =
|
||||||
MakeDisplayItem<nsDisplayTransform>(aBuilder, aFrame, aSource,
|
new (aBuilder) nsDisplayTransform(aBuilder, aFrame, aSource,
|
||||||
aBuilder->GetVisibleRect(), Matrix4x4(), aIndex);
|
aBuilder->GetVisibleRect(), Matrix4x4(), aIndex);
|
||||||
sepIdItem->SetNoExtendContext();
|
sepIdItem->SetNoExtendContext();
|
||||||
aTarget->AppendToTop(sepIdItem);
|
aTarget->AppendToTop(sepIdItem);
|
||||||
|
@ -3031,7 +3031,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
nsDisplayLayerEventRegions* eventRegions = nullptr;
|
nsDisplayLayerEventRegions* eventRegions = nullptr;
|
||||||
if (aBuilder->IsBuildingLayerEventRegions()) {
|
if (aBuilder->IsBuildingLayerEventRegions()) {
|
||||||
eventRegions = MakeDisplayItem<nsDisplayLayerEventRegions>(aBuilder, this);
|
eventRegions = new (aBuilder) nsDisplayLayerEventRegions(aBuilder, this);
|
||||||
eventRegions->AddFrame(aBuilder, this);
|
eventRegions->AddFrame(aBuilder, this);
|
||||||
aBuilder->SetLayerEventRegions(eventRegions);
|
aBuilder->SetLayerEventRegions(eventRegions);
|
||||||
}
|
}
|
||||||
|
@ -3072,7 +3072,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (eventRegions) {
|
if (eventRegions) {
|
||||||
eventRegions->Destroy(aBuilder);
|
eventRegions->Destroy(aBuilder);
|
||||||
eventRegions = MakeDisplayItem<nsDisplayLayerEventRegions>(aBuilder, this);
|
eventRegions = new (aBuilder) nsDisplayLayerEventRegions(aBuilder, this);
|
||||||
eventRegions->AddFrame(aBuilder, this);
|
eventRegions->AddFrame(aBuilder, this);
|
||||||
aBuilder->SetLayerEventRegions(eventRegions);
|
aBuilder->SetLayerEventRegions(eventRegions);
|
||||||
}
|
}
|
||||||
|
@ -3116,7 +3116,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (hasOverrideDirtyRect && gfxPrefs::LayoutDisplayListShowArea()) {
|
if (hasOverrideDirtyRect && gfxPrefs::LayoutDisplayListShowArea()) {
|
||||||
nsDisplaySolidColor* color =
|
nsDisplaySolidColor* color =
|
||||||
MakeDisplayItem<nsDisplaySolidColor>(aBuilder, this,
|
new (aBuilder) nsDisplaySolidColor(aBuilder, this,
|
||||||
dirtyRect + aBuilder->GetCurrentFrameOffsetToReferenceFrame(),
|
dirtyRect + aBuilder->GetCurrentFrameOffsetToReferenceFrame(),
|
||||||
NS_RGBA(255, 0, 0, 64), false);
|
NS_RGBA(255, 0, 0, 64), false);
|
||||||
color->SetOverrideZIndex(INT32_MAX);
|
color->SetOverrideZIndex(INT32_MAX);
|
||||||
|
@ -3219,7 +3219,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
/* List now emptied, so add the new list to the top. */
|
/* List now emptied, so add the new list to the top. */
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayFilter>(aBuilder, this, &resultList,
|
new (aBuilder) nsDisplayFilter(aBuilder, this, &resultList,
|
||||||
handleOpacity));
|
handleOpacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3239,7 +3239,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
: containerItemASR;
|
: containerItemASR;
|
||||||
/* List now emptied, so add the new list to the top. */
|
/* List now emptied, so add the new list to the top. */
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayMask>(aBuilder, this, &resultList, !useOpacity,
|
new (aBuilder) nsDisplayMask(aBuilder, this, &resultList, !useOpacity,
|
||||||
maskASR));
|
maskASR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3261,7 +3261,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
// all descendant content, but some should not be clipped.
|
// all descendant content, but some should not be clipped.
|
||||||
DisplayListClipState::AutoSaveRestore opacityClipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore opacityClipState(aBuilder);
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayOpacity>(aBuilder, this, &resultList,
|
new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList,
|
||||||
containerItemASR,
|
containerItemASR,
|
||||||
opacityItemForEventsAndPluginsOnly));
|
opacityItemForEventsAndPluginsOnly));
|
||||||
if (aCreatedContainerItem) {
|
if (aCreatedContainerItem) {
|
||||||
|
@ -3327,7 +3327,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
GetOffsetToCrossDoc(outerReferenceFrame));
|
GetOffsetToCrossDoc(outerReferenceFrame));
|
||||||
|
|
||||||
nsDisplayTransform *transformItem =
|
nsDisplayTransform *transformItem =
|
||||||
MakeDisplayItem<nsDisplayTransform>(aBuilder, this,
|
new (aBuilder) nsDisplayTransform(aBuilder, this,
|
||||||
&resultList, visibleRect, 0,
|
&resultList, visibleRect, 0,
|
||||||
allowAsyncAnimation);
|
allowAsyncAnimation);
|
||||||
resultList.AppendToTop(transformItem);
|
resultList.AppendToTop(transformItem);
|
||||||
|
@ -3337,7 +3337,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.Restore();
|
clipState.Restore();
|
||||||
}
|
}
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayPerspective>(
|
new (aBuilder) nsDisplayPerspective(
|
||||||
aBuilder, this,
|
aBuilder, this,
|
||||||
GetContainingBlock(0, disp)->GetContent()->GetPrimaryFrame(),
|
GetContainingBlock(0, disp)->GetContent()->GetPrimaryFrame(),
|
||||||
&resultList));
|
&resultList));
|
||||||
|
@ -3351,7 +3351,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
if (clipCapturedBy == ContainerItemType::eOwnLayerForTransformWithRoundedClip) {
|
if (clipCapturedBy == ContainerItemType::eOwnLayerForTransformWithRoundedClip) {
|
||||||
clipState.Restore();
|
clipState.Restore();
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayOwnLayer>(aBuilder, this, &resultList,
|
new (aBuilder) nsDisplayOwnLayer(aBuilder, this, &resultList,
|
||||||
aBuilder->CurrentActiveScrolledRoot(),
|
aBuilder->CurrentActiveScrolledRoot(),
|
||||||
nsDisplayOwnLayerFlags::eNone,
|
nsDisplayOwnLayerFlags::eNone,
|
||||||
mozilla::layers::FrameMetrics::NULL_SCROLL_ID,
|
mozilla::layers::FrameMetrics::NULL_SCROLL_ID,
|
||||||
|
@ -3374,7 +3374,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
const ActiveScrolledRoot* fixedASR =
|
const ActiveScrolledRoot* fixedASR =
|
||||||
ActiveScrolledRoot::PickAncestor(containerItemASR, aBuilder->CurrentActiveScrolledRoot());
|
ActiveScrolledRoot::PickAncestor(containerItemASR, aBuilder->CurrentActiveScrolledRoot());
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayFixedPosition>(aBuilder, this, &resultList, fixedASR));
|
new (aBuilder) nsDisplayFixedPosition(aBuilder, this, &resultList, fixedASR));
|
||||||
if (aCreatedContainerItem) {
|
if (aCreatedContainerItem) {
|
||||||
*aCreatedContainerItem = true;
|
*aCreatedContainerItem = true;
|
||||||
}
|
}
|
||||||
|
@ -3390,7 +3390,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
const ActiveScrolledRoot* stickyASR =
|
const ActiveScrolledRoot* stickyASR =
|
||||||
ActiveScrolledRoot::PickAncestor(containerItemASR, aBuilder->CurrentActiveScrolledRoot());
|
ActiveScrolledRoot::PickAncestor(containerItemASR, aBuilder->CurrentActiveScrolledRoot());
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayStickyPosition>(aBuilder, this, &resultList, stickyASR));
|
new (aBuilder) nsDisplayStickyPosition(aBuilder, this, &resultList, stickyASR));
|
||||||
if (aCreatedContainerItem) {
|
if (aCreatedContainerItem) {
|
||||||
*aCreatedContainerItem = true;
|
*aCreatedContainerItem = true;
|
||||||
}
|
}
|
||||||
|
@ -3404,7 +3404,7 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||||
if (useBlendMode) {
|
if (useBlendMode) {
|
||||||
DisplayListClipState::AutoSaveRestore blendModeClipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore blendModeClipState(aBuilder);
|
||||||
resultList.AppendToTop(
|
resultList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBlendMode>(aBuilder, this, &resultList,
|
new (aBuilder) nsDisplayBlendMode(aBuilder, this, &resultList,
|
||||||
effects->mMixBlendMode,
|
effects->mMixBlendMode,
|
||||||
containerItemASR));
|
containerItemASR));
|
||||||
if (aCreatedContainerItem) {
|
if (aCreatedContainerItem) {
|
||||||
|
@ -3436,7 +3436,7 @@ WrapInWrapList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// Clear clip rect for the construction of the items below. Since we're
|
// Clear clip rect for the construction of the items below. Since we're
|
||||||
// clipping all their contents, they themselves don't need to be clipped.
|
// clipping all their contents, they themselves don't need to be clipped.
|
||||||
return MakeDisplayItem<nsDisplayWrapList>(aBuilder, aFrame, aList, aContainerASR, true);
|
return new (aBuilder) nsDisplayWrapList(aBuilder, aFrame, aList, aContainerASR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3777,7 +3777,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||||
// make sure we accumulate event regions for its layer.
|
// make sure we accumulate event regions for its layer.
|
||||||
if (buildingForChild.IsAnimatedGeometryRoot() || isPositioned) {
|
if (buildingForChild.IsAnimatedGeometryRoot() || isPositioned) {
|
||||||
nsDisplayLayerEventRegions* eventRegions =
|
nsDisplayLayerEventRegions* eventRegions =
|
||||||
MakeDisplayItem<nsDisplayLayerEventRegions>(aBuilder, child);
|
new (aBuilder) nsDisplayLayerEventRegions(aBuilder, child);
|
||||||
eventRegions->AddFrame(aBuilder, child);
|
eventRegions->AddFrame(aBuilder, child);
|
||||||
aBuilder->SetLayerEventRegions(eventRegions);
|
aBuilder->SetLayerEventRegions(eventRegions);
|
||||||
|
|
||||||
|
@ -10966,8 +10966,8 @@ nsIFrame::CreateOwnLayerIfNeeded(nsDisplayListBuilder* aBuilder,
|
||||||
if (GetContent() &&
|
if (GetContent() &&
|
||||||
GetContent()->IsXULElement() &&
|
GetContent()->IsXULElement() &&
|
||||||
GetContent()->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::layer)) {
|
GetContent()->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::layer)) {
|
||||||
aList->AppendToTop(
|
aList->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayOwnLayer>(aBuilder, this, aList, aBuilder->CurrentActiveScrolledRoot()));
|
nsDisplayOwnLayer(aBuilder, this, aList, aBuilder->CurrentActiveScrolledRoot()));
|
||||||
if (aCreatedContainerItem) {
|
if (aCreatedContainerItem) {
|
||||||
*aCreatedContainerItem = true;
|
*aCreatedContainerItem = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -680,7 +680,7 @@ nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (mDragger && aBuilder->IsForEventDelivery()) {
|
if (mDragger && aBuilder->IsForEventDelivery()) {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayEventReceiver>(aBuilder, this));
|
new (aBuilder) nsDisplayEventReceiver(aBuilder, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1425,7 +1425,7 @@ nsHTMLFramesetBorderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayFramesetBorder>(aBuilder, this));
|
new (aBuilder) nsDisplayFramesetBorder(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsHTMLFramesetBorderFrame::PaintBorder(DrawTarget* aDrawTarget,
|
void nsHTMLFramesetBorderFrame::PaintBorder(DrawTarget* aDrawTarget,
|
||||||
|
@ -1636,5 +1636,5 @@ nsHTMLFramesetBlankFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayFramesetBlank>(aBuilder, this));
|
new (aBuilder) nsDisplayFramesetBlank(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
|
@ -3072,9 +3072,9 @@ AppendToTop(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists,
|
||||||
flags |= nsDisplayOwnLayerFlags::eScrollbarContainer;
|
flags |= nsDisplayOwnLayerFlags::eScrollbarContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
newItem = MakeDisplayItem<nsDisplayOwnLayer>(aBuilder, aSourceFrame, aSource, asr, flags, scrollTarget);
|
newItem = new (aBuilder) nsDisplayOwnLayer(aBuilder, aSourceFrame, aSource, asr, flags, scrollTarget);
|
||||||
} else {
|
} else {
|
||||||
newItem = MakeDisplayItem<nsDisplayWrapList>(aBuilder, aSourceFrame, aSource, asr);
|
newItem = new (aBuilder) nsDisplayWrapList(aBuilder, aSourceFrame, aSource, asr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aFlags & APPEND_POSITIONED) {
|
if (aFlags & APPEND_POSITIONED) {
|
||||||
|
@ -3618,9 +3618,9 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (dirtyRectHasBeenOverriden && gfxPrefs::LayoutDisplayListShowArea()) {
|
if (dirtyRectHasBeenOverriden && gfxPrefs::LayoutDisplayListShowArea()) {
|
||||||
nsDisplaySolidColor* color =
|
nsDisplaySolidColor* color =
|
||||||
MakeDisplayItem<nsDisplaySolidColor>(aBuilder, mOuter,
|
new (aBuilder) nsDisplaySolidColor(aBuilder, mOuter,
|
||||||
dirtyRect + aBuilder->GetCurrentFrameOffsetToReferenceFrame(),
|
dirtyRect + aBuilder->GetCurrentFrameOffsetToReferenceFrame(),
|
||||||
NS_RGBA(0, 0, 255, 64), false);
|
NS_RGBA(0, 0, 255, 64), false);
|
||||||
color->SetOverrideZIndex(INT32_MAX);
|
color->SetOverrideZIndex(INT32_MAX);
|
||||||
scrolledContent.PositionedDescendants()->AppendToTop(color);
|
scrolledContent.PositionedDescendants()->AppendToTop(color);
|
||||||
}
|
}
|
||||||
|
@ -3695,13 +3695,13 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
info |= CompositorHitTestInfo::eRequiresTargetConfirmation;
|
info |= CompositorHitTestInfo::eRequiresTargetConfirmation;
|
||||||
}
|
}
|
||||||
nsDisplayCompositorHitTestInfo* hitInfo =
|
nsDisplayCompositorHitTestInfo* hitInfo =
|
||||||
MakeDisplayItem<nsDisplayCompositorHitTestInfo>(aBuilder, mScrolledFrame, info, 1,
|
new (aBuilder) nsDisplayCompositorHitTestInfo(aBuilder, mScrolledFrame, info, 1,
|
||||||
Some(mScrollPort + aBuilder->ToReferenceFrame(mOuter)));
|
Some(mScrollPort + aBuilder->ToReferenceFrame(mOuter)));
|
||||||
AppendInternalItemToTop(scrolledContent, hitInfo, zIndex);
|
AppendInternalItemToTop(scrolledContent, hitInfo, zIndex);
|
||||||
}
|
}
|
||||||
if (aBuilder->IsBuildingLayerEventRegions()) {
|
if (aBuilder->IsBuildingLayerEventRegions()) {
|
||||||
nsDisplayLayerEventRegions* inactiveRegionItem =
|
nsDisplayLayerEventRegions* inactiveRegionItem =
|
||||||
MakeDisplayItem<nsDisplayLayerEventRegions>(aBuilder, mScrolledFrame, 1);
|
new (aBuilder) nsDisplayLayerEventRegions(aBuilder, mScrolledFrame, 1);
|
||||||
inactiveRegionItem->AddInactiveScrollPort(mScrolledFrame, mScrollPort + aBuilder->ToReferenceFrame(mOuter));
|
inactiveRegionItem->AddInactiveScrollPort(mScrolledFrame, mScrollPort + aBuilder->ToReferenceFrame(mOuter));
|
||||||
AppendInternalItemToTop(scrolledContent, inactiveRegionItem, zIndex);
|
AppendInternalItemToTop(scrolledContent, inactiveRegionItem, zIndex);
|
||||||
}
|
}
|
||||||
|
@ -3709,7 +3709,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (aBuilder->ShouldBuildScrollInfoItemsForHoisting()) {
|
if (aBuilder->ShouldBuildScrollInfoItemsForHoisting()) {
|
||||||
aBuilder->AppendNewScrollInfoItemForHoisting(
|
aBuilder->AppendNewScrollInfoItemForHoisting(
|
||||||
MakeDisplayItem<nsDisplayScrollInfoLayer>(aBuilder, mScrolledFrame,
|
new (aBuilder) nsDisplayScrollInfoLayer(aBuilder, mScrolledFrame,
|
||||||
mOuter));
|
mOuter));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -482,7 +482,7 @@ nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
clip(aBuilder, this, clipFlags);
|
clip(aBuilder, this, clipFlags);
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayCanvas>(aBuilder, this));
|
new (aBuilder) nsDisplayCanvas(aBuilder, this));
|
||||||
|
|
||||||
DisplaySelectionOverlay(aBuilder, aLists.Content(),
|
DisplaySelectionOverlay(aBuilder, aLists.Content(),
|
||||||
nsISelectionDisplay::DISPLAY_IMAGES);
|
nsISelectionDisplay::DISPLAY_IMAGES);
|
||||||
|
|
|
@ -1849,8 +1849,8 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (!imageOK || !mImage || !SizeIsAvailable(currentRequest)) {
|
if (!imageOK || !mImage || !SizeIsAvailable(currentRequest)) {
|
||||||
// No image yet, or image load failed. Draw the alt-text and an icon
|
// No image yet, or image load failed. Draw the alt-text and an icon
|
||||||
// indicating the status
|
// indicating the status
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayAltFeedback>(aBuilder, this));
|
nsDisplayAltFeedback(aBuilder, this));
|
||||||
|
|
||||||
// This image is visible (we are being asked to paint it) but it's not
|
// This image is visible (we are being asked to paint it) but it's not
|
||||||
// decoded yet. And we are not going to ask the image to draw, so this
|
// decoded yet. And we are not going to ask the image to draw, so this
|
||||||
|
@ -1867,8 +1867,8 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayImage>(aBuilder, this, mImage, mPrevImage));
|
nsDisplayImage(aBuilder, this, mImage, mPrevImage));
|
||||||
|
|
||||||
// If we were previously displaying an icon, we're not anymore
|
// If we were previously displaying an icon, we're not anymore
|
||||||
if (mDisplayingIcon) {
|
if (mDisplayingIcon) {
|
||||||
|
@ -1878,9 +1878,9 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (GetShowFrameBorders() && GetImageMap()) {
|
if (GetShowFrameBorders() && GetImageMap()) {
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayGeneric>(aBuilder, this, PaintDebugImageMap, "DebugImageMap",
|
nsDisplayGeneric(aBuilder, this, PaintDebugImageMap, "DebugImageMap",
|
||||||
DisplayItemType::TYPE_DEBUG_IMAGE_MAP));
|
DisplayItemType::TYPE_DEBUG_IMAGE_MAP));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -586,14 +586,14 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
*aBuilder, content, child, backgroundRect, NS_RGBA(0,0,0,0));
|
*aBuilder, content, child, backgroundRect, NS_RGBA(0,0,0,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
content.AppendToTop(MakeDisplayItem<nsDisplayTransform>(aBuilder, child,
|
content.AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder, child,
|
||||||
&content, content.GetVisibleRect(), ::ComputePageTransform));
|
&content, content.GetVisibleRect(), ::ComputePageTransform));
|
||||||
|
|
||||||
set.Content()->AppendToTop(&content);
|
set.Content()->AppendToTop(&content);
|
||||||
|
|
||||||
if (PresContext()->IsRootPaginatedDocument()) {
|
if (PresContext()->IsRootPaginatedDocument()) {
|
||||||
set.Content()->AppendToTop(
|
set.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayHeaderFooter>(aBuilder, this));
|
nsDisplayHeaderFooter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
set.MoveTo(aLists);
|
set.MoveTo(aLists);
|
||||||
|
|
|
@ -273,9 +273,9 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (GetShowFrameBorders()) {
|
if (GetShowFrameBorders()) {
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayGeneric>(aBuilder, this, PaintDebugPlaceholder,
|
new (aBuilder) nsDisplayGeneric(aBuilder, this, PaintDebugPlaceholder,
|
||||||
"DebugPlaceholder",
|
"DebugPlaceholder",
|
||||||
DisplayItemType::TYPE_DEBUG_PLACEHOLDER));
|
DisplayItemType::TYPE_DEBUG_PLACEHOLDER));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1187,9 +1187,9 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// determine if we are printing
|
// determine if we are printing
|
||||||
if (type == nsPresContext::eContext_Print) {
|
if (type == nsPresContext::eContext_Print) {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayGeneric>(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
|
nsDisplayGeneric(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
|
||||||
DisplayItemType::TYPE_PRINT_PLUGIN));
|
DisplayItemType::TYPE_PRINT_PLUGIN));
|
||||||
} else {
|
} else {
|
||||||
LayerState state = GetLayerState(aBuilder, nullptr);
|
LayerState state = GetLayerState(aBuilder, nullptr);
|
||||||
if (state == LAYER_INACTIVE &&
|
if (state == LAYER_INACTIVE &&
|
||||||
|
@ -1199,12 +1199,12 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (aBuilder->IsPaintingToWindow() &&
|
if (aBuilder->IsPaintingToWindow() &&
|
||||||
state == LAYER_ACTIVE &&
|
state == LAYER_ACTIVE &&
|
||||||
IsTransparentMode()) {
|
IsTransparentMode()) {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayPluginReadback>(aBuilder, this));
|
nsDisplayPluginReadback(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayPlugin>(aBuilder, this));
|
nsDisplayPlugin(aBuilder, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -747,9 +747,9 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
content.AppendToTop(
|
content.AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayTransform>(aBuilder, this, &content, content.GetVisibleRect(),
|
nsDisplayTransform(aBuilder, this, &content, content.GetVisibleRect(),
|
||||||
::ComputePageSequenceTransform));
|
::ComputePageSequenceTransform));
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(&content);
|
aLists.Content()->AppendToTop(&content);
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,7 +318,7 @@ WrapBackgroundColorInOwnLayer(nsDisplayListBuilder* aBuilder,
|
||||||
if (item->GetType() == DisplayItemType::TYPE_BACKGROUND_COLOR) {
|
if (item->GetType() == DisplayItemType::TYPE_BACKGROUND_COLOR) {
|
||||||
nsDisplayList tmpList;
|
nsDisplayList tmpList;
|
||||||
tmpList.AppendToTop(item);
|
tmpList.AppendToTop(item);
|
||||||
item = MakeDisplayItem<nsDisplayOwnLayer>(aBuilder, aFrame, &tmpList, aBuilder->CurrentActiveScrolledRoot());
|
item = new (aBuilder) nsDisplayOwnLayer(aBuilder, aFrame, &tmpList, aBuilder->CurrentActiveScrolledRoot());
|
||||||
}
|
}
|
||||||
tempItems.AppendToTop(item);
|
tempItems.AppendToTop(item);
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
zoomFlags |= nsDisplayOwnLayerFlags::eGenerateScrollableLayer;
|
zoomFlags |= nsDisplayOwnLayerFlags::eGenerateScrollableLayer;
|
||||||
}
|
}
|
||||||
nsDisplayZoom* zoomItem =
|
nsDisplayZoom* zoomItem =
|
||||||
MakeDisplayItem<nsDisplayZoom>(aBuilder, subdocRootFrame, &childItems,
|
new (aBuilder) nsDisplayZoom(aBuilder, subdocRootFrame, &childItems,
|
||||||
subdocAPD, parentAPD, zoomFlags);
|
subdocAPD, parentAPD, zoomFlags);
|
||||||
childItems.AppendToTop(zoomItem);
|
childItems.AppendToTop(zoomItem);
|
||||||
needsOwnLayer = false;
|
needsOwnLayer = false;
|
||||||
|
@ -570,14 +570,14 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
if (constructResolutionItem) {
|
if (constructResolutionItem) {
|
||||||
nsDisplayResolution* resolutionItem =
|
nsDisplayResolution* resolutionItem =
|
||||||
MakeDisplayItem<nsDisplayResolution>(aBuilder, subdocRootFrame, &childItems,
|
new (aBuilder) nsDisplayResolution(aBuilder, subdocRootFrame, &childItems,
|
||||||
flags);
|
flags);
|
||||||
childItems.AppendToTop(resolutionItem);
|
childItems.AppendToTop(resolutionItem);
|
||||||
needsOwnLayer = false;
|
needsOwnLayer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We always want top level content documents to be in their own layer.
|
// We always want top level content documents to be in their own layer.
|
||||||
nsDisplaySubDocument* layerItem = MakeDisplayItem<nsDisplaySubDocument>(
|
nsDisplaySubDocument* layerItem = new (aBuilder) nsDisplaySubDocument(
|
||||||
aBuilder, subdocRootFrame ? subdocRootFrame : this, this,
|
aBuilder, subdocRootFrame ? subdocRootFrame : this, this,
|
||||||
&childItems, flags);
|
&childItems, flags);
|
||||||
childItems.AppendToTop(layerItem);
|
childItems.AppendToTop(layerItem);
|
||||||
|
|
|
@ -5237,7 +5237,7 @@ nsTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayText>(aBuilder, this, isSelected));
|
new (aBuilder) nsDisplayText(aBuilder, this, isSelected));
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsIFrame*
|
static nsIFrame*
|
||||||
|
|
|
@ -570,7 +570,7 @@ nsVideoFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
if (HasVideoElement() && !shouldDisplayPoster) {
|
if (HasVideoElement() && !shouldDisplayPoster) {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayVideo>(aBuilder, this));
|
new (aBuilder) nsDisplayVideo(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add child frames to display list. We expect various children,
|
// Add child frames to display list. We expect various children,
|
||||||
|
|
|
@ -294,7 +294,7 @@ RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
clipState.ClipContentDescendants(bounds);
|
clipState.ClipContentDescendants(bounds);
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayRemote>(aBuilder, aFrame, this));
|
new (aBuilder) nsDisplayRemote(aBuilder, aFrame, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1988,8 +1988,8 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
||||||
// purposes. Normally, users will set the background on the container frame.
|
// purposes. Normally, users will set the background on the container frame.
|
||||||
// paint the selection background -- beware MathML frames overlap a lot
|
// paint the selection background -- beware MathML frames overlap a lot
|
||||||
if (aSelectedRect && !aSelectedRect->IsEmpty()) {
|
if (aSelectedRect && !aSelectedRect->IsEmpty()) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayMathMLSelectionRect>(aBuilder, aForFrame, *aSelectedRect));
|
nsDisplayMathMLSelectionRect(aBuilder, aForFrame, *aSelectedRect));
|
||||||
}
|
}
|
||||||
else if (mRect.width && mRect.height) {
|
else if (mRect.width && mRect.height) {
|
||||||
if (styleContext != parentContext &&
|
if (styleContext != parentContext &&
|
||||||
|
@ -2004,15 +2004,15 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
#if defined(DEBUG) && defined(SHOW_BOUNDING_BOX)
|
||||||
// for visual debug
|
// for visual debug
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayMathMLCharDebug>(aBuilder, aForFrame, mRect));
|
nsDisplayMathMLCharDebug(aBuilder, aForFrame, mRect));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayMathMLCharForeground>(aBuilder, aForFrame, this,
|
nsDisplayMathMLCharForeground(aBuilder, aForFrame, this,
|
||||||
aIndex,
|
aIndex,
|
||||||
aSelectedRect &&
|
aSelectedRect &&
|
||||||
!aSelectedRect->IsEmpty()));
|
!aSelectedRect->IsEmpty()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -625,7 +625,7 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayMathMLError>(aBuilder, this));
|
new (aBuilder) nsDisplayMathMLError(aBuilder, this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,8 +318,8 @@ nsMathMLFrame::DisplayBoundingMetrics(nsDisplayListBuilder* aBuilder,
|
||||||
nscoord w = aMetrics.rightBearing - aMetrics.leftBearing;
|
nscoord w = aMetrics.rightBearing - aMetrics.leftBearing;
|
||||||
nscoord h = aMetrics.ascent + aMetrics.descent;
|
nscoord h = aMetrics.ascent + aMetrics.descent;
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayMathMLBoundingMetrics>(aBuilder, aFrame, nsRect(x,y,w,h)));
|
nsDisplayMathMLBoundingMetrics(aBuilder, aFrame, nsRect(x,y,w,h)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -370,8 +370,8 @@ nsMathMLFrame::DisplayBar(nsDisplayListBuilder* aBuilder,
|
||||||
if (!aFrame->StyleVisibility()->IsVisible() || aRect.IsEmpty())
|
if (!aFrame->StyleVisibility()->IsVisible() || aRect.IsEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayMathMLBar>(aBuilder, aFrame, aRect, aIndex));
|
nsDisplayMathMLBar(aBuilder, aFrame, aRect, aIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -873,6 +873,6 @@ nsMathMLmencloseFrame::DisplayNotation(nsDisplayListBuilder* aBuilder,
|
||||||
aThickness <= 0)
|
aThickness <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayNotation>(aBuilder, aFrame, aRect, aThickness, aType));
|
nsDisplayNotation(aBuilder, aFrame, aRect, aThickness, aType));
|
||||||
}
|
}
|
||||||
|
|
|
@ -656,7 +656,7 @@ nsMathMLmfracFrame::DisplaySlash(nsDisplayListBuilder* aBuilder,
|
||||||
if (!aFrame->StyleVisibility()->IsVisible() || aRect.IsEmpty())
|
if (!aFrame->StyleVisibility()->IsVisible() || aRect.IsEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayMathMLSlash>(aBuilder, aFrame, aRect, aThickness,
|
nsDisplayMathMLSlash(aBuilder, aFrame, aRect, aThickness,
|
||||||
StyleVisibility()->mDirection));
|
StyleVisibility()->mDirection));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1232,7 +1232,8 @@ nsMathMLmtdFrame::ProcessBorders(nsTableFrame* aFrame,
|
||||||
nsDisplayListBuilder* aBuilder,
|
nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
aLists.BorderBackground()->AppendToTop(MakeDisplayItem<nsDisplaymtdBorder>(aBuilder, this));
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
|
nsDisplaymtdBorder(aBuilder, this));
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,6 @@ DisplayItemData::DisplayItemData(LayerManagerData* aParent, uint32_t aKey,
|
||||||
, mUsed(true)
|
, mUsed(true)
|
||||||
, mIsInvalid(false)
|
, mIsInvalid(false)
|
||||||
, mReusedItem(false)
|
, mReusedItem(false)
|
||||||
, mDisconnected(false)
|
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(DisplayItemData);
|
MOZ_COUNT_CTOR(DisplayItemData);
|
||||||
|
|
||||||
|
@ -261,7 +260,15 @@ static const nsIFrame* sDestroyedFrame = nullptr;
|
||||||
DisplayItemData::~DisplayItemData()
|
DisplayItemData::~DisplayItemData()
|
||||||
{
|
{
|
||||||
MOZ_COUNT_DTOR(DisplayItemData);
|
MOZ_COUNT_DTOR(DisplayItemData);
|
||||||
Disconnect();
|
MOZ_RELEASE_ASSERT(mLayer);
|
||||||
|
for (uint32_t i = 0; i < mFrameList.Length(); i++) {
|
||||||
|
nsIFrame* frame = mFrameList[i];
|
||||||
|
if (frame == sDestroyedFrame) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SmallPointerArray<DisplayItemData>& array = frame->DisplayItemData();
|
||||||
|
array.RemoveElement(this);
|
||||||
|
}
|
||||||
|
|
||||||
MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas);
|
MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas);
|
||||||
nsPtrHashKey<mozilla::DisplayItemData>* entry
|
nsPtrHashKey<mozilla::DisplayItemData>* entry
|
||||||
|
@ -276,27 +283,6 @@ DisplayItemData::~DisplayItemData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
DisplayItemData::Disconnect()
|
|
||||||
{
|
|
||||||
if (mDisconnected) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mDisconnected = true;
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < mFrameList.Length(); i++) {
|
|
||||||
nsIFrame* frame = mFrameList[i];
|
|
||||||
if (frame == sDestroyedFrame) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SmallPointerArray<DisplayItemData>& array = frame->DisplayItemData();
|
|
||||||
array.RemoveElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
mLayer = nullptr;
|
|
||||||
mOptLayer = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DisplayItemData::ClearAnimationCompositorState()
|
DisplayItemData::ClearAnimationCompositorState()
|
||||||
{
|
{
|
||||||
|
@ -343,10 +329,6 @@ public:
|
||||||
}
|
}
|
||||||
~LayerManagerData() {
|
~LayerManagerData() {
|
||||||
MOZ_COUNT_DTOR(LayerManagerData);
|
MOZ_COUNT_DTOR(LayerManagerData);
|
||||||
|
|
||||||
for (auto iter = mDisplayItems.Iter(); !iter.Done(); iter.Next()) {
|
|
||||||
iter.Get()->GetKey()->Disconnect();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DISPLAY_ITEM_DATA
|
#ifdef DEBUG_DISPLAY_ITEM_DATA
|
||||||
|
@ -1949,7 +1931,7 @@ FrameLayerBuilder::RemoveFrameFromLayerManager(const nsIFrame* aFrame,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (DisplayItemData* data : aArray) {
|
for (DisplayItemData* data : aArray) {
|
||||||
PaintedLayer* t = data->mLayer ? data->mLayer->AsPaintedLayer() : nullptr;
|
PaintedLayer* t = data->mLayer->AsPaintedLayer();
|
||||||
if (t) {
|
if (t) {
|
||||||
PaintedDisplayItemLayerUserData* paintedData =
|
PaintedDisplayItemLayerUserData* paintedData =
|
||||||
static_cast<PaintedDisplayItemLayerUserData*>(t->GetUserData(&gPaintedDisplayItemLayerUserData));
|
static_cast<PaintedDisplayItemLayerUserData*>(t->GetUserData(&gPaintedDisplayItemLayerUserData));
|
||||||
|
@ -1962,7 +1944,6 @@ FrameLayerBuilder::RemoveFrameFromLayerManager(const nsIFrame* aFrame,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data->Disconnect();
|
|
||||||
data->mParent->mDisplayItems.RemoveEntry(data);
|
data->mParent->mDisplayItems.RemoveEntry(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2034,7 +2015,6 @@ FrameLayerBuilder::WillEndTransaction()
|
||||||
}
|
}
|
||||||
|
|
||||||
data->ClearAnimationCompositorState();
|
data->ClearAnimationCompositorState();
|
||||||
data->Disconnect();
|
|
||||||
iter.Remove();
|
iter.Remove();
|
||||||
} else {
|
} else {
|
||||||
ComputeGeometryChangeForItem(data);
|
ComputeGeometryChangeForItem(data);
|
||||||
|
@ -2081,18 +2061,14 @@ FrameLayerBuilder::HasRetainedDataFor(nsIFrame* aFrame, uint32_t aDisplayItemKey
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayItemData*
|
DisplayItemData*
|
||||||
FrameLayerBuilder::GetOldLayerForFrame(nsIFrame* aFrame, uint32_t aDisplayItemKey, DisplayItemData* aOldData /* = nullptr */)
|
FrameLayerBuilder::GetOldLayerForFrame(nsIFrame* aFrame, uint32_t aDisplayItemKey)
|
||||||
{
|
{
|
||||||
// If we need to build a new layer tree, then just refuse to recycle
|
// If we need to build a new layer tree, then just refuse to recycle
|
||||||
// anything.
|
// anything.
|
||||||
if (!mRetainingManager || mInvalidateAllLayers)
|
if (!mRetainingManager || mInvalidateAllLayers)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
DisplayItemData* data = aOldData;
|
DisplayItemData *data = GetDisplayItemData(aFrame, aDisplayItemKey);
|
||||||
if (!data || data->mLayer->Manager() != mRetainingManager || data->Disconnected()) {
|
|
||||||
data = GetDisplayItemData(aFrame, aDisplayItemKey);
|
|
||||||
}
|
|
||||||
MOZ_ASSERT(data == GetDisplayItemData(aFrame, aDisplayItemKey));
|
|
||||||
|
|
||||||
if (data && data->mLayer->Manager() == mRetainingManager) {
|
if (data && data->mLayer->Manager() == mRetainingManager) {
|
||||||
return data;
|
return data;
|
||||||
|
@ -3160,9 +3136,7 @@ void ContainerState::FinishPaintedLayerData(PaintedLayerData& aData, FindOpaqueB
|
||||||
MOZ_ASSERT(item.mItem->GetType() != DisplayItemType::TYPE_COMPOSITOR_HITTEST_INFO);
|
MOZ_ASSERT(item.mItem->GetType() != DisplayItemType::TYPE_COMPOSITOR_HITTEST_INFO);
|
||||||
|
|
||||||
DisplayItemData* oldData =
|
DisplayItemData* oldData =
|
||||||
mLayerBuilder->GetOldLayerForFrame(item.mItem->Frame(),
|
mLayerBuilder->GetOldLayerForFrame(item.mItem->Frame(), item.mItem->GetPerFrameKey());
|
||||||
item.mItem->GetPerFrameKey(),
|
|
||||||
item.mItem->HasMergedFrames() ? nullptr : item.mItem->GetDisplayItemData());
|
|
||||||
InvalidateForLayerChange(item.mItem, data->mLayer, oldData);
|
InvalidateForLayerChange(item.mItem, data->mLayer, oldData);
|
||||||
mLayerBuilder->AddPaintedDisplayItem(data, item.mItem, item.mClip,
|
mLayerBuilder->AddPaintedDisplayItem(data, item.mItem, item.mClip,
|
||||||
*this, item.mLayerState,
|
*this, item.mLayerState,
|
||||||
|
@ -4908,8 +4882,6 @@ FrameLayerBuilder::StoreDataForFrame(nsDisplayItem* aItem, Layer* aLayer,
|
||||||
RefPtr<DisplayItemData> data =
|
RefPtr<DisplayItemData> data =
|
||||||
new (aItem->Frame()->PresContext()) DisplayItemData(lmd, aItem->GetPerFrameKey(), aLayer);
|
new (aItem->Frame()->PresContext()) DisplayItemData(lmd, aItem->GetPerFrameKey(), aLayer);
|
||||||
|
|
||||||
aItem->SetDisplayItemData(data);
|
|
||||||
|
|
||||||
data->BeginUpdate(aLayer, aState, aItem);
|
data->BeginUpdate(aLayer, aState, aItem);
|
||||||
|
|
||||||
lmd->mDisplayItems.PutEntry(data);
|
lmd->mDisplayItems.PutEntry(data);
|
||||||
|
|
|
@ -71,8 +71,6 @@ public:
|
||||||
void Invalidate() { mIsInvalid = true; }
|
void Invalidate() { mIsInvalid = true; }
|
||||||
void ClearAnimationCompositorState();
|
void ClearAnimationCompositorState();
|
||||||
|
|
||||||
bool HasMergedFrames() const { return mFrameList.Length() > 1; }
|
|
||||||
|
|
||||||
static DisplayItemData* AssertDisplayItemData(DisplayItemData* aData);
|
static DisplayItemData* AssertDisplayItemData(DisplayItemData* aData);
|
||||||
|
|
||||||
void* operator new(size_t sz, nsPresContext* aPresContext)
|
void* operator new(size_t sz, nsPresContext* aPresContext)
|
||||||
|
@ -106,10 +104,6 @@ public:
|
||||||
return mRefCnt;
|
return mRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Disconnect();
|
|
||||||
|
|
||||||
bool Disconnected() { return mDisconnected; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DisplayItemData(LayerManagerData* aParent,
|
DisplayItemData(LayerManagerData* aParent,
|
||||||
uint32_t aKey,
|
uint32_t aKey,
|
||||||
|
@ -192,7 +186,6 @@ private:
|
||||||
bool mUsed;
|
bool mUsed;
|
||||||
bool mIsInvalid;
|
bool mIsInvalid;
|
||||||
bool mReusedItem;
|
bool mReusedItem;
|
||||||
bool mDisconnected;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RefCountedRegion {
|
class RefCountedRegion {
|
||||||
|
@ -629,7 +622,7 @@ public:
|
||||||
* This could be a dedicated layer for the display item, or a PaintedLayer
|
* This could be a dedicated layer for the display item, or a PaintedLayer
|
||||||
* that renders many display items.
|
* that renders many display items.
|
||||||
*/
|
*/
|
||||||
DisplayItemData* GetOldLayerForFrame(nsIFrame* aFrame, uint32_t aDisplayItemKey, DisplayItemData* aOldData = nullptr);
|
DisplayItemData* GetOldLayerForFrame(nsIFrame* aFrame, uint32_t aDisplayItemKey);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -2257,7 +2257,7 @@ nsDisplayListBuilder::BuildCompositorHitTestInfoIfNeeded(nsIFrame* aFrame,
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayCompositorHitTestInfo* item =
|
nsDisplayCompositorHitTestInfo* item =
|
||||||
MakeDisplayItem<nsDisplayCompositorHitTestInfo>(this, aFrame, info);
|
new (this) nsDisplayCompositorHitTestInfo(this, aFrame, info);
|
||||||
|
|
||||||
SetCompositorHitTestInfo(item);
|
SetCompositorHitTestInfo(item);
|
||||||
aList->AppendToTop(item);
|
aList->AppendToTop(item);
|
||||||
|
@ -3531,10 +3531,9 @@ nsDisplayBackgroundImage::GetInitData(nsDisplayListBuilder* aBuilder,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayBackgroundImage::nsDisplayBackgroundImage(nsDisplayListBuilder* aBuilder,
|
nsDisplayBackgroundImage::nsDisplayBackgroundImage(const InitData& aInitData,
|
||||||
const InitData& aInitData,
|
|
||||||
nsIFrame* aFrameForBounds)
|
nsIFrame* aFrameForBounds)
|
||||||
: nsDisplayImageContainer(aBuilder, aInitData.frame)
|
: nsDisplayImageContainer(aInitData.builder, aInitData.frame)
|
||||||
, mBackgroundStyle(aInitData.backgroundStyle)
|
, mBackgroundStyle(aInitData.backgroundStyle)
|
||||||
, mImage(aInitData.image)
|
, mImage(aInitData.image)
|
||||||
, mDependentFrame(nullptr)
|
, mDependentFrame(nullptr)
|
||||||
|
@ -3644,7 +3643,7 @@ SpecialCutoutRegionCase(nsDisplayListBuilder* aBuilder,
|
||||||
region.Sub(aBackgroundRect, *static_cast<nsRegion*>(cutoutRegion));
|
region.Sub(aBackgroundRect, *static_cast<nsRegion*>(cutoutRegion));
|
||||||
region.MoveBy(aBuilder->ToReferenceFrame(aFrame));
|
region.MoveBy(aBuilder->ToReferenceFrame(aFrame));
|
||||||
aList->AppendToTop(
|
aList->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplaySolidColorRegion>(aBuilder, aFrame, region, aColor));
|
new (aBuilder) nsDisplaySolidColorRegion(aBuilder, aFrame, region, aColor));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3749,12 +3748,12 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
nsDisplayBackgroundColor *bgItem;
|
nsDisplayBackgroundColor *bgItem;
|
||||||
if (aSecondaryReferenceFrame) {
|
if (aSecondaryReferenceFrame) {
|
||||||
bgItem =
|
bgItem =
|
||||||
MakeDisplayItem<nsDisplayTableBackgroundColor>(aBuilder, aSecondaryReferenceFrame, bgColorRect, bg,
|
new (aBuilder) nsDisplayTableBackgroundColor(aBuilder, aSecondaryReferenceFrame, bgColorRect, bg,
|
||||||
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0),
|
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0),
|
||||||
aFrame);
|
aFrame);
|
||||||
} else {
|
} else {
|
||||||
bgItem =
|
bgItem =
|
||||||
MakeDisplayItem<nsDisplayBackgroundColor>(aBuilder, aFrame, bgColorRect, bg,
|
new (aBuilder) nsDisplayBackgroundColor(aBuilder, aFrame, bgColorRect, bg,
|
||||||
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0));
|
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0));
|
||||||
}
|
}
|
||||||
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
||||||
|
@ -3766,11 +3765,11 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
if (theme->NeedToClearBackgroundBehindWidget(aFrame, aFrame->StyleDisplay()->mAppearance) &&
|
if (theme->NeedToClearBackgroundBehindWidget(aFrame, aFrame->StyleDisplay()->mAppearance) &&
|
||||||
aBuilder->IsInChromeDocumentOrPopup() && !aBuilder->IsInTransform()) {
|
aBuilder->IsInChromeDocumentOrPopup() && !aBuilder->IsInTransform()) {
|
||||||
bgItemList.AppendToTop(
|
bgItemList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayClearBackground>(aBuilder, aFrame));
|
new (aBuilder) nsDisplayClearBackground(aBuilder, aFrame));
|
||||||
}
|
}
|
||||||
if (aSecondaryReferenceFrame) {
|
if (aSecondaryReferenceFrame) {
|
||||||
nsDisplayTableThemedBackground* bgItem =
|
nsDisplayTableThemedBackground* bgItem =
|
||||||
MakeDisplayItem<nsDisplayTableThemedBackground>(aBuilder,
|
new (aBuilder) nsDisplayTableThemedBackground(aBuilder,
|
||||||
aSecondaryReferenceFrame,
|
aSecondaryReferenceFrame,
|
||||||
bgRect,
|
bgRect,
|
||||||
aFrame);
|
aFrame);
|
||||||
|
@ -3778,7 +3777,7 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
bgItemList.AppendToTop(bgItem);
|
bgItemList.AppendToTop(bgItem);
|
||||||
} else {
|
} else {
|
||||||
nsDisplayThemedBackground* bgItem =
|
nsDisplayThemedBackground* bgItem =
|
||||||
MakeDisplayItem<nsDisplayThemedBackground>(aBuilder, aFrame, bgRect);
|
new (aBuilder) nsDisplayThemedBackground(aBuilder, aFrame, bgRect);
|
||||||
bgItem->Init(aBuilder);
|
bgItem->Init(aBuilder);
|
||||||
bgItemList.AppendToTop(bgItem);
|
bgItemList.AppendToTop(bgItem);
|
||||||
}
|
}
|
||||||
|
@ -3852,9 +3851,9 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
nsDisplayBackgroundImage::InitData tableData = bgData;
|
nsDisplayBackgroundImage::InitData tableData = bgData;
|
||||||
nsIFrame* styleFrame = tableData.frame;
|
nsIFrame* styleFrame = tableData.frame;
|
||||||
tableData.frame = aSecondaryReferenceFrame;
|
tableData.frame = aSecondaryReferenceFrame;
|
||||||
bgItem = MakeDisplayItem<nsDisplayTableBackgroundImage>(aBuilder, tableData, styleFrame);
|
bgItem = new (aBuilder) nsDisplayTableBackgroundImage(tableData, styleFrame);
|
||||||
} else {
|
} else {
|
||||||
bgItem = MakeDisplayItem<nsDisplayBackgroundImage>(aBuilder, bgData);
|
bgItem = new (aBuilder) nsDisplayBackgroundImage(bgData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
||||||
|
@ -3877,9 +3876,9 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
nsIFrame* styleFrame = tableData.frame;
|
nsIFrame* styleFrame = tableData.frame;
|
||||||
tableData.frame = aSecondaryReferenceFrame;
|
tableData.frame = aSecondaryReferenceFrame;
|
||||||
|
|
||||||
bgItem = MakeDisplayItem<nsDisplayTableBackgroundImage>(aBuilder, tableData, styleFrame);
|
bgItem = new (aBuilder) nsDisplayTableBackgroundImage(tableData, styleFrame);
|
||||||
} else {
|
} else {
|
||||||
bgItem = MakeDisplayItem<nsDisplayBackgroundImage>(aBuilder, bgData);
|
bgItem = new (aBuilder) nsDisplayBackgroundImage(bgData);
|
||||||
}
|
}
|
||||||
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
bgItem->SetDependentFrame(aBuilder, dependentFrame);
|
||||||
thisItemList.AppendToTop(bgItem);
|
thisItemList.AppendToTop(bgItem);
|
||||||
|
@ -3892,12 +3891,12 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
// item with respect to asr.
|
// item with respect to asr.
|
||||||
if (aSecondaryReferenceFrame) {
|
if (aSecondaryReferenceFrame) {
|
||||||
thisItemList.AppendToTop(
|
thisItemList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayTableBlendMode>(aBuilder, aSecondaryReferenceFrame, &thisItemList,
|
new (aBuilder) nsDisplayTableBlendMode(aBuilder, aSecondaryReferenceFrame, &thisItemList,
|
||||||
bg->mImage.mLayers[i].mBlendMode,
|
bg->mImage.mLayers[i].mBlendMode,
|
||||||
asr, i + 1, aFrame));
|
asr, i + 1, aFrame));
|
||||||
} else {
|
} else {
|
||||||
thisItemList.AppendToTop(
|
thisItemList.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBlendMode>(aBuilder, aFrame, &thisItemList,
|
new (aBuilder) nsDisplayBlendMode(aBuilder, aFrame, &thisItemList,
|
||||||
bg->mImage.mLayers[i].mBlendMode,
|
bg->mImage.mLayers[i].mBlendMode,
|
||||||
asr, i + 1));
|
asr, i + 1));
|
||||||
}
|
}
|
||||||
|
@ -4400,10 +4399,9 @@ nsDisplayBackgroundImage::GetBoundsInternal(nsDisplayListBuilder* aBuilder,
|
||||||
aBuilder->GetBackgroundPaintFlags());
|
aBuilder->GetBackgroundPaintFlags());
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayTableBackgroundImage::nsDisplayTableBackgroundImage(nsDisplayListBuilder* aBuilder,
|
nsDisplayTableBackgroundImage::nsDisplayTableBackgroundImage(const InitData& aData,
|
||||||
const InitData& aData,
|
|
||||||
nsIFrame* aCellFrame)
|
nsIFrame* aCellFrame)
|
||||||
: nsDisplayBackgroundImage(aBuilder, aData, aCellFrame)
|
: nsDisplayBackgroundImage(aData, aCellFrame)
|
||||||
, mStyleFrame(aCellFrame)
|
, mStyleFrame(aCellFrame)
|
||||||
, mTableType(GetTableTypeFromFrame(mStyleFrame))
|
, mTableType(GetTableTypeFromFrame(mStyleFrame))
|
||||||
{
|
{
|
||||||
|
@ -6270,7 +6268,7 @@ nsDisplayWrapList::MergeDisplayListFromItem(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// Create a new nsDisplayWrapList using a copy-constructor. This is done
|
// Create a new nsDisplayWrapList using a copy-constructor. This is done
|
||||||
// to preserve the information about bounds.
|
// to preserve the information about bounds.
|
||||||
nsDisplayWrapList* wrapper = MakeDisplayItem<nsDisplayWrapList>(aBuilder, *wrappedItem);
|
nsDisplayWrapList* wrapper = new (aBuilder) nsDisplayWrapList(aBuilder, *wrappedItem);
|
||||||
|
|
||||||
// Set the display list pointer of the new wrapper item to the display list
|
// Set the display list pointer of the new wrapper item to the display list
|
||||||
// of the wrapped item.
|
// of the wrapped item.
|
||||||
|
@ -6922,7 +6920,7 @@ nsDisplayBlendContainer::CreateForMixBlendMode(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aFrame, nsDisplayList* aList,
|
nsIFrame* aFrame, nsDisplayList* aList,
|
||||||
const ActiveScrolledRoot* aActiveScrolledRoot)
|
const ActiveScrolledRoot* aActiveScrolledRoot)
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayBlendContainer>(aBuilder, aFrame, aList, aActiveScrolledRoot, false);
|
return new (aBuilder) nsDisplayBlendContainer(aBuilder, aFrame, aList, aActiveScrolledRoot, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ nsDisplayBlendContainer*
|
/* static */ nsDisplayBlendContainer*
|
||||||
|
@ -6930,7 +6928,7 @@ nsDisplayBlendContainer::CreateForBackgroundBlendMode(nsDisplayListBuilder* aBui
|
||||||
nsIFrame* aFrame, nsDisplayList* aList,
|
nsIFrame* aFrame, nsDisplayList* aList,
|
||||||
const ActiveScrolledRoot* aActiveScrolledRoot)
|
const ActiveScrolledRoot* aActiveScrolledRoot)
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayBlendContainer>(aBuilder, aFrame, aList, aActiveScrolledRoot, true);
|
return new (aBuilder) nsDisplayBlendContainer(aBuilder, aFrame, aList, aActiveScrolledRoot, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayBlendContainer::nsDisplayBlendContainer(nsDisplayListBuilder* aBuilder,
|
nsDisplayBlendContainer::nsDisplayBlendContainer(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -6997,7 +6995,7 @@ nsDisplayTableBlendContainer::CreateForBackgroundBlendMode(nsDisplayListBuilder*
|
||||||
const ActiveScrolledRoot* aActiveScrolledRoot,
|
const ActiveScrolledRoot* aActiveScrolledRoot,
|
||||||
nsIFrame* aAncestorFrame)
|
nsIFrame* aAncestorFrame)
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayTableBlendContainer>(aBuilder, aFrame, aList, aActiveScrolledRoot, true, aAncestorFrame);
|
return new (aBuilder) nsDisplayTableBlendContainer(aBuilder, aFrame, aList, aActiveScrolledRoot, true, aAncestorFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayOwnLayer::nsDisplayOwnLayer(nsDisplayListBuilder* aBuilder,
|
nsDisplayOwnLayer::nsDisplayOwnLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -7376,7 +7374,7 @@ nsDisplayFixedPosition::CreateForFixedBackground(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayList temp;
|
nsDisplayList temp;
|
||||||
temp.AppendToTop(aImage);
|
temp.AppendToTop(aImage);
|
||||||
|
|
||||||
return MakeDisplayItem<nsDisplayFixedPosition>(aBuilder, aFrame, &temp, aIndex + 1);
|
return new (aBuilder) nsDisplayFixedPosition(aBuilder, aFrame, &temp, aIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7489,7 +7487,7 @@ nsDisplayTableFixedPosition::CreateForFixedBackground(nsDisplayListBuilder* aBui
|
||||||
nsDisplayList temp;
|
nsDisplayList temp;
|
||||||
temp.AppendToTop(aImage);
|
temp.AppendToTop(aImage);
|
||||||
|
|
||||||
return MakeDisplayItem<nsDisplayTableFixedPosition>(aBuilder, aFrame, &temp, aIndex + 1, aAncestorFrame);
|
return new (aBuilder) nsDisplayTableFixedPosition(aBuilder, aFrame, &temp, aIndex + 1, aAncestorFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayStickyPosition::nsDisplayStickyPosition(nsDisplayListBuilder* aBuilder,
|
nsDisplayStickyPosition::nsDisplayStickyPosition(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
|
@ -130,14 +130,10 @@ typedef mozilla::EnumSet<mozilla::gfx::CompositionOp> BlendModeSet;
|
||||||
#define NS_DISPLAY_DECL_NAME(n, e) \
|
#define NS_DISPLAY_DECL_NAME(n, e) \
|
||||||
virtual const char* Name() const override { return n; } \
|
virtual const char* Name() const override { return n; } \
|
||||||
virtual DisplayItemType GetType() const override { return DisplayItemType::e; } \
|
virtual DisplayItemType GetType() const override { return DisplayItemType::e; } \
|
||||||
private: \
|
|
||||||
void* operator new(size_t aSize, \
|
void* operator new(size_t aSize, \
|
||||||
nsDisplayListBuilder* aBuilder) { \
|
nsDisplayListBuilder* aBuilder) { \
|
||||||
return aBuilder->Allocate(aSize, DisplayItemType::e); \
|
return aBuilder->Allocate(aSize, DisplayItemType::e); \
|
||||||
} \
|
}
|
||||||
template<typename T, typename... Args> \
|
|
||||||
friend T* ::MakeDisplayItem(nsDisplayListBuilder* aBuilder, Args&&... aArgs); \
|
|
||||||
public:
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2029,27 +2025,6 @@ protected:
|
||||||
|
|
||||||
class nsDisplayWrapList;
|
class nsDisplayWrapList;
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
|
||||||
MOZ_ALWAYS_INLINE T*
|
|
||||||
MakeDisplayItem(nsDisplayListBuilder* aBuilder, Args&&... aArgs)
|
|
||||||
{
|
|
||||||
T* item = new (aBuilder) T(aBuilder, mozilla::Forward<Args>(aArgs)...);
|
|
||||||
|
|
||||||
const mozilla::SmallPointerArray<mozilla::DisplayItemData>& array =
|
|
||||||
item->Frame()->DisplayItemData();
|
|
||||||
for (uint32_t i = 0; i < array.Length(); i++) {
|
|
||||||
mozilla::DisplayItemData* did = array.ElementAt(i);
|
|
||||||
if (did->GetDisplayItemKey() == item->GetPerFrameKey()) {
|
|
||||||
if (did->HasMergedFrames()) {
|
|
||||||
item->SetDisplayItemData(did);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the unit of rendering and event testing. Each instance of this
|
* This is the unit of rendering and event testing. Each instance of this
|
||||||
* class represents an entity that can be drawn on the screen, e.g., a
|
* class represents an entity that can be drawn on the screen, e.g., a
|
||||||
|
@ -2141,7 +2116,6 @@ public:
|
||||||
if (mFrame && aFrame == mFrame) {
|
if (mFrame && aFrame == mFrame) {
|
||||||
MOZ_ASSERT(!mFrame->HasDisplayItem(this));
|
MOZ_ASSERT(!mFrame->HasDisplayItem(this));
|
||||||
mFrame = nullptr;
|
mFrame = nullptr;
|
||||||
mDisplayItemData = nullptr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2608,8 +2582,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void GetMergedFrames(nsTArray<nsIFrame*>* aFrames) const {}
|
virtual void GetMergedFrames(nsTArray<nsIFrame*>* aFrames) const {}
|
||||||
|
|
||||||
virtual bool HasMergedFrames() const { return false; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* During the visibility computation and after TryMerge, display lists may
|
* During the visibility computation and after TryMerge, display lists may
|
||||||
* return true here to flatten themselves away, removing them. This
|
* return true here to flatten themselves away, removing them. This
|
||||||
|
@ -2835,12 +2807,6 @@ public:
|
||||||
nsDisplayListBuilder* aBuilder,
|
nsDisplayListBuilder* aBuilder,
|
||||||
const ActiveScrolledRoot* aASR) const;
|
const ActiveScrolledRoot* aASR) const;
|
||||||
|
|
||||||
void SetDisplayItemData(mozilla::DisplayItemData* aDID) {
|
|
||||||
mDisplayItemData = aDID;
|
|
||||||
}
|
|
||||||
|
|
||||||
mozilla::DisplayItemData* GetDisplayItemData() { return mDisplayItemData; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsDisplayItem() = delete;
|
nsDisplayItem() = delete;
|
||||||
|
|
||||||
|
@ -2857,7 +2823,6 @@ protected:
|
||||||
RefPtr<struct AnimatedGeometryRoot> mAnimatedGeometryRoot;
|
RefPtr<struct AnimatedGeometryRoot> mAnimatedGeometryRoot;
|
||||||
// Result of ToReferenceFrame(mFrame), if mFrame is non-null
|
// Result of ToReferenceFrame(mFrame), if mFrame is non-null
|
||||||
nsPoint mToReferenceFrame;
|
nsPoint mToReferenceFrame;
|
||||||
RefPtr<mozilla::DisplayItemData> mDisplayItemData;
|
|
||||||
// This is the rectangle that needs to be painted.
|
// This is the rectangle that needs to be painted.
|
||||||
// Display item construction sets this to the dirty rect.
|
// Display item construction sets this to the dirty rect.
|
||||||
// nsDisplayList::ComputeVisibility sets this to the visible region
|
// nsDisplayList::ComputeVisibility sets this to the visible region
|
||||||
|
@ -3421,6 +3386,10 @@ public:
|
||||||
}
|
}
|
||||||
virtual const char* Name() const override { return mName; }
|
virtual const char* Name() const override { return mName; }
|
||||||
virtual DisplayItemType GetType() const override { return mType; }
|
virtual DisplayItemType GetType() const override { return mType; }
|
||||||
|
void* operator new(size_t aSize,
|
||||||
|
nsDisplayListBuilder* aBuilder) {
|
||||||
|
return aBuilder->Allocate(aSize, DisplayItemType::TYPE_GENERIC);
|
||||||
|
}
|
||||||
|
|
||||||
// This override is needed because GetType() for nsDisplayGeneric subclasses
|
// This override is needed because GetType() for nsDisplayGeneric subclasses
|
||||||
// does not match TYPE_GENERIC that was used to allocate the object.
|
// does not match TYPE_GENERIC that was used to allocate the object.
|
||||||
|
@ -3431,13 +3400,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void* operator new(size_t aSize,
|
|
||||||
nsDisplayListBuilder* aBuilder) {
|
|
||||||
return aBuilder->Allocate(aSize, DisplayItemType::TYPE_GENERIC);
|
|
||||||
}
|
|
||||||
template<typename T, typename... Args>
|
|
||||||
friend T* MakeDisplayItem(nsDisplayListBuilder* aBuilder, Args&&... aArgs);
|
|
||||||
|
|
||||||
PaintCallback mPaint;
|
PaintCallback mPaint;
|
||||||
OldPaintCallback mOldPaint; // XXX: should be removed eventually
|
OldPaintCallback mOldPaint; // XXX: should be removed eventually
|
||||||
const char* mName;
|
const char* mName;
|
||||||
|
@ -3491,7 +3453,7 @@ protected:
|
||||||
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
||||||
PresShell()->IsPaintingFrameCounts()) { \
|
PresShell()->IsPaintingFrameCounts()) { \
|
||||||
aLists.Outlines()->AppendToTop( \
|
aLists.Outlines()->AppendToTop( \
|
||||||
MakeDisplayItem<nsDisplayReflowCount>(aBuilder, this, _name)); \
|
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name)); \
|
||||||
} \
|
} \
|
||||||
PR_END_MACRO
|
PR_END_MACRO
|
||||||
|
|
||||||
|
@ -3500,7 +3462,7 @@ protected:
|
||||||
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
if (!aBuilder->IsBackgroundOnly() && !aBuilder->IsForEventDelivery() && \
|
||||||
PresShell()->IsPaintingFrameCounts()) { \
|
PresShell()->IsPaintingFrameCounts()) { \
|
||||||
aLists.Outlines()->AppendToTop( \
|
aLists.Outlines()->AppendToTop( \
|
||||||
MakeDisplayItem<nsDisplayReflowCount>(aBuilder, this, _name, _color)); \
|
new (aBuilder) nsDisplayReflowCount(aBuilder, this, _name, _color)); \
|
||||||
} \
|
} \
|
||||||
PR_END_MACRO
|
PR_END_MACRO
|
||||||
|
|
||||||
|
@ -3872,8 +3834,7 @@ public:
|
||||||
const nsRect& aBackgroundRect,
|
const nsRect& aBackgroundRect,
|
||||||
const nsStyleBackground* aBackgroundStyle);
|
const nsStyleBackground* aBackgroundStyle);
|
||||||
|
|
||||||
explicit nsDisplayBackgroundImage(nsDisplayListBuilder* aBuilder,
|
explicit nsDisplayBackgroundImage(const InitData& aInitData,
|
||||||
const InitData& aInitData,
|
|
||||||
nsIFrame* aFrameForBounds = nullptr);
|
nsIFrame* aFrameForBounds = nullptr);
|
||||||
virtual ~nsDisplayBackgroundImage();
|
virtual ~nsDisplayBackgroundImage();
|
||||||
|
|
||||||
|
@ -4067,7 +4028,7 @@ TableType GetTableTypeFromFrame(nsIFrame* aFrame);
|
||||||
*/
|
*/
|
||||||
class nsDisplayTableBackgroundImage : public nsDisplayBackgroundImage {
|
class nsDisplayTableBackgroundImage : public nsDisplayBackgroundImage {
|
||||||
public:
|
public:
|
||||||
nsDisplayTableBackgroundImage(nsDisplayListBuilder* aBuilder, const InitData& aInitData, nsIFrame* aCellFrame);
|
nsDisplayTableBackgroundImage(const InitData& aInitData, nsIFrame* aCellFrame);
|
||||||
|
|
||||||
virtual uint32_t GetPerFrameKey() const override {
|
virtual uint32_t GetPerFrameKey() const override {
|
||||||
return (mLayer << (TYPE_BITS + static_cast<uint8_t>(TableTypeBits::COUNT))) |
|
return (mLayer << (TYPE_BITS + static_cast<uint8_t>(TableTypeBits::COUNT))) |
|
||||||
|
@ -4991,11 +4952,6 @@ public:
|
||||||
aFrames->AppendElements(mMergedFrames);
|
aFrames->AppendElements(mMergedFrames);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool HasMergedFrames() const override
|
|
||||||
{
|
|
||||||
return !mMergedFrames.IsEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) override
|
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -5148,7 +5104,7 @@ public:
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayOpacity);
|
MOZ_COUNT_CTOR(nsDisplayOpacity);
|
||||||
return MakeDisplayItem<nsDisplayOpacity>(aBuilder, *this);
|
return new (aBuilder) nsDisplayOpacity(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -5228,7 +5184,7 @@ public:
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayBlendMode);
|
MOZ_COUNT_CTOR(nsDisplayBlendMode);
|
||||||
return MakeDisplayItem<nsDisplayBlendMode>(aBuilder, *this);
|
return new (aBuilder) nsDisplayBlendMode(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -5292,7 +5248,7 @@ public:
|
||||||
|
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayTableBlendMode>(aBuilder, *this);
|
return new (aBuilder) nsDisplayTableBlendMode(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsIFrame* FrameForInvalidation() const override { return mAncestorFrame; }
|
virtual nsIFrame* FrameForInvalidation() const override { return mAncestorFrame; }
|
||||||
|
@ -5329,7 +5285,7 @@ public:
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayBlendContainer);
|
MOZ_COUNT_CTOR(nsDisplayBlendContainer);
|
||||||
return MakeDisplayItem<nsDisplayBlendContainer>(aBuilder, *this);
|
return new (aBuilder) nsDisplayBlendContainer(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -5388,7 +5344,7 @@ public:
|
||||||
|
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayTableBlendContainer>(aBuilder, *this);
|
return new (aBuilder) nsDisplayTableBlendContainer(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsIFrame* FrameForInvalidation() const override { return mAncestorFrame; }
|
virtual nsIFrame* FrameForInvalidation() const override { return mAncestorFrame; }
|
||||||
|
@ -5626,7 +5582,7 @@ public:
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayStickyPosition);
|
MOZ_COUNT_CTOR(nsDisplayStickyPosition);
|
||||||
return MakeDisplayItem<nsDisplayStickyPosition>(aBuilder, *this);
|
return new (aBuilder) nsDisplayStickyPosition(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -5680,7 +5636,7 @@ public:
|
||||||
|
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayFixedPosition>(aBuilder, *this);
|
return new (aBuilder) nsDisplayFixedPosition(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||||
|
@ -5738,7 +5694,7 @@ public:
|
||||||
|
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
return MakeDisplayItem<nsDisplayTableFixedPosition>(aBuilder, *this);
|
return new (aBuilder) nsDisplayTableFixedPosition(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsIFrame* FrameForInvalidation() const override { return mAncestorFrame; }
|
virtual nsIFrame* FrameForInvalidation() const override { return mAncestorFrame; }
|
||||||
|
@ -5762,6 +5718,7 @@ protected:
|
||||||
, mTableType(aOther.mTableType)
|
, mTableType(aOther.mTableType)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
nsIFrame* mAncestorFrame;
|
nsIFrame* mAncestorFrame;
|
||||||
TableType mTableType;
|
TableType mTableType;
|
||||||
};
|
};
|
||||||
|
@ -5942,7 +5899,7 @@ public:
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayMask);
|
MOZ_COUNT_CTOR(nsDisplayMask);
|
||||||
return MakeDisplayItem<nsDisplayMask>(aBuilder, *this);
|
return new (aBuilder) nsDisplayMask(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_DISPLAY_DECL_NAME("Mask", TYPE_MASK)
|
NS_DISPLAY_DECL_NAME("Mask", TYPE_MASK)
|
||||||
|
@ -6031,7 +5988,7 @@ public:
|
||||||
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
virtual nsDisplayWrapList* Clone(nsDisplayListBuilder* aBuilder) const override
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsDisplayFilter);
|
MOZ_COUNT_CTOR(nsDisplayFilter);
|
||||||
return MakeDisplayItem<nsDisplayFilter>(aBuilder, *this);
|
return new (aBuilder) nsDisplayFilter(aBuilder, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_DISPLAY_DECL_NAME("Filter", TYPE_FILTER)
|
NS_DISPLAY_DECL_NAME("Filter", TYPE_FILTER)
|
||||||
|
|
|
@ -260,7 +260,7 @@ SVGGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
DisplayOutline(aBuilder, aLists);
|
DisplayOutline(aBuilder, aLists);
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplaySVGGeometry>(aBuilder, this));
|
new (aBuilder) nsDisplaySVGGeometry(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -3204,7 +3204,7 @@ SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
}
|
}
|
||||||
DisplayOutline(aBuilder, aLists);
|
DisplayOutline(aBuilder, aLists);
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplaySVGText>(aBuilder, this));
|
new (aBuilder) nsDisplaySVGText(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
|
|
@ -786,10 +786,10 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayListSet set(&newList, &newList, &newList,
|
nsDisplayListSet set(&newList, &newList, &newList,
|
||||||
&newList, &newList, &newList);
|
&newList, &newList, &newList);
|
||||||
BuildDisplayListForNonBlockChildren(aBuilder, set);
|
BuildDisplayListForNonBlockChildren(aBuilder, set);
|
||||||
aLists.Content()->AppendToTop(MakeDisplayItem<nsDisplaySVGWrapper>(aBuilder, this, &newList));
|
aLists.Content()->AppendToTop(new (aBuilder) nsDisplaySVGWrapper(aBuilder, this, &newList));
|
||||||
} else if (IsVisibleForPainting(aBuilder) || !aBuilder->IsForPainting()) {
|
} else if (IsVisibleForPainting(aBuilder) || !aBuilder->IsForPainting()) {
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayOuterSVG>(aBuilder, this));
|
new (aBuilder) nsDisplayOuterSVG(aBuilder, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -391,7 +391,8 @@ nsTableCellFrame::ProcessBorders(nsTableFrame* aFrame,
|
||||||
|
|
||||||
if (!GetContentEmpty() ||
|
if (!GetContentEmpty() ||
|
||||||
StyleTableBorder()->mEmptyCells == NS_STYLE_TABLE_EMPTY_CELLS_SHOW) {
|
StyleTableBorder()->mEmptyCells == NS_STYLE_TABLE_EMPTY_CELLS_SHOW) {
|
||||||
aLists.BorderBackground()->AppendToTop(MakeDisplayItem<nsDisplayBorder>(aBuilder, this));
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
|
nsDisplayBorder(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -495,7 +496,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
bool hasBoxShadow = !!StyleEffects()->mBoxShadow;
|
bool hasBoxShadow = !!StyleEffects()->mBoxShadow;
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBoxShadowOuter>(aBuilder, this));
|
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// display background if we need to.
|
// display background if we need to.
|
||||||
|
@ -511,7 +512,7 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
// display inset box-shadows if we need to.
|
// display inset box-shadows if we need to.
|
||||||
if (hasBoxShadow) {
|
if (hasBoxShadow) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBoxShadowInner>(aBuilder, this));
|
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// display borders if we need to
|
// display borders if we need to
|
||||||
|
@ -519,8 +520,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// and display the selection border if we need to
|
// and display the selection border if we need to
|
||||||
if (IsSelected()) {
|
if (IsSelected()) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayTableCellSelection>(aBuilder, this));
|
nsDisplayTableCellSelection(aBuilder, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1533,7 +1533,7 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
||||||
// Paint the outset box-shadows for the table frames
|
// Paint the outset box-shadows for the table frames
|
||||||
if (aFrame->StyleEffects()->mBoxShadow) {
|
if (aFrame->StyleEffects()->mBoxShadow) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBoxShadowOuter>(aBuilder, aFrame));
|
new (aBuilder) nsDisplayBoxShadowOuter(aBuilder, aFrame));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1601,7 +1601,7 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
||||||
// Paint the inset box-shadows for the table frames
|
// Paint the inset box-shadows for the table frames
|
||||||
if (aFrame->StyleEffects()->mBoxShadow) {
|
if (aFrame->StyleEffects()->mBoxShadow) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBoxShadowInner>(aBuilder, aFrame));
|
new (aBuilder) nsDisplayBoxShadowInner(aBuilder, aFrame));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1616,13 +1616,13 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
|
||||||
if (table->IsBorderCollapse()) {
|
if (table->IsBorderCollapse()) {
|
||||||
if (table->HasBCBorders()) {
|
if (table->HasBCBorders()) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayTableBorderCollapse>(aBuilder, table));
|
new (aBuilder) nsDisplayTableBorderCollapse(aBuilder, table));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const nsStyleBorder* borderStyle = aFrame->StyleBorder();
|
const nsStyleBorder* borderStyle = aFrame->StyleBorder();
|
||||||
if (borderStyle->HasBorder()) {
|
if (borderStyle->HasBorder()) {
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayBorder>(aBuilder, table));
|
new (aBuilder) nsDisplayBorder(aBuilder, table));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1348,11 +1348,11 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
#ifdef DEBUG_LAYOUT
|
#ifdef DEBUG_LAYOUT
|
||||||
if (mState & NS_STATE_CURRENTLY_IN_DEBUG) {
|
if (mState & NS_STATE_CURRENTLY_IN_DEBUG) {
|
||||||
destination.BorderBackground()->AppendToTop(
|
destination.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayGeneric>(aBuilder, this, PaintXULDebugBackground,
|
nsDisplayGeneric(aBuilder, this, PaintXULDebugBackground,
|
||||||
"XULDebugBackground"));
|
"XULDebugBackground"));
|
||||||
destination.Outlines()->AppendToTop(
|
destination.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayXULDebug>(aBuilder, this));
|
nsDisplayXULDebug(aBuilder, this));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1384,11 +1384,11 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
DisplayListClipState::AutoSaveRestore ownLayerClipState(aBuilder);
|
DisplayListClipState::AutoSaveRestore ownLayerClipState(aBuilder);
|
||||||
|
|
||||||
// Wrap the list to make it its own layer
|
// Wrap the list to make it its own layer
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayOwnLayer>(aBuilder, this, &masterList, ownLayerASR,
|
nsDisplayOwnLayer(aBuilder, this, &masterList, ownLayerASR,
|
||||||
nsDisplayOwnLayerFlags::eNone,
|
nsDisplayOwnLayerFlags::eNone,
|
||||||
mozilla::layers::FrameMetrics::NULL_SCROLL_ID,
|
mozilla::layers::FrameMetrics::NULL_SCROLL_ID,
|
||||||
mozilla::layers::ScrollThumbData{}, true, true));
|
mozilla::layers::ScrollThumbData{}, true, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2086,13 +2086,14 @@ public:
|
||||||
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
nsDisplayList* aList) override {
|
nsDisplayList* aList) override {
|
||||||
return MakeDisplayItem<nsDisplayXULEventRedirector>(aBuilder, aFrame, aList,
|
return new (aBuilder)
|
||||||
mTargetFrame);
|
nsDisplayXULEventRedirector(aBuilder, aFrame, aList, mTargetFrame);
|
||||||
}
|
}
|
||||||
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayItem* aItem) override {
|
nsDisplayItem* aItem) override {
|
||||||
return MakeDisplayItem<nsDisplayXULEventRedirector>(aBuilder, aItem->Frame(), aItem,
|
return new (aBuilder)
|
||||||
mTargetFrame);
|
nsDisplayXULEventRedirector(aBuilder, aItem->Frame(), aItem,
|
||||||
|
mTargetFrame);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
nsIFrame* mTargetFrame;
|
nsIFrame* mTargetFrame;
|
||||||
|
|
|
@ -153,8 +153,8 @@ nsGroupBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||||
aBuilder, this, GetBackgroundRectRelativeToSelf(),
|
aBuilder, this, GetBackgroundRectRelativeToSelf(),
|
||||||
aLists.BorderBackground());
|
aLists.BorderBackground());
|
||||||
aLists.BorderBackground()->AppendToTop(
|
aLists.BorderBackground()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayXULGroupBorder>(aBuilder, this));
|
nsDisplayXULGroupBorder(aBuilder, this));
|
||||||
|
|
||||||
DisplayOutline(aBuilder, aLists);
|
DisplayOutline(aBuilder, aLists);
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,7 +342,7 @@ nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
nsDisplayList list;
|
nsDisplayList list;
|
||||||
list.AppendToTop(
|
list.AppendToTop(
|
||||||
MakeDisplayItem<nsDisplayXULImage>(aBuilder, this));
|
new (aBuilder) nsDisplayXULImage(aBuilder, this));
|
||||||
|
|
||||||
CreateOwnLayerIfNeeded(aBuilder, &list);
|
CreateOwnLayerIfNeeded(aBuilder, &list);
|
||||||
|
|
||||||
|
|
|
@ -112,8 +112,8 @@ nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (!aBuilder->IsForEventDelivery() || !IsVisibleForPainting(aBuilder))
|
if (!aBuilder->IsForEventDelivery() || !IsVisibleForPainting(aBuilder))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayEventReceiver>(aBuilder, this));
|
nsDisplayEventReceiver(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ nscoord
|
/* virtual */ nscoord
|
||||||
|
|
|
@ -326,8 +326,8 @@ nsSliderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (aBuilder->IsForEventDelivery() && isDraggingThumb()) {
|
if (aBuilder->IsForEventDelivery() && isDraggingThumb()) {
|
||||||
// This is EVIL, we shouldn't be messing with event delivery just to get
|
// This is EVIL, we shouldn't be messing with event delivery just to get
|
||||||
// thumb mouse drag events to arrive at the slider!
|
// thumb mouse drag events to arrive at the slider!
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayEventReceiver>(aBuilder, this));
|
nsDisplayEventReceiver(aBuilder, this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,16 +458,16 @@ nsSliderFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
// Wrap the list to make it its own layer.
|
// Wrap the list to make it its own layer.
|
||||||
const ActiveScrolledRoot* ownLayerASR = contASRTracker.GetContainerASR();
|
const ActiveScrolledRoot* ownLayerASR = contASRTracker.GetContainerASR();
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayOwnLayer>(aBuilder, this, &masterList, ownLayerASR,
|
nsDisplayOwnLayer(aBuilder, this, &masterList, ownLayerASR,
|
||||||
flags, scrollTargetId,
|
flags, scrollTargetId,
|
||||||
ScrollThumbData{scrollDirection,
|
ScrollThumbData{scrollDirection,
|
||||||
GetThumbRatio(),
|
GetThumbRatio(),
|
||||||
thumbStart,
|
thumbStart,
|
||||||
thumbLength,
|
thumbLength,
|
||||||
isAsyncDraggable,
|
isAsyncDraggable,
|
||||||
sliderTrackStart,
|
sliderTrackStart,
|
||||||
sliderTrackLength}));
|
sliderTrackLength}));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -384,8 +384,8 @@ nsSplitterFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (mInner->mDragging && aBuilder->IsForEventDelivery())
|
if (mInner->mDragging && aBuilder->IsForEventDelivery())
|
||||||
{
|
{
|
||||||
// XXX It's probably better not to check visibility here, right?
|
// XXX It's probably better not to check visibility here, right?
|
||||||
aLists.Outlines()->AppendToTop(
|
aLists.Outlines()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayEventReceiver>(aBuilder, this));
|
nsDisplayEventReceiver(aBuilder, this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,8 +373,8 @@ nsTextBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
|
nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayXULTextBox>(aBuilder, this));
|
nsDisplayXULTextBox(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -2845,7 +2845,7 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
if (!mView || !GetContent ()->GetComposedDoc()->GetWindow())
|
if (!mView || !GetContent ()->GetComposedDoc()->GetWindow())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsDisplayItem* item = MakeDisplayItem<nsDisplayTreeBody>(aBuilder, this);
|
nsDisplayItem* item = new (aBuilder) nsDisplayTreeBody(aBuilder, this);
|
||||||
aLists.Content()->AppendToTop(item);
|
aLists.Content()->AppendToTop(item);
|
||||||
|
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
|
|
|
@ -126,8 +126,8 @@ nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
|
||||||
|
|
||||||
WrapListsInRedirector(aBuilder, set, aLists);
|
WrapListsInRedirector(aBuilder, set, aLists);
|
||||||
|
|
||||||
aLists.Content()->AppendToTop(
|
aLists.Content()->AppendToTop(new (aBuilder)
|
||||||
MakeDisplayItem<nsDisplayXULTreeColSplitterTarget>(aBuilder, this));
|
nsDisplayXULTreeColSplitterTarget(aBuilder, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
|
Загрузка…
Ссылка в новой задаче