Hubbub
Data Structures | Macros | Typedefs | Functions
in_body.c File Reference
#include <assert.h>
#include <string.h>
#include "treebuilder/modes.h"
#include "treebuilder/internal.h"
#include "treebuilder/treebuilder.h"
#include "utils/utils.h"

Go to the source code of this file.

Data Structures

struct  bookmark
 Bookmark for formatting list. More...
 

Macros

#define PROMPT   "This is a searchable index. Insert your search keywords here: "
 

Typedefs

typedef struct bookmark bookmark
 Bookmark for formatting list. More...
 

Functions

static hubbub_error process_character (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a character token. More...
 
static hubbub_error process_start_tag (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a start tag. More...
 
static hubbub_error process_end_tag (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process an end tag. More...
 
static hubbub_error process_html_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a html start tag as if in "in body". More...
 
static hubbub_error process_body_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a body start tag as if in "in body". More...
 
static hubbub_error process_frameset_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a frameset start tag as if in "in body". More...
 
static hubbub_error process_container_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a generic container start tag as if in "in body". More...
 
static hubbub_error process_hN_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a hN start tag as if in "in body". More...
 
static hubbub_error process_form_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a form start tag as if in "in body". More...
 
static hubbub_error process_dd_dt_li_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token, element_type type)
 Process a dd, dt or li start tag as if in "in body". More...
 
static hubbub_error process_plaintext_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a plaintext start tag as if in "in body". More...
 
static hubbub_error process_a_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process an "a" start tag as if in "in body". More...
 
static hubbub_error process_presentational_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token, element_type type)
 Process a b, big, em, font, i, s, small, strike, strong, tt, or u start tag as if in "in body". More...
 
static hubbub_error process_nobr_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a nobr start tag as if in "in body". More...
 
static hubbub_error process_button_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a button start tag as if in "in body". More...
 
static hubbub_error process_applet_marquee_object_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token, element_type type)
 Process an applet, marquee or object start tag as if in "in body". More...
 
static hubbub_error process_hr_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process an hr start tag as if in "in body". More...
 
static hubbub_error process_image_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process an image start tag as if in "in body". More...
 
static hubbub_error process_isindex_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process an isindex start tag as if in "in body". More...
 
static hubbub_error process_textarea_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a textarea start tag as if in "in body". More...
 
static hubbub_error process_select_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a select start tag as if in "in body". More...
 
static hubbub_error process_opt_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process an option or optgroup start tag as if in "in body". More...
 
static hubbub_error process_phrasing_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Process a phrasing start tag as if in "in body". More...
 
static hubbub_error process_0body_in_body (hubbub_treebuilder *treebuilder)
 Process a body end tag as if in "in body". More...
 
static hubbub_error process_0container_in_body (hubbub_treebuilder *treebuilder, element_type type)
 Process a container end tag as if in "in body". More...
 
static hubbub_error process_0form_in_body (hubbub_treebuilder *treebuilder)
 Process a form end tag as if in "in body". More...
 
static hubbub_error process_0p_in_body (hubbub_treebuilder *treebuilder)
 Process a p end tag as if in "in body". More...
 
static hubbub_error process_0dd_dt_li_in_body (hubbub_treebuilder *treebuilder, element_type type)
 Process a dd, dt, or li end tag as if in "in body". More...
 
static hubbub_error process_0h_in_body (hubbub_treebuilder *treebuilder, element_type type)
 Process a h1, h2, h3, h4, h5, or h6 end tag as if in "in body". More...
 
static hubbub_error process_0presentational_in_body (hubbub_treebuilder *treebuilder, element_type type)
 Process a presentational end tag as if in "in body". More...
 
static hubbub_error process_0applet_button_marquee_object_in_body (hubbub_treebuilder *treebuilder, element_type type)
 Process an applet, button, marquee, or object end tag as if in "in body". More...
 
static hubbub_error process_0br_in_body (hubbub_treebuilder *treebuilder)
 Process a br end tag as if in "in body". More...
 
static hubbub_error process_0generic_in_body (hubbub_treebuilder *treebuilder, element_type type)
 Process a generic end tag as if in "in body". More...
 
