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 23664 - This line should probably read "Loop: If node is the first node in the stack of open elements, then set last to true, and if fragment case then set node to the context element." The context element on [...]
Summary: This line should probably read "Loop: If node is the first node in the stack ...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-28 23:16 UTC by contributor
Modified: 2013-11-18 23:34 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2013-10-28 23:16:43 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html
Multipage: http://www.whatwg.org/C#the-stack-of-open-elements
Complete: http://www.whatwg.org/c#the-stack-of-open-elements
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html

Comment:
This line should probably read "Loop: If node is the first node in the stack
of open elements, then set last to true, and if fragment case then set node to
the context element." The context element only makes sense in the fragment
case and not defined otherwise. It is possible to run into this problem when
parsing "<head></head><template></template>".

Posted from: 63.245.219.53
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0
Comment 1 William Chen 2013-10-28 23:20:59 UTC
This issue refers to Step 3 of the "reset the insertion mode appropriately" algorithm.
Comment 2 Ian 'Hixie' Hickson 2013-11-18 23:34:00 UTC
Sorry it took me so long to fix this. I try to be quicker with parser bugs but this one went under my radar for some reason.
Comment 3 contributor 2013-11-18 23:34:49 UTC
Checked in as WHATWG revision r8293.
Check-in comment: The 'reset the insertion mode' algorithm referenced the context element in some cases where there was no context element (e.g. '<html><head></head><template></template>')
http://html5.org/tools/web-apps-tracker?from=8292&to=8293