Docshell For frames indise a Frameset

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

Docshell For frames indise a Frameset

ramsrule
Hi,

How does the gecko layout a page having frameset. Will each Frame inside the
frameset have its own DocShell and PresShell. If so how can I reach those
interfaces. I need the corresponding Layout Object for an HTMLElement which
is inside the underlying frame of a page havign a frameset.

I dont have a problem when the page doesnt have a frameset. In that case I
am getting the DocShell Interface from the WebBrowser Interface and from
there the PresShell. I am using the PresShell to get the corresponding
Layout object for an HTML Element.

Any Help is appreciated.

thanks
Kantha Kanchiraju


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

Re: Docshell For frames indise a Frameset

Boris Zbarsky
kantha Kanchiraju wrote:
> How does the gecko layout a page having frameset. Will each Frame inside the
> frameset have its own DocShell and PresShell.

Yes to both.

> If so how can I reach those interfaces.

 From where?  Generally speaking, you can get the docshell from the window.

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

Re: Docshell For frames indise a Frameset

ramsrule
thanks for the reply.

I have a Application in silimar lines to the MFCEmbed sample. In this
application I need access to the PresShell. I am using the
GetPrimaryFrameFor method on the PresShell to get the nsIFrame for the
HTMLAnchorElements and from there some info regarding the element.
In a general Document I am getting the DocShell interface from the
WebBrowser instance and from there PresShell and nsIFrame. When there is a
FrameSet I am still getting the DocShell and PresShell for the Main
Document. I am not sure how to get these interfaces for the underlying
frames.

when You said I can get Docshell from the window, you meant nsIWindow or
nsIDOMWindow or in general Browser Window?

thanks
Kanth
"Boris Zbarsky" <[hidden email]> wrote in message
news:[hidden email]...
> kantha Kanchiraju wrote:
> > How does the gecko layout a page having frameset. Will each Frame inside
the
> > frameset have its own DocShell and PresShell.
>
> Yes to both.
>
> > If so how can I reach those interfaces.
>
>  From where?  Generally speaking, you can get the docshell from the
window.
>
> -Boris


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

Re: Docshell For frames indise a Frameset

Boris Zbarsky
kantha Kanchiraju wrote:
> when You said I can get Docshell from the window, you meant nsIWindow or
> nsIDOMWindow or in general Browser Window?

nsIDOMWindow.

In general, you can get the presshell from the nsIDocument that the anchor
element lives in, no?

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