[patch] Attr values as Text nodes
David Faure
faure at kde.org
Tue Mar 25 11:22:23 GMT 2008
On Saturday 22 March 2008, Harri Porten wrote:
> Hi!
>
> A comment in the AttrImpl::setValue() function suggested to create a text
> child node for the value - as suggested by the DOM spec. I don't have know
> what the spec'ed behavior for the initial Attr node would be. But it makes
> sense that the value should be represented as a text node right away. Test
> 10 of Acid 3 expects this too and it makes some sense.
>
> The attached patch makes the Attr node have a text child node right away.
> Could be done lazily? Dunno.
Well, it sounds like a large increase in memory consumption, if done unconditionally, no?
One element can have many attributes, so if no (JS or C++ DOM) code is looking for that node
it seems a bit overkill. On the other hand I'm not sure when/where it could be created lazily.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kfm-devel
mailing list