PATCH - Add offset* methods to HTMLElement API

Jason Keirstead jason at keirstead.org
Wed Jan 12 15:19:15 GMT 2005


On Wednesday 12 January 2005 11:01 am, Leo Savernik wrote:
> 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.

Ok... I think we are thinking about this differently. It has nothing to do 
with whether or not KHTML can render an XML node, it has to do with the fact 
that the rendering of a node, and the node object itself, are two different 
concepts. 

The XML DOM is not supposed to be tied to the renderer in any way, since it 
can exist independant of any render at all. As such, the XML DOM shouldn't 
have any methods like getRect() either.. getRect() depends on a rendered 
layout.. the DOM has nothing at all to do with rendering. 

However, after further inspection of the KHTML API and it's internals, I can 
see that the KHTML XML DOM is indeed tired very closely to the renderer in 
how it's methods behave (read: I do not believe you can use the KHTML DOM 
independant of a KHTMLPart?). While I do question why this was done somewhat, 
I withdraw my objection to having the method in the XML DOM impl, since as 
currently implimented, an XML DOM node will always be rendered.

But I won't be adding the methods anymore since I can use getRect(), so it 
doesn't matter a whole lot.

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

... But they are still rendered by the HTML rendering engine. They just do not 
cause any painting.


-- 
If you wait by the river long enough, eventually
you will see the bodies of all your enemies float by.
    - Sun Tzu




More information about the kfm-devel mailing list