On Wednesday 2008-07-30 14:09 -0700, Jonathan wrote: > On Jul 30, 3:43 pm, Daniel Holbert <[EMAIL PROTECTED]> wrote: > > You want: > > nsGenericElement::GetPrimaryFrame() > > which is really just a wrapper around > > nsIPresShell::GetPrimaryFrameFor(nsIContent* aContent)
> But if I just have a pointer of 'nsIDOMNSHTMLElement*', how can I call > 'nsGenericElement::GetPrimaryFrame()'? > Do I use C++ static_cast to cast nsIDOMNSHTMLElement* to > nsGenericElement*? > Or do i do a query_interface? If yes, what interface i need to query > for? You need to QueryInterface to nsIContent (which is an internal, unstable interface) and call GetPrimaryFrameFor. -David -- L. David Baron http://dbaron.org/ Mozilla Corporation http://www.mozilla.com/ _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

