Bug 1436904 - Part 1: Add a static constructor function for display items. r=Bas

This commit is contained in:
Matt Woodrow
2018-02-13 13:43:28 +13:00
parent 79868f24c0
commit 2bcbca93c9
49 changed files with 248 additions and 232 deletions

View File

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