Bug 564991. Part 3: Create unique nsDisplayItem types for every single display item. r=tnikkel

This commit is contained in:
Michael Ventnor
2010-07-16 09:07:49 +12:00
parent 2b99a4f71b
commit c40f8edbb0
41 changed files with 336 additions and 193 deletions

View File

@@ -1141,7 +1141,7 @@ public:
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx);
NS_DISPLAY_DECL_NAME("Image")
NS_DISPLAY_DECL_NAME("Image", TYPE_IMAGE)
private:
nsCOMPtr<imgIContainer> mImage;
};
@@ -1235,7 +1235,8 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// No image yet, or image load failed. Draw the alt-text and an icon
// indicating the status
rv = aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayGeneric(this, PaintAltFeedback, "AltFeedback"));
nsDisplayGeneric(this, PaintAltFeedback, "AltFeedback",
nsDisplayItem::TYPE_ALT_FEEDBACK));
NS_ENSURE_SUCCESS(rv, rv);
}
else {
@@ -1253,7 +1254,8 @@ nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
#ifdef DEBUG
if (GetShowFrameBorders() && GetImageMap(PresContext())) {
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
nsDisplayGeneric(this, PaintDebugImageMap, "DebugImageMap"));
nsDisplayGeneric(this, PaintDebugImageMap, "DebugImageMap",
nsDisplayItem::TYPE_DEBUG_IMAGE_MAP));
NS_ENSURE_SUCCESS(rv, rv);
}
#endif