static hubbub_error aa_find_and_validate_formatting_element (hubbub_treebuilder *treebuilder, element_type type, formatting_list_entry **element)
 Adoption agency: find and validate the formatting element. More...
 
static formatting_list_entryaa_find_formatting_element (hubbub_treebuilder *treebuilder, element_type type)
 Adoption agency: find formatting element. More...
 
static hubbub_error aa_find_furthest_block (hubbub_treebuilder *treebuilder, formatting_list_entry *formatting_element, uint32_t *furthest_block)
 Adoption agency: find furthest block. More...
 
static hubbub_error aa_reparent_node (hubbub_treebuilder *treebuilder, void *node, void *new_parent, void **reparented)
 Adoption agency: reparent a node. More...
 
static hubbub_error aa_find_bookmark_location_reparenting_misnested (hubbub_treebuilder *treebuilder, uint32_t formatting_element, uint32_t *furthest_block, bookmark *bookmark, uint32_t *last_node)
 Adoption agency: this is step 6. More...
 
static hubbub_error aa_remove_element_stack_item (hubbub_treebuilder *treebuilder, uint32_t index, uint32_t limit)
 Adoption agency: remove an entry from the stack at the given index. More...
 
static hubbub_error aa_clone_and_replace_entries (hubbub_treebuilder *treebuilder, formatting_list_entry *element)
 Adoption agency: shallow clone a node and replace its formatting list and element stack entries. More...
 
hubbub_error handle_in_body (hubbub_treebuilder *treebuilder, const hubbub_token *token)
 Handle tokens in "in body" insertion mode. More...
 
hubbub_error aa_insert_into_foster_parent (hubbub_treebuilder *treebuilder, void *node, void **inserted)
 Adoption agency: locate foster parent and insert node into it. More...
 

Macro Definition Documentation

◆ PROMPT

#define PROMPT   "This is a searchable index. Insert your search keywords here: "

Referenced by process_isindex_in_body().

Typedef Documentation

◆ bookmark

typedef struct bookmark bookmark

Bookmark for formatting list.

Used in adoption agency

Function Documentation

◆ aa_clone_and_replace_entries()

hubbub_error aa_clone_and_replace_entries ( hubbub_treebuilder treebuilder,
formatting_list_entry element 
)
static

Adoption agency: shallow clone a node and replace its formatting list and element stack entries.

Parameters
treebuilderThe treebuilder instance
elementThe item in the formatting list containing the node

Definition at line 2176 of file in_body.c.

References hubbub_tree_handler::clone_node, hubbub_treebuilder::context, hubbub_tree_handler::ctx, formatting_list_entry::details, hubbub_treebuilder_context::element_stack, formatting_list_replace(), HUBBUB_OK, element_context::node, element_context::ns, hubbub_tree_handler::ref_node, formatting_list_entry::stack_index, hubbub_treebuilder::tree_handler, element_context::type, and hubbub_tree_handler::unref_node.

Referenced by aa_find_bookmark_location_reparenting_misnested().

◆ aa_find_and_validate_formatting_element()

hubbub_error aa_find_and_validate_formatting_element ( hubbub_treebuilder treebuilder,
element_type  type,
formatting_list_entry **  element 
)
static

Adoption agency: find and validate the formatting element.

Parameters
treebuilderThe treebuilder instance
typeElement type to search for
elementPointer to location to receive list entry
Returns
HUBBUB_REPROCESS to continue processing, HUBBUB_OK to stop.
Todo:
parse error
Todo:
parse error
Todo:
parse error

Definition at line 1857 of file in_body.c.

References aa_find_formatting_element(), hubbub_treebuilder::context, hubbub_tree_handler::ctx, hubbub_treebuilder_context::current_node, formatting_list_entry::details, element_in_scope(), formatting_list_remove(), HUBBUB_OK, HUBBUB_REPROCESS, formatting_list_entry::stack_index, hubbub_treebuilder::tree_handler, type, element_context::type, and hubbub_tree_handler::unref_node.

Referenced by process_0presentational_in_body().

◆ aa_find_bookmark_location_reparenting_misnested()

hubbub_error aa_find_bookmark_location_reparenting_misnested ( hubbub_treebuilder treebuilder,
uint32_t  formatting_element,
uint32_t *  furthest_block,
bookmark bookmark,
uint32_t *  last_node 
)
static

