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 18367 - Spec causes continuous loop
Summary: Spec causes continuous loop
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Silvia Pfeiffer
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 23:07 UTC by Mridul
Modified: 2012-10-21 22:25 UTC (History)
5 users (show)

See Also:


Attachments

Description Mridul 2012-07-23 23:07:54 UTC
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.


If our understanding of the spec, as detailed above, is incorrect - that would be great ! Please do let us know.


Thanks,
Mridul
Comment 1 Mridul 2012-07-24 14:34:41 UTC
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.

Closing bug.
Comment 2 Silvia Pfeiffer 2012-10-15 05:09:24 UTC
Reopening, so I can apply the patch of cloned WHATWG bug 18473 to the W3C spec.
Comment 3 Silvia Pfeiffer 2012-10-21 22:25:34 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
document:   http://dev.w3.org/html5/decision-policy/decision-policy-v2.html

Status: Accepted

Change Description:
https://github.com/w3c/html/commit/2758f0e460f26cdf2fb510e26062eb7f5c17f171

Rationale: Adopted WHATWG patch