mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +00:00
LibWeb: Split out "The end" from the HTML parsing spec to a function
Also add a spec link and some comments.
This commit is contained in:
parent
f67648f872
commit
e452550fda
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/awesomekling
Commit: e452550fda
2 changed files with 15 additions and 2 deletions
|
@ -175,11 +175,22 @@ void HTMLParser::run(const AK::URL& url)
|
|||
|
||||
flush_character_insertions();
|
||||
|
||||
// "The end"
|
||||
the_end();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#the-end
|
||||
void HTMLParser::the_end()
|
||||
{
|
||||
// Once the user agent stops parsing the document, the user agent must run the following steps:
|
||||
|
||||
// FIXME: 1. If the active speculative HTML parser is not null, then stop the speculative HTML parser and return.
|
||||
|
||||
// FIXME: 2. Set the insertion point to undefined.
|
||||
|
||||
// 3. Update the current document readiness to "interactive".
|
||||
m_document->set_ready_state("interactive");
|
||||
|
||||
// 3. Pop all the nodes off the stack of open elements.
|
||||
// 4. Pop all the nodes off the stack of open elements.
|
||||
while (!m_stack_of_open_elements.is_empty())
|
||||
m_stack_of_open_elements.pop();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue