W3C home > Mailing lists > Public > www-style@w3.org > October 2005

Re: [css21] parsing of comment and element nodes inside style declaration

From: Stanimir Stamenkov <stanio@myrealbox.com>
Date: Mon, 17 Oct 2005 21:37:01 +0300
Message-ID: <4353EF4D.6020402@myrealbox.com>
CC: www-style@w3.org

/Ian Hickson/:
> On Sun, 16 Oct 2005, Stanimir Stamenkov wrote:
>> That's somewhat incompatible with the DOM Level 3 'Node.textContent' 
>> property. Is there a specific reason for this specification (WHATWG's 
>> WA1) not considering the text items/nodes which are not direct children 
>> of the 'style' element?
> It's (much) faster to crawl just the direct text children than to crawl 
> the entire tree. Since this is error handling behaviour, there is little 
> reason to go any way other than efficiency in this case.

I wonder how much faster it would be if the data is processed from a 
stream and the tree is going to be crawled anyway, at least to 
detect the well-formed end of the 'style' element (I didn't 
understand the "error handling behavior" part), or you point the 
text content for the style sheet is processed only from already 
built DOM nodes?

IMO, the 'textContent' property being property implies (to some 
possible extent) the DOM implementation would optimize the storage 
of the represented value, to be retrieved directly and not as part 
of some computation (and possible allocation of new resources in 
this case, concatenating the values of text nodes).

Received on Monday, 17 October 2005 18:37:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:21 UTC