On Jul 30, 3:43 pm, Daniel Holbert <[EMAIL PROTECTED]> wrote:
> Jonathan wrote:
> >>> [2] Is there anyway to get the related DOM object from the frame
> >>> object?
> >> nsIFrame::GetContent() ?
> > Thank you.  Is there any way to get it the other way around?
> > Get the related frame object from a DOM element?
>
> You want:
>    nsGenericElement::GetPrimaryFrame()
> which is really just a wrapper around
>    nsIPresShell::GetPrimaryFrameFor(nsIContent* aContent)
>
> ~Daniel

Thank you.

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?

Thank you for your help again.

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

Reply via email to