Hi Eli,


I would like to know what structures and APIs are related with the coordinates of all focusable objects displayed on a HTML page rendered by the Mozilla layout engine. How easy is to map all the objects (links, images, iframes, forms, and so on) displayed to a customized data structure for handling and retrieve their position on the screen.
Can I retrieve these data using the DOM APIs? I mean, I know the objects of a page are "stored" on a DOM tree before they are displayed, but does this tree store graphical details about the objects?


http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/measuring.asp has all the ways of getting information like that from the DOM.

hummm ... this link sounds very helpful, I will investigate it in more details ;)


There is no way to retrieve the position of a piece of text in a paragraph through the DOM. That's all I can tell you without more information on what you are trying to do. I don't really see why you want the position of everything on the page.

Maybe, i did not expressed my doubt as I should :) What i wanna is :

1) After finish loading of html page, I wonder implement a method to tell me if the current focused element (with the focus rectangle around it) is above (up) or below (down), left or right in relation to the next focusable element (according with the tabIndex HTML parameter on webpage). I'm talking about:


WEB PAGE RENDERED (i'm not an artist, i know)
____________________________________________________
|| ||
|| OBJ_HAS_FOCUS ||
|| next_focusable_object ||
|| || || _________________________ || || |________________________| || || button1_focusable || || __ ||
|| |_| || ||___________________________________________________||


OBJ_HAS_FOCUS ---> x = 50, y= 10
next_focusable_obj -> x = 100, y= 30

I wanna know what struture stores and provides these graphical information about html elements.


If that doesn't answer your question, try posting on the MozillaZine forums: http://forums.mozillazine.org/index.php?c=7&sid=3df38feb3071b8731e594b1a68ed9448. The group you posted to is supposed to be for questions and comments about Mozilla development, not questions about using Mozilla.

ok I will try, but you can try advice me again :)

cheers

Ant�nio Gomes

--

"... but my whole life I've been writing my own tools for my own use. I'll survive 
..." (Torvalds, Linus)


_______________________________________________ mozilla-layout mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-layout

Reply via email to