|
Hubbub
|
#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.
Macros | |
| #define | S(s) { s, sizeof s - 1 } |
| #define | S(s) (uint8_t *) s, sizeof s - 1 |
| #define | S(s) (uint8_t *) s, sizeof s - 1 |
Functions | |
| static bool | starts_with (const uint8_t *a, size_t a_len, const uint8_t *b, size_t b_len) |
| Check if one string starts with another. More... | |
| static bool | lookup_full_quirks (hubbub_treebuilder *treebuilder, const hubbub_doctype *cdoc) |
| Determine whether this doctype triggers full quirks mode. More... | |
| static bool | lookup_limited_quirks (hubbub_treebuilder *treebuilder, const hubbub_doctype *cdoc) |
| Determine whether this doctype triggers limited quirks mode. More... | |
| hubbub_error | handle_initial (hubbub_treebuilder *treebuilder, const hubbub_token *token) |
| Handle token in initial insertion mode. More... | |
Variables | |
| struct { | |
| const char * name | |
| size_t len | |
| } | public_doctypes [] |
| #define S | ( | s | ) | { s, sizeof s - 1 } |
Definition at line 19 of file initial.c.
Referenced by lookup_full_quirks(), and lookup_limited_quirks().
| hubbub_error handle_initial | ( | hubbub_treebuilder * | treebuilder, |
| const hubbub_token * | token | ||
| ) |
Handle token in initial insertion mode.
| treebuilder | The treebuilder instance |
| token | The token to handle |
Definition at line 214 of file initial.c.
References hubbub_tree_handler::append_child, BEFORE_HTML, hubbub_treebuilder::context, hubbub_tree_handler::create_doctype, hubbub_tree_handler::ctx, hubbub_token::data, hubbub_token::doctype, hubbub_treebuilder_context::document, hubbub_doctype::force_quirks, HUBBUB_OK, HUBBUB_QUIRKS_MODE_FULL, HUBBUB_QUIRKS_MODE_LIMITED, HUBBUB_REPROCESS, HUBBUB_TOKEN_CHARACTER, HUBBUB_TOKEN_COMMENT, HUBBUB_TOKEN_DOCTYPE, HUBBUB_TOKEN_END_TAG, HUBBUB_TOKEN_EOF, HUBBUB_TOKEN_START_TAG, lookup_full_quirks(), lookup_limited_quirks(), hubbub_treebuilder_context::mode, process_characters_expect_whitespace(), process_comment_append(), hubbub_tree_handler::set_quirks_mode, hubbub_treebuilder::tree_handler, hubbub_token::type, and hubbub_tree_handler::unref_node.
Referenced by hubbub_treebuilder_token_handler().
|
static |
Determine whether this doctype triggers full quirks mode.
| treebuilder | Treebuilder instance |
| cdoc | The doctype to examine |
Definition at line 109 of file initial.c.
References hubbub_string_match_ci(), len, hubbub_string::len, name, hubbub_doctype::name, hubbub_string::ptr, public_doctypes, hubbub_doctype::public_id, hubbub_doctype::public_missing, S, starts_with(), hubbub_doctype::system_id, hubbub_doctype::system_missing, and UNUSED.
Referenced by handle_initial().
|
static |
Determine whether this doctype triggers limited quirks mode.
| treebuilder | Treebuilder instance |
| cdoc | The doctype to examine |
Definition at line 176 of file initial.c.
References hubbub_string::len, hubbub_string::ptr, hubbub_doctype::public_id, S, starts_with(), hubbub_doctype::system_missing, and UNUSED.
Referenced by handle_initial().
|
static |
Check if one string starts with another.
| a | String to compare |
| a_len | Length of first string |
| b | String to compare |
| b_len | Length of second string |
Definition at line 91 of file initial.c.
References hubbub_string_match_ci().
Referenced by lookup_full_quirks(), and lookup_limited_quirks().
| size_t len |
Definition at line 23 of file initial.c.
Referenced by adjust_foreign_attributes(), adjust_mathml_attributes(), adjust_svg_attributes(), adjust_svg_tagname(), emit_current_chars(), handle_after_body(), handle_in_foreign_content(), hubbub_tokeniser_consume_character_reference(), hubbub_tokeniser_handle_after_attribute_name(), hubbub_tokeniser_handle_after_attribute_value_q(), hubbub_tokeniser_handle_after_doctype_name(), hubbub_tokeniser_handle_after_doctype_public(), hubbub_tokeniser_handle_after_doctype_system(), hubbub_tokeniser_handle_attribute_name(), hubbub_tokeniser_handle_attribute_value_dq(), hubbub_tokeniser_handle_attribute_value_sq(), hubbub_tokeniser_handle_attribute_value_uq(), hubbub_tokeniser_handle_before_attribute_name(), hubbub_tokeniser_handle_before_attribute_value(), hubbub_tokeniser_handle_before_doctype_name(), hubbub_tokeniser_handle_before_doctype_public(), hubbub_tokeniser_handle_before_doctype_system(), hubbub_tokeniser_handle_bogus_comment(), hubbub_tokeniser_handle_bogus_doctype(), hubbub_tokeniser_handle_cdata_block(), hubbub_tokeniser_handle_character_reference_data(), hubbub_tokeniser_handle_character_reference_in_attribute_value(), hubbub_tokeniser_handle_close_tag_open(), hubbub_tokeniser_handle_comment(), hubbub_tokeniser_handle_data(), hubbub_tokeniser_handle_doctype(), hubbub_tokeniser_handle_doctype_name(), hubbub_tokeniser_handle_doctype_public_dq(), hubbub_tokeniser_handle_doctype_public_sq(), hubbub_tokeniser_handle_doctype_system_dq(), hubbub_tokeniser_handle_doctype_system_sq(), hubbub_tokeniser_handle_markup_declaration_open(), hubbub_tokeniser_handle_match_cdata(), hubbub_tokeniser_handle_match_comment(), hubbub_tokeniser_handle_match_doctype(), hubbub_tokeniser_handle_match_public(), hubbub_tokeniser_handle_match_system(), hubbub_tokeniser_handle_named_entity(), hubbub_tokeniser_handle_numbered_entity(), hubbub_tokeniser_handle_self_closing_start_tag(), hubbub_tokeniser_handle_tag_name(), hubbub_tokeniser_handle_tag_open(), and lookup_full_quirks().
| const char* name |
Definition at line 22 of file initial.c.
Referenced by adjust_foreign_attributes(), adjust_mathml_attributes(), adjust_svg_attributes(), adjust_svg_tagname(), emit_current_tag(), handle_in_foreign_content(), hubbub_charset_parse_attributes(), hubbub_parser_read_charset(), lookup_full_quirks(), process_isindex_in_body(), and process_meta_in_head().
| struct { ... } public_doctypes[] |
Referenced by lookup_full_quirks().
1.8.8