observer->FrameChanged(container, nsnull, container->mFrame, &dirtyRect);
observer->FrameChanged(container, container->mFrame, &dirtyRect);
il_mng_refresh(mng_handle handle,	       mng_uint32 left, mng_uint32 top,	       mng_uint32 width, mng_uint32 height){  EXTRACT_CONTAINER;  PRUint32 bpr, abpr;  container->mFrame->GetImageBytesPerRow(&bpr);  container->mFrame->GetAlphaBytesPerRow(&abpr);// stupid Mac code that shouldn't be in the image decoders...#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON)  PRInt32 iwidth;  container->mFrame->GetWidth(&iwidth);  PRUint8 *buf = (PRUint8 *)nsMemory::Alloc(bpr);#endif  for (mng_uint32 y=top; y<top+height; y++) {    if (container->alpha)      container->mFrame->SetAlphaData(container->alpha +                           y*container->mByteWidthAlpha,                          container->mByteWidthAlpha,                          abpr*y);#if defined(XP_MAC) || defined(XP_MACOSX)    PRUint8 *cptr = buf;    PRUint8 *row = container->image+y*container->mByteWidth;    for (PRUint32 x=0; x<iwidth; x++) {      *cptr++ = 0;      *cptr++ = *row++;      *cptr++ = *row++;      *cptr++ = *row++;    }    container->mFrame->SetImageData(buf, bpr, bpr*y);#elif defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON)    PRUint8 *cptr = buf;    PRUint8 *row = container->image+y*container->mByteWidth;    for (PRUint32 x=0; x<iwidth; x++) {      *cptr++ = row[2];      *cptr++ = row[1];      *cptr++ = row[0];      row += 3;    }    container->mFrame->SetImageData(buf, bpr, bpr*y);#else    container->mFrame->SetImageData(container->image + 			 y*container->mByteWidth,			 container->mByteWidth,			 bpr*y);#endif  }#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_PC) || defined(XP_BEOS) || defined(MOZ_WIDGET_PHOTON)  nsMemory::Free(buf);#endif  nsRect r(left, top, width, height);  nsCOMPtr<imgIDecoderObserver>    ob(do_QueryReferent(container->mObserver));  if (ob)    ob->OnDataAvailable(nsnull, nsnull, container->mFrame, &r);  nsCOMPtr<imgIContainerObserver>     observer(do_QueryReferent(container->mObserver));  if (observer) {    nsRect dirtyRect;    container->mFrame->GetRect(dirtyRect);    // do notification to FE to draw this frame    observer->FrameChanged(container, nsnull, container->mFrame, &dirtyRect);  }  return MNG_TRUE;}