W3C home > Mailing lists > Public > public-html@w3.org > December 2007

Restatement of the outline algorithm

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 13 Dec 2007 12:12:27 +0200
Message-Id: <701F73FC-0306-4FFA-8420-E4DA3B1C4C06@iki.fi>
To: HTMLWG WG <public-html@w3.org>

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

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:51 UTC