Adoption agency: this is step 6.

Parameters
treebuilderThe treebuilder instance
formatting_elementThe stack index of the formatting element
furthest_blockPointer to index of furthest block in element stack (updated on exit)
bookmarkPointer to bookmark (pre-initialised)
last_nodePointer to location to receive index of last node

Definition at line 2014 of file in_body.c.

References aa_clone_and_replace_entries(), aa_remove_element_stack_item(), aa_reparent_node(), hubbub_treebuilder::context, hubbub_tree_handler::ctx, hubbub_treebuilder_context::current_node, formatting_list_entry::details, hubbub_treebuilder_context::element_stack, hubbub_treebuilder_context::formatting_list_end, HUBBUB_OK, bookmark::next, formatting_list_entry::next, element_context::node, bookmark::prev, formatting_list_entry::prev, hubbub_tree_handler::ref_node, formatting_list_entry::stack_index, hubbub_treebuilder::tree_handler, and hubbub_tree_handler::unref_node.

Referenced by process_0presentational_in_body().

◆ aa_find_formatting_element()

formatting_list_entry * aa_find_formatting_element ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

Adoption agency: find formatting element.

Parameters
treebuilderThe treebuilder instance
typeType of element to search for
Returns
Pointer to formatting element, or NULL if none found

Definition at line 1906 of file in_body.c.

References hubbub_treebuilder::context, formatting_list_entry::details, hubbub_treebuilder_context::formatting_list_end, is_scoping_element(), formatting_list_entry::prev, type, and element_context::type.

Referenced by aa_find_and_validate_formatting_element(), and process_a_in_body().

◆ aa_find_furthest_block()

hubbub_error aa_find_furthest_block ( hubbub_treebuilder treebuilder,
formatting_list_entry formatting_element,
uint32_t *  furthest_block 
)
static

Adoption agency: find furthest block.

Parameters
treebuilderThe treebuilder instance
formatting_elementThe formatting element
furthest_blockPointer to location to receive furthest block
Returns
HUBBUB_REPROCESS to continue processing (::furthest_block filled in), HUBBUB_OK to stop.

Definition at line 1936 of file in_body.c.

References hubbub_treebuilder::context, hubbub_tree_handler::ctx, hubbub_treebuilder_context::current_node, hubbub_treebuilder_context::element_stack, element_stack_pop(), formatting_list_remove(), HUBBUB_OK, HUBBUB_REPROCESS, is_formatting_element(), is_phrasing_element(), formatting_list_entry::stack_index, hubbub_treebuilder::tree_handler, type, element_context::type, and hubbub_tree_handler::unref_node.

Referenced by process_0presentational_in_body().

◆ aa_insert_into_foster_parent()

hubbub_error aa_insert_into_foster_parent ( hubbub_treebuilder treebuilder,
void *  node,
void **  inserted 
)

Adoption agency: locate foster parent and insert node into it.

Parameters
treebuilderThe treebuilder instance
nodeThe node to insert
insertedPointer to location to receive inserted node
Returns
HUBBUB_OK on success, appropriate error otherwise

Definition at line 2222 of file in_body.c.

References hubbub_tree_handler::append_child, hubbub_treebuilder::context, hubbub_tree_handler::ctx, current_table(), hubbub_treebuilder_context::element_stack, hubbub_tree_handler::get_parent, HUBBUB_OK, hubbub_tree_handler::insert_before, element_context::node, hubbub_tree_handler::ref_node, remove_node_from_dom(), element_context::tainted, hubbub_treebuilder::tree_handler, and hubbub_tree_handler::unref_node.

Referenced by append_text(), insert_element(), process_0presentational_in_body(), process_comment_append(), and reconstruct_active_formatting_list().

◆ aa_remove_element_stack_item()

hubbub_error aa_remove_element_stack_item ( hubbub_treebuilder treebuilder,
uint32_t  index,
uint32_t  limit 
)
static

Adoption agency: remove an entry from the stack at the given index.

Parameters
treebuilderThe treebuilder instance
indexThe index of the item to remove
limitThe index of the last item to move

Preconditions: index < limit, limit <= current_node Postcondition: stack[limit] is empty

Definition at line 2129 of file in_body.c.

