mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
LibWeb: Buffer text node character insertions in the new parser
Instead of appending character-at-a-time, we now buffer character insertions in a StringBuilder, and flush them to the relevant node whenever we start inserting into a new node (and when parsing ends.)
This commit is contained in:
parent
2149820260
commit
c40de9275a
2 changed files with 39 additions and 15 deletions
|
@ -105,6 +105,8 @@ private:
|
|||
bool stack_of_open_elements_has_element_with_tag_name_in_scope(const FlyString& tag_name);
|
||||
NonnullRefPtr<Element> create_element_for(HTMLToken&);
|
||||
RefPtr<Node> find_appropriate_place_for_inserting_node();
|
||||
Text* find_character_insertion_node();
|
||||
void flush_character_insertions();
|
||||
RefPtr<Element> insert_html_element(HTMLToken&);
|
||||
Element& current_node();
|
||||
Element& node_before_current_node();
|
||||
|
@ -153,6 +155,9 @@ private:
|
|||
RefPtr<HTMLFormElement> m_form_element;
|
||||
|
||||
Vector<HTMLToken> m_pending_table_character_tokens;
|
||||
|
||||
RefPtr<Text> m_character_insertion_node;
|
||||
StringBuilder m_character_insertion_builder;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue