newline handling changes to pass more W3C DOM Level 1 Core tests

David Hyatt hyatt at apple.com
Tue Oct 7 12:05:09 CEST 2003


That message is talking about the elimination of text nodes that 
contain only whitespace from the DOM.  That isn't what this patch is 
about though.  A better example than the one in that message would be:

<p>foo[newline]goo</p>

In the above case you need to preserve the newline, since you could 
come along later and say:

pElt.style.whiteSpace = 'pre';

and suddenly the newline will be significant.

dave

On Oct 7, 2003, at 10:25 AM, Darin Adler wrote:

> On Oct 7, 2003, at 9:03 AM, David Faure wrote:
>
>>> This change causes the newlines to be left as-is in the DOM.
>>
>> The whole question is whether we really want to do this. AFAIK (Dirk 
>> will correct me if I'm wrong) the KHTML behavior was done to map IE, 
>> whereas your changes tend to resemble more Mozilla.
>
> One more thought: Since this code is shared for both HTML and XML 
> handling, it seems like we'll have to do these changes at some point 
> to do the right thing for XML. But being compatible with IE seems like 
> a good strategy too.
>
>     -- Darin
>
> _______________________________________________
> Khtml-devel at mail.kde.org
> http://mail.kde.org/mailman/listinfo/khtml-devel



More information about the Khtml-devel mailing list