References hubbub_treebuilder::context, hubbub_tree_handler::ctx, hubbub_treebuilder_context::element_stack, hubbub_treebuilder_context::formatting_list_end, HTML, HUBBUB_OK, is_formatting_element(), is_scoping_element(), element_context::node, formatting_list_entry::prev, formatting_list_entry::stack_index, TABLE, hubbub_treebuilder::tree_handler, type, and hubbub_tree_handler::unref_node.

Referenced by aa_find_bookmark_location_reparenting_misnested(), and process_0presentational_in_body().

◆ aa_reparent_node()

hubbub_error aa_reparent_node ( hubbub_treebuilder treebuilder,
void *  node,
void *  new_parent,
void **  reparented 
)
static

Adoption agency: reparent a node.

Parameters
treebuilderThe treebuilder instance
nodeThe node to reparent
new_parentThe new parent
reparentedPointer to location to receive reparented node
Returns
HUBBUB_OK on success, appropriate error otherwise

Definition at line 1990 of file in_body.c.

References hubbub_tree_handler::append_child, hubbub_tree_handler::ctx, HUBBUB_OK, remove_node_from_dom(), and hubbub_treebuilder::tree_handler.

Referenced by aa_find_bookmark_location_reparenting_misnested(), and process_0presentational_in_body().

◆ handle_in_body()

hubbub_error handle_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)

◆ process_0applet_button_marquee_object_in_body()

hubbub_error process_0applet_button_marquee_object_in_body ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

Process an applet, button, marquee, or object end tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
typeThe element type
Todo:
parse error
Todo:
parse error

Definition at line 2299 of file in_body.c.

References clear_active_formatting_list_to_marker(), close_implied_end_tags(), hubbub_tree_handler::ctx, element_in_scope(), element_stack_pop(), HUBBUB_OK, hubbub_treebuilder::tree_handler, type, UNKNOWN, and hubbub_tree_handler::unref_node.

Referenced by process_button_in_body(), and process_end_tag().

◆ process_0body_in_body()

hubbub_error process_0body_in_body ( hubbub_treebuilder treebuilder)
static

Process a body end tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
Returns
True if processed, false otherwise
Todo:
parse error
Todo:
parse error

Definition at line 1401 of file in_body.c.

References AFTER_BODY, BODY, hubbub_treebuilder::context, hubbub_treebuilder_context::current_node, DD, DT, element_in_scope(), hubbub_treebuilder_context::element_stack, HUBBUB_OK, HUBBUB_REPROCESS, IN_BODY, LI, hubbub_treebuilder_context::mode, OPTGROUP, OPTION, P, RP, RT, TBODY, TD, TFOOT, TH, THEAD, TR, and element_context::type.

Referenced by process_end_tag().

◆ process_0br_in_body()

hubbub_error process_0br_in_body ( hubbub_treebuilder treebuilder)
static

Process a br end tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
Todo:
parse error

Definition at line 2338 of file in_body.c.

References hubbub_tag::attributes, HUBBUB_NS_HTML, HUBBUB_OK, insert_element(), hubbub_string::len, hubbub_tag::n_attributes, hubbub_tag::name, hubbub_tag::ns, hubbub_string::ptr, reconstruct_active_formatting_list(), and SLEN.

Referenced by process_end_tag().

◆ process_0container_in_body()

hubbub_error process_0container_in_body ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

Process a container end tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
typeThe element type
Todo:
parse error
Todo:
parse error

Definition at line 1441 of file in_body.c.

References close_implied_end_tags(), hubbub_tree_handler::ctx, element_in_scope(), element_stack_pop(), HUBBUB_OK, hubbub_treebuilder::tree_handler, type, UNKNOWN, and hubbub_tree_handler::unref_node.

Referenced by process_end_tag(), and process_isindex_in_body().

◆ process_0dd_dt_li_in_body()

hubbub_error process_0dd_dt_li_in_body ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

Process a dd, dt, or li end tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
typeThe element type
Todo:
parse error
Todo:
parse error

Definition at line 1578 of file in_body.c.

References close_implied_end_tags(), hubbub_tree_handler::ctx, element_in_scope(), element_stack_pop(), HUBBUB_OK, hubbub_treebuilder::tree_handler, type, and hubbub_tree_handler::unref_node.

