Restatement of the outline algorithm

Summarizing IRC issues:

The current outline algorithm is not stated from an implementation- 
friendly point of view. Instead of requiring each implementor to  
recast the algorithm in a different way and to investigate the  
feasibility of such recasting, it would be more helpful if the spec  
algorithm were stated in a more implementation-useful POV.

1) There should be a statement of the algorithm as a side-effect of  
forward-only tree walk. That is, the algorithm should not own the tree  
walking loop but should instead define variables it keeps and changes  
to these variables as elements of are seen. This would allow straight- 
forward implementation as part of a sweep over the tree that is  
already happening for another reason. This sweep should probably  
define what checkpoint data to store on each element that implements  
the HTMLHeaderElement interface to allow local recomputation.

2) It would be useful to define the outline depth in a way that allows  
local recomputation by walking from a tainted node whose outline depth  
is to be re-evaluated to the previous untainted HTMLHeaderElement  
node, reinitializing the algorithm variables with the checkpoint data  
stored there and resweeping forward until the end of the parent of the  
tainted node is reached. For this to work, the outline depth should be  
stated in such a way that changing a node does not cause outline  
changes outside the parent of the changed node.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Thursday, 13 December 2007 10:12:45 UTC