Hi !
i'd like to see all frames a webPage can contains.
What i did in my "BrowserChrome::onStateChange method":
"....
   if ((progressStateFlags & STATE_STOP) && (progressStateFlags &
STATE_IS_DOCUMENT)) {
         nsCOMPtr<nsIDOMWindow> domWindow;
        nsCOMPtr<nsIDOMDocument> domDocument;
        nsiHtmlDocument htmlDocument = nsnull;
        progress->GetDOMWindow(getter_AddRefs(domWindow));
       domDocument->QueryInterface(NS_GET_IID(nsIHTMLDocument), (void **)
&htmlDocument);
       nsCOMPtr<nsIWebBrowser> domBrowser;
       GetWebBrowser(getter_AddRefs(domBrowser));
       nsCOMPtr<nsIDOMWindow>window;
       domBrowser->GetContentDOMWindow(getter_AddRefs(window));
       nsCOMPtr<nsIDOMDocument>domDoc;
       window->GetDocument(getter_AddRefs(domDoc));

       nsCOMPtr<nsIDocument>current_document = do_QueryInterface(domDoc);
       nsIFrame* root_frame;
       presShell_current->GetRootFrame(&root_frame);
       nsIAtom* aType;
       aType = aFrame->GetType();
      if (aType == nsLayoutAtoms::areaFrame) {
          ......
             there is no type matching...
      }
      nsIContent* contentFrame;
      contentFrame = aFrame->GetContent(); // here, the content is always
null !!
      nsIFrame *childFrame = nsnull;
     childFrame = aFrame->GetNextSibling();  //and childFrame is always null
!!

Please, could anyone tell me what's wrong ?

Thanks a lot !

B�atrice Philippe

[EMAIL PROTECTED]


_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to