Bug 772679. Handle frame with NS_HAS_CONTAINER_LAYER having no display items. r=tnikkel

This commit is contained in:
Robert O'Callahan 2012-08-05 20:59:06 +12:00
parent 3e481d5793
commit 9022336c2e

View File

@ -2528,7 +2528,10 @@ FrameLayerBuilder::GetThebesLayerScaleForFrame(nsIFrame* aFrame)
last = f;
if (f->GetStateBits() & NS_FRAME_HAS_CONTAINER_LAYER) {
nsTArray<DisplayItemData>* array = GetDisplayItemDataArrayForFrame(f);
NS_ASSERTION(array, "Must have display item data for container");
// Some frames with NS_FRAME_HAS_CONTAINER_LAYER may not have display items.
// In particular the root frame probably doesn't!
if (!array)
continue;
for (PRUint32 i = 0; i < array->Length(); ++i) {
Layer* layer = array->ElementAt(i).mLayer;
ContainerLayer* container = layer->AsContainerLayer();