Re: Formal definition of HTML5 (was Re: Version information)

On Apr 15, 2007, at 12:51, Bruce Boughton wrote:

> Henri Sivonen wrote:
>> For example, the conceptual model for tables involves a grid of  
>> slots. Yet, it would be an extremely bad idea for a table  
>> integrity checker to allocate (colspan * rowspan * pointerSize)  
>> amount of memory when encountering <td colspan='...' rowspan='...'>.

> Presumably a browser UA would have to allocate that memory to build  
> the DOM?

No, the memory footprint of the DOM is proportional to the number of  
cellsŚnot the number of slots. A na´ve layout data structure would be  
proportional to the number of slots, but real-world UAs have to do  
something to avoid using that na´ve layout data structures or,  
alternatively, be sure to clamp down the permissible size of the  
table in terms of slots.

(FWIW, Gecko has magic max values for rowspan and colspan and,  
according to the comments in the Gecko source code, Opera and IE have  
the same magic max value for colspan. It appears that WebKit does not  
have such magic values.)

Henri Sivonen

Received on Sunday, 15 April 2007 10:03:19 UTC