W3C home > Mailing lists > Public > public-html@w3.org > April 2009

Re: Flushing trailing text in document.write()

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 29 Apr 2009 09:28:33 -0700
Cc: HTML WG <public-html@w3.org>
Message-Id: <93F9589E-4792-43F3-A33D-0EAA263DFC01@iki.fi>
To: Ian Hickson <ian@hixie.ch>
On Apr 26, 2009, at 15:47, Ian Hickson wrote:

> It's possible to have a text accumulation buffer in the tree builder
> without needing to flush it; just use the current text node's own  
> buffer.
> (I believe this gets you the Firefox behaviour pretty cheaply.)

But you want IE behavior, not Firefox behavior. :-)

Also, using the node's buffer leads to a conflict between buffer  
growth strategies that make minimize branches and reallocs for a tree  
builder buffer and strategies that keep the memory footprint of the  
DOM nodes compact.

>> In any case, the implementation requirements aren't obvious from the
>> spec text. Even if the specced behavior stays as is, it would be  
>> good to
>> draw attention to the implications in this case.
>
> Could you elaborate on how it's not obvious?

The interactions of various rules aren't obvious, because I  
misunderstood the spec. :-) I've been developing software according to  
the parsing section for a whine now, and the design I came up with  
independently matched the WebKit/Opera design, because I didn't  
realize you had actually written spec text that taken as a whole has  
enough constraints to happen to mean the IE behavior. (When starting  
this thread, I thought the spec wanted the Firefox behavior.) Please  
call out the implications in this case explicitly using examples. (On  
IRC, it wasn't even obvious to you that the Firefox and IE behaviors  
were distinct.)

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 29 April 2009 16:29:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:34 GMT