26 while (cur_node !=
TR && cur_node !=
HTML) {
83 switch (token->
type) {
89 if (type ==
TH || type ==
TD) {
144 }
else if (type ==
TABLE) {
148 type ==
TD || type ==
TH) {
element_type current_node(hubbub_treebuilder *treebuilder)
Peek at the top element of the element stack.
hubbub_token_type type
The token type.
void * ctx
Context pointer.
hubbub_ns ns
Tag namespace.
hubbub_string name
Tag name.
hubbub_tree_handler * tree_handler
Callback table.
insertion_mode mode
The current insertion mode.
hubbub_error handle_in_row(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle tokens in "in row" insertion mode.
hubbub_error handle_in_table(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle token in "in table" insertion mode.
hubbub_treebuilder_context context
Our context.
hubbub_error remove_node_from_dom(hubbub_treebuilder *treebuilder, void *node)
Remove a node from the DOM.
hubbub_error insert_element(hubbub_treebuilder *treebuilder, const hubbub_tag *tag_name, bool push)
Create element and insert it into the DOM, potentially pushing it on the stack.
static hubbub_error act_as_if_end_tag_tr(hubbub_treebuilder *treebuilder)
Handle and anything that acts "as if" was emitted.
hubbub_tree_ref_node ref_node
Reference node.
hubbub_tree_unref_node unref_node
Unreference node.
hubbub_ns
Possible namespaces.
union hubbub_token::@3 data
Type-specific data.
hubbub_error formatting_list_append(hubbub_treebuilder *treebuilder, hubbub_ns ns, element_type type, void *node, uint32_t stack_index)
Append an element to the end of the list of active formatting elements.
hubbub_error element_stack_pop(hubbub_treebuilder *treebuilder, hubbub_ns *ns, element_type *type, void **node)
Pop an element off the stack of open elements.
element_type element_type_from_name(hubbub_treebuilder *treebuilder, const hubbub_string *tag_name)
Convert an element name into an element type.
static void table_clear_stack(hubbub_treebuilder *treebuilder)
Clear the stack back to a table row context.
element_context * element_stack
Stack of open elements.
uint32_t current_node
Index of current node in stack.