sizes += AccumulateImageSizes(aPresContext, *child, dummy);
sizes += AccumulateImageSizes(aPresContext, *child);
static nscoord AccumulateImageSizes(nsIPresContext& aPresContext, nsIFrame& aFrame, PRBool& inChild){  nscoord sizes = 0;  // see if aFrame is an image frame first  nsCOMPtr<nsIAtom> type;  aFrame.GetFrameType(getter_AddRefs(type));  if(type.get() == nsLayoutAtoms::imageFrame) {    nsSize size;    aFrame.GetSize(size);    sizes += NS_STATIC_CAST(nscoord,size.width);  } else {    // see if there are children to process    nsIFrame* child = nsnull;    // XXX: process alternate child lists?    aFrame.FirstChild(&aPresContext,nsnull,&child);    while(child) {      PRBool dummy;      inChild = PR_TRUE;      // recurse: note that we already know we are in a child frame, so no need to track further      sizes += AccumulateImageSizes(aPresContext, *child, dummy);      // now next sibling      child->GetNextSibling(&child);    }  }  return sizes;}