On Tuesday 15 August 2006 01:38, Ben Hutchings wrote:

> You can iterate over elements with standard W3C DOM interfaces, so I
> shan't describe that bit.  Then you need to get the nsIDOMNSDocument
> interface (Mozilla extension) for the document and call
> nsIDOMNSDocument::GetBoxObjectFor(nsIDOMElement *, nsIBoxObject **)
> to get a "box object" for the element.  Then call methods on that
> to get the position and size.  The size can be 0 if the element is
> not displayed for some reason.

There is a limitation of nsIBoxObject. You can't recognize if one element
is rendered by several nsIFrames. This is needed e.g. for painting an
absolutely-positioned <DIV> overlay over the chosen element.

An example of such element is a new-line wrapped <A> link. 
One such example can be on www.eclipse.org.  Load the page in 
DOM inspector and with "Select Element by Click" arrow 
choose a link from the news box.

Is there a way to obtain this information over some IDL interface ?
(i.e. accessible from javascript)

best regards,
Michal
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to