55 (uint8_t *)
"hidden",
SLEN(
"hidden"))) {
80 switch (token->
type) {
88 treebuilder, token,
true);
140 &ns, &type, &node, &index);
156 tag.
name.
ptr = (
const uint8_t *)
"colgroup";
172 type ==
TD || type ==
TH || type ==
TR) {
176 if (type ==
TD || type ==
TH || type ==
TR) {
178 tag.
name.
ptr = (
const uint8_t *)
"tbody";
193 }
else if (type ==
TABLE) {
202 }
else if (!tainted && (type ==
STYLE || type ==
SCRIPT)) {
204 }
else if (!tainted && type ==
INPUT) {
226 type ==
TH || type ==
THEAD || type ==
TR) {
bool tainted
Only for tables.
element_type current_node(hubbub_treebuilder *treebuilder)
Peek at the top element of the element stack.
hubbub_error process_comment_append(hubbub_treebuilder *treebuilder, const hubbub_token *token, void *parent)
Process a comment token, appending it to the given parent.
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.
const uint8_t * ptr
Pointer to data.
static void clear_stack_table_context(hubbub_treebuilder *treebuilder)
Clear the stack back to a table context: "the UA must, while the current node is not a table element ...
hubbub_error process_characters_expect_whitespace(hubbub_treebuilder *treebuilder, const hubbub_token *token, bool insert_into_current_node)
Process a character token in cases where we expect only whitespace.
hubbub_string value
Attribute value.
hubbub_error formatting_list_remove(hubbub_treebuilder *treebuilder, formatting_list_entry *entry, hubbub_ns *ns, element_type *type, void **node, uint32_t *stack_index)
Remove an element from the list of active formatting elements.
bool in_table_foster
Whether nodes that would be inserted into the current node should be foster parented.
insertion_mode mode
The current insertion mode.
size_t len
Byte length of string.
bool hubbub_string_match_ci(const uint8_t *a, size_t a_len, const uint8_t *b, size_t b_len)
Check that one string is case-insensitively equal to another.
hubbub_error handle_in_table(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle token in "in table" insertion mode.
hubbub_error handle_in_body(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle tokens in "in body" insertion mode.
formatting_list_entry * formatting_list_end
End of active formatting list.
hubbub_treebuilder_context context
Our context.
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.
hubbub_error handle_in_head(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Handle token in "in head" insertion mode.
static hubbub_error process_input_in_table(hubbub_treebuilder *treebuilder, const hubbub_token *token)
Process an input start tag in the "in table" insertion mode.
hubbub_attribute * attributes
Array of attribute data.
hubbub_error element_stack_pop_until(hubbub_treebuilder *treebuilder, element_type type)
Pop elements until an element of type "element" has been popped.
uint32_t current_table(hubbub_treebuilder *treebuilder)
Find the stack index of the current table.
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.
void reset_insertion_mode(hubbub_treebuilder *treebuilder)
Reset the insertion mode.
element_context * element_stack
Stack of open elements.
uint32_t n_attributes
Count of attributes.
uint32_t current_node
Index of current node in stack.