Frames and Views

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Frames and Views

Christian Biesinger
Hi,
I've got some questions about frames and views.

Firstly... It seems that the main way frames get views is via
nsHTMLContainerFrame::CreateViewForFrame, is that correct? And that's
usually called right after the frame is created, right? (why is that
method on nsHTMLContainerFrame? wouldn't a more generic class be better?)

When is reflow called in relation to that? At some unspecified time
later (off an event)? If a frame's Init method posts an event, would
that usually fire before or after Reflow has happened?

Do frames have an easy way of knowing whether they were already reflown
at least once?

Do views start out hidden or shown?

thanks,
-biesi
_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout
Reply | Threaded
Open this post in threaded view
|

Re: Frames and Views

Eli Friedman
Christian Biesinger wrote:
> Hi,
> I've got some questions about frames and views.
>
> Firstly... It seems that the main way frames get views is via
> nsHTMLContainerFrame::CreateViewForFrame, is that correct? And that's
> usually called right after the frame is created, right? (why is that
> method on nsHTMLContainerFrame? wouldn't a more generic class be better?)

All correct, as far as I know.  (including the parenthetical comments)

>
> When is reflow called in relation to that? At some unspecified time
> later (off an event)? If a frame's Init method posts an event, would
> that usually fire before or after Reflow has happened?
>

I'm not really familiar with that, so I can't give a good answer.

> Do frames have an easy way of knowing whether they were already reflown
> at least once?

NS_FRAME_FIRST_REFLOW flag.

>
> Do views start out hidden or shown?

There's a flag on nsIViewManager::CreateView which defaults to visible.

>
> thanks,
> -biesi

Hope that was helpful.
-Eli Friedman
_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout
Reply | Threaded
Open this post in threaded view
|

Re: Frames and Views

Boris Zbarsky
In reply to this post by Christian Biesinger
Christian Biesinger wrote:
> When is reflow called in relation to that? At some unspecified time
> later (off an event)? If a frame's Init method posts an event, would
> that usually fire before or after Reflow has happened?

Depends on ordering of things.  Assuming operation in a vacuum, the reflow
command (and hence reflow event) would be posted after the fully initialized
frame has been inserted into the frame tree.  As you might imagine, if several
frames are created and inserted into the tree in a row reflow will fire after an
event posted from the first one's Init, but before the events posted from the
later frames' Inits.

I think Eli answered the rest of the questions right on the money.

-Boris
_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout
Reply | Threaded
Open this post in threaded view
|

Re: Frames and Views

Robert O'Callahan-2
In reply to this post by Christian Biesinger
Keep in mind that this will all go away on trunk in the coming year.

Rob

_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout
Reply | Threaded
Open this post in threaded view
|

Re: Frames and Views

Christian Biesinger
In reply to this post by Christian Biesinger
Thanks for the replies!
_______________________________________________
mozilla-layout mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-layout