On Mar 31, 1:50 am, Eli Friedman <[EMAIL PROTECTED]> wrote:
> krithika wrote:
> > On Mar 30, 4:31 pm, Eli Friedman <[EMAIL PROTECTED]> wrote:
> >> krithika wrote:
> >>> for (nsIFrame* page = mFrames.FirstChild(); page; page = page-
> >>>> GetNextSibling())
> >>> {
> >>> nsPageFrame * pf = NS_STATIC_CAST(nsPageFrame*, page);
> >>> nsIFrame* contentFrame = pf->GetFirstChild(nsnull);
> >>> nsPageContentFrame* contentPage =
> >>> NS_STATIC_CAST(nsPageContentFrame*, contentFrame);
> >>> nsIFrame* firstPageElem= contentPage-
> >>>> GetFirstChild(nsnull);
> >>> nsIContent* cont = firstPageElem->GetContent();
> >>> ...
> >>> //process Content to get page start element and end element
> >>> details
> >>> }
> >> Hmm, I'm assuming mFrames is the child frame list for nsSimplePageSequence.
>
> >> In a normal situation (without any fixed-position elements), the only
> >> direct child of a page content frame is going to be a continuation of
> >> the frame associated with the root content node, since all the content
> >> in a document is a child of the root content node. If you're interested
> >> in where paragraphs and stuff split in an HTML document, you're going to
> >> have to go down deeper into the frame tree.
>
> >> -Eli
>
> > I tried mFrames , but is protected. Can this be accessed from
> > somewhere.?
>
> > How do I iterate frame tree?
>
> > Will it give me the indication of where page breaks?
>
> > Iam lost again.
>
> > thanks & regards,
> > Krithika
>
> The normal way to navigate the frame tree is to use
> GetFirstChild(nsnull) to get the primary child, then GetNextSibling() to
> iterate over the list of children (sibling frames are in a singly-linked
> list), not attempting to directly access other frames' frame list.
>
> -Eli
Hi,
After I get AreaFrame from nsPageContentFrame Iam unable to iterate it
through.GetNextSibling always returns null.
How do I proceed in this case?
regards,
Krithika
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout