[Bug 10801] Limit the number of iterations in the loops in the AAA

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10801

--- Comment #7 from Maciej Stachowiak <mjs@apple.com> 2010-10-14 17:51:09 UTC ---
(In reply to comment #5)
> In practice, the limits have in fact been increasing over time (once or twice a
> decade currently). However, we could always put the limit in the spec and
> increase it there, I guess.

AFAIK WebKit is the only browser to implement some form of the Adoption Agency
Algorithm prior to the HTML5 standard parser. We have only been around about a
decade, and I don't think we have a history of increasing the limits or a
desire to do so in the future. In general, the limits have changed from
(effectively) infinity to finite values. I do think the values may have changed
to higher ones in the rewrite to the HTML5 parser, but otherwise the trend is
in the other direction.

> 
> Could you elaborate on what limit you would like to see specified? What should
> happen when the loop count has been exceeded? In particular, I'm interested in
> what you think should happen if the loop is aborted after some changes have
> been made but not all the changes that would be made if it was run to
> completion.

Henri's explanation seems adequate; perhaps Adam can add more detail.

> 
> Is the goal to simply stop creating elements? How would this handle a page like
> the ASCII art colour Tux constructed with nothing but one opening <font> per
> character, or pages that use nested <em>s for "semantic" tag clouds?

I don't believe AAA is invoked at all in these cases, only mismatched end tags
invoke the AAA. So the limits would not kick in. Deep self-nesting can be a
problem in its own right, but it scales linearly not quadratically and can
occur even in valid content, so it seems more reasonable to let the general
"machine limits" caluse handle it..

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 14 October 2010 17:51:13 UTC