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

@@ -1187,9 +1187,9 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// determine if we are printing
if (type == nsPresContext::eContext_Print) {
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayGeneric(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
DisplayItemType::TYPE_PRINT_PLUGIN));
aLists.Content()->AppendToTop(
MakeDisplayItem<nsDisplayGeneric>(aBuilder, this, PaintPrintPlugin, "PrintPlugin",
DisplayItemType::TYPE_PRINT_PLUGIN));
} else {
LayerState state = GetLayerState(aBuilder, nullptr);
if (state == LAYER_INACTIVE &&
@@ -1199,12 +1199,12 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (aBuilder->IsPaintingToWindow() &&
state == LAYER_ACTIVE &&
IsTransparentMode()) {
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayPluginReadback(aBuilder, this));
aLists.Content()->AppendToTop(
MakeDisplayItem<nsDisplayPluginReadback>(aBuilder, this));
}
aLists.Content()->AppendToTop(new (aBuilder)
nsDisplayPlugin(aBuilder, this));
aLists.Content()->AppendToTop(
MakeDisplayItem<nsDisplayPlugin>(aBuilder, this));
}
}