Referenced by process_end_tag().

◆ process_0form_in_body()

hubbub_error process_0form_in_body ( hubbub_treebuilder treebuilder)
static

◆ process_0generic_in_body()

hubbub_error process_0generic_in_body ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

◆ process_0h_in_body()

hubbub_error process_0h_in_body ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

Process a h1, h2, h3, h4, h5, or h6 end tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
typeThe element type
Todo:
optimise this
Todo:
parse error
Todo:
parse error

Definition at line 1617 of file in_body.c.

References close_implied_end_tags(), hubbub_tree_handler::ctx, element_in_scope(), element_stack_pop(), H1, H2, H3, H4, H5, H6, HUBBUB_OK, hubbub_treebuilder::tree_handler, type, UNKNOWN, hubbub_tree_handler::unref_node, and UNUSED.

Referenced by process_end_tag().

◆ process_0p_in_body()

hubbub_error process_0p_in_body ( hubbub_treebuilder treebuilder)
static

◆ process_0presentational_in_body()

hubbub_error process_0presentational_in_body ( hubbub_treebuilder treebuilder,
element_type  type 
)
static

◆ process_a_in_body()

hubbub_error process_a_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_applet_marquee_object_in_body()

hubbub_error process_applet_marquee_object_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token,
element_type  type 
)
static

◆ process_body_in_body()

hubbub_error process_body_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_button_in_body()

hubbub_error process_button_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_character()

hubbub_error process_character ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_container_in_body()

hubbub_error process_container_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process a generic container start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 561 of file in_body.c.

References hubbub_token::data, element_in_scope(), HUBBUB_OK, insert_element(), P, process_0p_in_body(), and hubbub_token::tag.

Referenced by process_0p_in_body(), process_isindex_in_body(), and process_start_tag().

◆ process_dd_dt_li_in_body()

hubbub_error process_dd_dt_li_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token,
element_type  type 
)
static

◆ process_end_tag()

hubbub_error process_end_tag ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_form_in_body()

hubbub_error process_form_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_frameset_in_body()

hubbub_error process_frameset_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_hN_in_body()

hubbub_error process_hN_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_hr_in_body()

hubbub_error process_hr_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process an hr start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 1097 of file in_body.c.

References hubbub_treebuilder::context, hubbub_token::data, element_in_scope(), hubbub_treebuilder_context::frameset_ok, HUBBUB_OK, insert_element(), P, process_0p_in_body(), and hubbub_token::tag.

Referenced by process_isindex_in_body(), and process_start_tag().

◆ process_html_in_body()

hubbub_error process_html_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process a html start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Todo:
parse error

Definition at line 486 of file in_body.c.

References hubbub_tree_handler::add_attributes, hubbub_tag::attributes, hubbub_treebuilder::context, hubbub_tree_handler::ctx, hubbub_token::data, hubbub_treebuilder_context::element_stack, hubbub_tag::n_attributes, element_context::node, hubbub_token::tag, and hubbub_treebuilder::tree_handler.

Referenced by process_start_tag().

◆ process_image_in_body()

hubbub_error process_image_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process an image start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 1121 of file in_body.c.

References hubbub_tag::attributes, hubbub_token::data, HUBBUB_NS_HTML, HUBBUB_OK, insert_element(), hubbub_string::len, hubbub_tag::n_attributes, hubbub_tag::name, hubbub_tag::ns, hubbub_string::ptr, reconstruct_active_formatting_list(), SLEN, and hubbub_token::tag.

Referenced by process_start_tag().

◆ process_isindex_in_body()

hubbub_error process_isindex_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_nobr_in_body()

hubbub_error process_nobr_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_opt_in_body()

hubbub_error process_opt_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process an option or optgroup start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 1359 of file in_body.c.

References hubbub_token::data, element_in_scope(), HUBBUB_OK, insert_element(), OPTION, process_0generic_in_body(), reconstruct_active_formatting_list(), and hubbub_token::tag.

Referenced by process_start_tag().

◆ process_phrasing_in_body()

hubbub_error process_phrasing_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process a phrasing start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 1383 of file in_body.c.

