LibWeb: Add a helper for creating a fake (start tag) HTML token

Sometimes the parsing rules say we need to insert a fake HTML token.
Let's have a convenient way of doing that!
This commit is contained in:
Andreas Kling 2020-07-23 17:30:03 +02:00
parent aaf6014ae1
commit 6e02ef19d1
Notes: sideshowbarker 2024-07-19 04:39:37 +09:00
3 changed files with 19 additions and 34 deletions

View file

@ -115,7 +115,7 @@ private:
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&);
NonnullRefPtr<Element> create_element_for(const HTMLToken&);
struct AdjustedInsertionLocation {
RefPtr<Node> parent;
@ -126,7 +126,7 @@ private:
Text* find_character_insertion_node();
void flush_character_insertions();
RefPtr<Element> insert_html_element(HTMLToken&);
RefPtr<Element> insert_html_element(const HTMLToken&);
Element& current_node();
Element& node_before_current_node();
void insert_character(u32 data);