On Apr 20, 2:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Apr 18, 11:12 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
>
> > [EMAIL PROTECTED] wrote:
> > > Can you please help me understand how nsImageLoader::Load() work?
>
> > The first thing to understand is that this method no longer does any
> > loading.  It just takes an existing handle to an image request and sets
> > up a clone with a different listener to be notified as the load
> > proceeds.  The actual load is done elsewhere, typically by calling
> > imgILoader::Load via nsContentUtils::LoadImage.
>
> > -Boris
>
> Thank you for your help.
>
> From the debugger, i see when an image finished loading, it will
> trigger a RestyleEvent in CSS.
>
> Can you please tell me where is the code which puts the RestyleEvent
> in the event queue? Which causes the RestyleEvent in
> nsCSSFrameConstructor to be exectued?

I think the most difficult part of Mozilla code for a new comer to
understand is just like your question "why does this function
execute?".
Mozilla source doe use many patterns of listener/observer and written
following the principle of "programming following interfaces".
Just a few words of my own feelings of the code. Happy hacking!

Regards!
Bo
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to