This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18473 - Spec causes continuous loop
Summary: Spec causes continuous loop
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 18:52 UTC by Ian 'Hixie' Hickson
Modified: 2012-10-08 21:29 UTC (History)
3 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2012-08-02 18:52:07 UTC
(cloning bug to WHATWG component so I can investigate whether the suggested clarification is worth it)

+++ This bug was initially created as a clone of Bug #18367 +++

Consider the stack of open elements to be :
html, body, form, table, tbody

(form being present is irrelevant to this imo).

The current insertion mode is IN TABLE BODY as expected.

When the next token being consumed is end tag p, then the parser will go into an infinite loop.

IN TABLE BODY will delegate to IN TABLE, which will delegate to IN BODY with foster parenting enabled.
The end tag p will cause a 'act as if' start token for p (since there is no P in button scope) - which will go through same flow to end in IN BODY with foster parenting enabled.
The resulting insertion of p tag due to then token will get foster parent'ed - and so, on return, reconsumption of end tag p will essentially cause the same loop to be repeated indefinitely.

Looks like even when foster parent'ed, the node to be inserted must be pushed
to open elements stack - might be good to clarify this since we figured it out
via trial and error.
Comment 1 contributor 2012-10-08 21:29:51 UTC
Checked in as WHATWG revision r7441.
Check-in comment: Try to clarify the foster parenting logic...
http://html5.org/tools/web-apps-tracker?from=7440&to=7441