1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:25:08 +00:00

LibWeb: Start implementing character token parsing

Now that we've gotten rid of the misguided character buffering in the
tokenizer, it actually spits out character tokens that we have to deal
with in the parser.

This patch implements enough to bring us back to speed with simple.html
This commit is contained in:
Andreas Kling 2020-05-24 19:51:50 +02:00
parent 53d2f4df70
commit 31db3f21ae
4 changed files with 132 additions and 34 deletions

View file

@ -95,10 +95,16 @@ private:
RefPtr<Node> find_appropriate_place_for_inserting_node();
RefPtr<Element> insert_html_element(HTMLToken&);
Element& current_node();
void insert_character(u32 data);
void reconstruct_the_active_formatting_elements();
void process_using_the_rules_for(InsertionMode, HTMLToken&);
InsertionMode m_insertion_mode { InsertionMode::Initial };
StackOfOpenElements m_stack_of_open_elements;
NonnullRefPtrVector<Element> m_list_of_active_formatting_elements;
HTMLTokenizer m_tokenizer;
bool m_foster_parenting { false };