mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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
Notes:
sideshowbarker
2024-07-19 05:51:37 +09:00
Author: https://github.com/awesomekling
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