PATCH - Add offset* methods to HTMLElement API

Leo Savernik l.savernik at aon.at
Wed Jan 12 15:01:43 GMT 2005


Am Mittwoch, 12. Januar 2005 13:50 schrieb Jason Keirstead:
> > HTML is wrong. Every node has an offset, be it an HTML node, an XML node,
> > or some other yet-to-be-invented node. So the information must be
> > provided on a general level.
>
> No it doesnt.. An XML node has no offset because it hasn't been rendered.

What??? You're trying to tell me that khtml can't render XML nodes? khtml is 
capable to render xml+css since 2.1. So xml nodes definitely have offsets.
>
> All these properties are based on the rendered location of the node.. an
> XML node is not "rendered", per say. It is the HTML node that is rendered.
> The XML DOM never has properties in it relating to rendering.

The HTML DOM doesn't either. These are extensions to khtml, and we're free to 
introduce them whenever and on whatever stage we see fit.

>
> For example - what is the offsetTop of an XML DOM Node, that is in a
>  Document object that is not being rendered, but rather, transformed via
> XSL?

Put differently, what's the offset of <div 
style="display:none">whatever</div>?

What's the offset of <head>?

What's the offset of <link>?

etc.

All of them are HTML-elements, but aren't displayed.

mfg
 Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050112/05770e4a/attachment.sig>


More information about the kfm-devel mailing list