1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:15:07 +00:00

LibWeb: Add a way to stop the new HTML parser

Some things are specced to "stop parsing", which basically just means
to stop fetching tokens and jump to "The end"
This commit is contained in:
Andreas Kling 2020-05-28 18:55:18 +02:00
parent 00b44ab148
commit 68b1bdc234
2 changed files with 11 additions and 3 deletions

View file

@ -94,6 +94,8 @@ private:
void handle_in_row(HTMLToken&);
void handle_in_cell(HTMLToken&);
void stop_parsing() { m_stop_parsing = true; }
void generate_implied_end_tags(const FlyString& exception = {});
bool stack_of_open_elements_has_element_with_tag_name_in_scope(const FlyString& tag_name);
NonnullRefPtr<Element> create_element_for(HTMLToken&);
@ -131,6 +133,7 @@ private:
bool m_invoked_via_document_write { false };
bool m_aborted { false };
bool m_parser_pause_flag { false };
bool m_stop_parsing { false };
size_t m_script_nesting_level { 0 };
RefPtr<Document> m_document;