References hubbub_token::data, HUBBUB_OK, insert_element(), reconstruct_active_formatting_list(), and hubbub_token::tag.

Referenced by process_isindex_in_body(), and process_start_tag().

◆ process_plaintext_in_body()

hubbub_error process_plaintext_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

◆ process_presentational_in_body()

hubbub_error process_presentational_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token,
element_type  type 
)
static

◆ process_select_in_body()

hubbub_error process_select_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process a select start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 1337 of file in_body.c.

References hubbub_treebuilder::context, hubbub_token::data, hubbub_treebuilder_context::frameset_ok, HUBBUB_OK, insert_element(), reconstruct_active_formatting_list(), and hubbub_token::tag.

Referenced by process_start_tag().

◆ process_start_tag()

hubbub_error process_start_tag ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process a start tag.

Parameters
treebuilderThe treebuilder instance
tokenThe token to process
Returns
HUBBUB_OK on success, HUBBUB_REPROCESS to reprocess the token, appropriate error otherwise.
Todo:
ruby
Todo:
ack sc flag
Todo:
parse error

Definition at line 247 of file in_body.c.

References A, ADDRESS, adjust_foreign_attributes(), adjust_mathml_attributes(), adjust_svg_attributes(), APPLET, AREA, ARTICLE, ASIDE, B, BASE, BASEFONT, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CODE, COL, COLGROUP, COMMAND, hubbub_treebuilder::context, current_table(), hubbub_token::data, DATAGRID, DD, DETAILS, DIALOG, DIR, DIV, DL, DT, hubbub_treebuilder_context::element_stack, element_type_from_name(), EM, EMBED, hubbub_treebuilder_context::enable_scripting, FIELDSET, FIGURE, FONT, FOOTER, FORM, FRAME, FRAMESET, hubbub_treebuilder_context::frameset_ok, H1, H2, H3, H4, H5, H6, handle_in_head(), HEAD, HEADER, HR, HTML, HUBBUB_NS_MATHML, HUBBUB_NS_SVG, HUBBUB_OK, I, IFRAME, IMAGE, IMG, IN_BODY, IN_CAPTION, IN_CELL, IN_COLUMN_GROUP, IN_FOREIGN_CONTENT, IN_ROW, IN_SELECT, IN_SELECT_IN_TABLE, IN_TABLE, IN_TABLE_BODY, INPUT, insert_element(), ISINDEX, LI, LINK, LISTING, MARQUEE, MATH, MENU, META, hubbub_treebuilder_context::mode, hubbub_tag::name, NAV, NOBR, NOEMBED, NOFRAMES, NOSCRIPT, hubbub_tag::ns, OBJECT, OL, OPTGROUP, OPTION, P, PARAM, parse_generic_rcdata(), PLAINTEXT, PRE, process_a_in_body(), process_applet_marquee_object_in_body(), process_body_in_body(), process_button_in_body(), process_container_in_body(), process_dd_dt_li_in_body(), process_form_in_body(), process_frameset_in_body(), process_hN_in_body(), process_hr_in_body(), process_html_in_body(), process_image_in_body(), process_isindex_in_body(), process_nobr_in_body(), process_opt_in_body(), process_phrasing_in_body(), process_plaintext_in_body(), process_presentational_in_body(), process_select_in_body(), process_textarea_in_body(), reconstruct_active_formatting_list(), RP, RT, S, SCRIPT, hubbub_treebuilder_context::second_mode, SECTION, SELECT, hubbub_tag::self_closing, SMALL, SPACER, STRIKE, hubbub_treebuilder_context::strip_leading_lr, STRONG, STYLE, SVG, TABLE, hubbub_token::tag, element_context::tainted, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, type, U, UL, WBR, and XMP.

Referenced by handle_in_body().

◆ process_textarea_in_body()

hubbub_error process_textarea_in_body ( hubbub_treebuilder treebuilder,
const hubbub_token token 
)
static

Process a textarea start tag as if in "in body".

Parameters
treebuilderThe treebuilder instance
tokenThe token to process

Definition at line 1323 of file in_body.c.

References hubbub_treebuilder::context, hubbub_treebuilder_context::frameset_ok, parse_generic_rcdata(), and hubbub_treebuilder_context::strip_leading_lr.

Referenced by process_start_tag().