php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
in_column_group.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2020 Alexander Borisov
3 *
4 * Author: Alexander Borisov <borisov@lexbor.com>
5 */
6
9
10
11lxb_inline bool
30
31lxb_inline bool
33 lxb_html_token_t *token)
34{
35 lxb_html_token_t ws_token = {0};
36
37 tree->status = lxb_html_token_data_split_ws_begin(token, &ws_token);
38 if (tree->status != LXB_STATUS_OK) {
39 return lxb_html_tree_process_abort(tree);
40 }
41
42 if (ws_token.text_start != ws_token.text_end) {
43 tree->status = lxb_html_tree_insert_character(tree, &ws_token, NULL);
44 if (tree->status != LXB_STATUS_OK) {
45 return lxb_html_tree_process_abort(tree);
46 }
47 }
48
49 if (token->text_start == token->text_end) {
50 return true;
51 }
52
54 token);
55}
56
57lxb_inline bool
59 lxb_html_token_t *token)
60{
61 lxb_dom_comment_t *comment;
62
63 comment = lxb_html_tree_insert_comment(tree, token, NULL);
64 if (comment == NULL) {
66
67 return lxb_html_tree_process_abort(tree);
68 }
69
70 return true;
71}
72
73lxb_inline bool
79
80lxb_inline bool
82 lxb_html_token_t *token)
83{
84 lxb_html_element_t *element;
85
86 element = lxb_html_tree_insert_html_element(tree, token);
87 if (element == NULL) {
89
90 return lxb_html_tree_process_abort(tree);
91 }
92
95
96 return true;
97}
98
99lxb_inline bool
118
119lxb_inline bool
127
128lxb_inline bool
134
135lxb_inline bool
141
142lxb_inline bool
148
149bool
@ LXB_STATUS_ERROR_MEMORY_ALLOCATION
Definition base.h:51
@ LXB_STATUS_OK
Definition base.h:49
struct lxb_dom_comment lxb_dom_comment_t
Definition interface.h:49
struct lxb_dom_node lxb_dom_node_t
Definition interface.h:38
#define NULL
Definition gdcache.h:45
struct lxb_html_tree lxb_html_tree_t
Definition base.h:28
struct lxb_html_element lxb_html_element_t
Definition interface.h:111
lxb_status_t lxb_html_token_data_split_ws_begin(lxb_html_token_t *token, lxb_html_token_t *ws_token)
Definition token.c:232
@ LXB_HTML_TOKEN_TYPE_CLOSE
Definition token.h:27
@ LXB_HTML_RULES_ERROR_UNCLTO
Definition error.h:24
@ LXB_HTML_RULES_ERROR_MIELINOPELST
Definition error.h:68
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_colgroup_closed(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_col(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_end_of_file(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_col_closed(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_html(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_anything_else(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_anything_else_closed(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_comment(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_template_open_closed(lxb_html_tree_t *tree, lxb_html_token_t *token)
bool lxb_html_tree_insertion_mode_in_column_group(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_column_group_text(lxb_html_tree_t *tree, lxb_html_token_t *token)
LXB_API bool lxb_html_tree_insertion_mode_in_head(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_head.c:41
LXB_API bool lxb_html_tree_insertion_mode_in_table(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_table.c:371
LXB_API bool lxb_html_tree_insertion_mode_in_body(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_body.c:1685
bool lxb_html_tree_process_abort(lxb_html_tree_t *tree)
Definition tree.c:224
lxb_dom_comment_t * lxb_html_tree_insert_comment(lxb_html_tree_t *tree, lxb_html_token_t *token, lxb_dom_node_t *pos)
Definition tree.c:790
lxb_status_t lxb_html_tree_insert_character(lxb_html_tree_t *tree, lxb_html_token_t *token, lxb_dom_node_t **ret_node)
Definition tree.c:669
void lxb_html_tree_parse_error(lxb_html_tree_t *tree, lxb_html_token_t *token, lxb_html_tree_error_id_t id)
Definition tree.c:237
lxb_inline lxb_dom_node_t * lxb_html_tree_open_elements_pop(lxb_html_tree_t *tree)
lxb_html_token_type_t type
Definition token.h:49
const lxb_char_t * text_end
Definition token.h:40
lxb_tag_id_t tag_id
Definition token.h:48
const lxb_char_t * text_start
Definition token.h:39
lxb_status_t status
Definition tree.h:66
lxb_html_tree_insertion_mode_f mode
Definition tree.h:62
@ LXB_TAG_COL
Definition const.h:64
@ LXB_TAG_TEMPLATE
Definition const.h:203
@ LXB_TAG__END_OF_FILE
Definition const.h:25
@ LXB_TAG_HTML
Definition const.h:125
@ LXB_TAG__EM_COMMENT
Definition const.h:28
@ LXB_TAG_COLGROUP
Definition const.h:65
@ LXB_TAG__TEXT
Definition const.h:26
lxb_inline lxb_dom_node_t * lxb_html_tree_current_node(lxb_html_tree_t *tree)
Definition tree.h:286
lxb_inline void lxb_html_tree_acknowledge_token_self_closing(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition tree.h:327
lxb_inline bool lxb_html_tree_node_is(lxb_dom_node_t *node, lxb_tag_id_t tag_id)
Definition tree.h:280
lxb_inline lxb_html_element_t * lxb_html_tree_insert_html_element(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition tree.h:307
#define lxb_inline
Definition types.h:21