On Apr 11, 9:41 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Thank you.  When firefox first load an image, it first draw a 'broken
> > image' icon and then alt text of the image.
> > Then after the image loaded, it repainted it with the real image.
>
> > Can you please tell me what method trigger when the image is loaded
> > and causes a repaint?
>
> If we're talking about HTML <img> tags, there's the code that sends state 
> change
> notifications in nsImageLoadingContent.  Those trigger a frame reconstruct, 
> etc.
>
> -Boris

Boris,

Thank you.

I tried and comment out the notification in the OnStartContainer().  I
see the cnn main story image, cnn logo image do not get repaint.
But there are still images get repaint.  Can you please tell what are
the other notifications to repaint image?

NS_IMETHODIMP
nsImageLoadingContent::OnStartContainer(imgIRequest* aRequest,
                                        imgIContainer* aContainer)
{

  // Do not paint cnn main images
  // LOOP_OVER_OBSERVERS(OnStartContainer(aRequest, aContainer));
  return NS_OK;
}

NS_IMETHODIMP
nsImageLoadingContent::OnStartFrame(imgIRequest* aRequest,
                                    gfxIImageFrame* aFrame)
{
//  LOOP_OVER_OBSERVERS(OnStartFrame(aRequest, aFrame));
  return NS_OK;
}

Thank you.
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to