php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
in_template.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2019 Alexander Borisov
3 *
4 * Author: Alexander Borisov <borisov@lexbor.com>
5 */
6
11
12
13/*
14 * "caption", "colgroup", "tbody", "tfoot", "thead"
15 */
16lxb_inline bool
32
33lxb_inline bool
49
50lxb_inline bool
66
67/*
68 * "td", "th"
69 */
70lxb_inline bool
86
87lxb_inline bool
115
116lxb_inline bool
132
133bool
135 lxb_html_token_t *token)
136{
137 if (token->type & LXB_HTML_TOKEN_TYPE_CLOSE) {
138 if (token->tag_id == LXB_TAG_TEMPLATE) {
139 return lxb_html_tree_insertion_mode_in_head(tree, token);
140 }
141
143
144 return true;
145 }
146
147 switch (token->tag_id) {
148 case LXB_TAG__TEXT:
151 return lxb_html_tree_insertion_mode_in_body(tree, token);
152
153 case LXB_TAG_BASE:
154 case LXB_TAG_BASEFONT:
155 case LXB_TAG_BGSOUND:
156 case LXB_TAG_LINK:
157 case LXB_TAG_META:
158 case LXB_TAG_NOFRAMES:
159 case LXB_TAG_SCRIPT:
160 case LXB_TAG_STYLE:
161 case LXB_TAG_TEMPLATE:
162 case LXB_TAG_TITLE:
163 return lxb_html_tree_insertion_mode_in_head(tree, token);
164
165 case LXB_TAG_CAPTION:
166 case LXB_TAG_COLGROUP:
167 case LXB_TAG_TBODY:
168 case LXB_TAG_TFOOT:
169 case LXB_TAG_THEAD:
171
172 case LXB_TAG_COL:
174
175 case LXB_TAG_TR:
177
178 case LXB_TAG_TD:
179 case LXB_TAG_TH:
181
184 token);
185 default:
187 token);
188 }
189}
void lxb_html_tree_active_formatting_up_to_last_marker(lxb_html_tree_t *tree)
@ LXB_STATUS_OK
Definition base.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
@ LXB_HTML_TOKEN_TYPE_CLOSE
Definition token.h:27
@ LXB_HTML_RULES_ERROR_UNCLTO
Definition error.h:24
@ LXB_HTML_RULES_ERROR_UNENOFFI
Definition error.h:78
bool lxb_html_tree_insertion_mode_in_template(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_template_anything_else(lxb_html_tree_t *tree, lxb_html_token_t *token)
lxb_inline bool lxb_html_tree_insertion_mode_in_template_col(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_template.c:34
lxb_inline bool lxb_html_tree_insertion_mode_in_template_tdth(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_template.c:71
lxb_inline bool lxb_html_tree_insertion_mode_in_template_tr(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_template.c:51
lxb_inline bool lxb_html_tree_insertion_mode_in_template_end_of_file(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_template.c:88
lxb_inline bool lxb_html_tree_insertion_mode_in_template_ct(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_template.c:17
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_body(lxb_html_tree_t *tree, lxb_html_token_t *token)
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_row(lxb_html_tree_t *tree, lxb_html_token_t *token)
Definition in_row.c:162
LXB_API bool lxb_html_tree_insertion_mode_in_column_group(lxb_html_tree_t *tree, lxb_html_token_t *token)
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_status_t lxb_html_tree_stop_parsing(lxb_html_tree_t *tree)
Definition tree.c:216
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
void lxb_html_tree_reset_insertion_mode_appropriately(lxb_html_tree_t *tree)
Definition tree.c:999
@ LXB_NS_HTML
Definition const.h:26
lxb_dom_node_t * lxb_html_tree_open_elements_find(lxb_html_tree_t *tree, lxb_tag_id_t tag_id, lxb_ns_id_t ns, size_t *return_index)
void lxb_html_tree_open_elements_pop_until_tag_id(lxb_html_tree_t *tree, lxb_tag_id_t tag_id, lxb_ns_id_t ns, bool exclude)
lxb_html_token_type_t type
Definition token.h:49
lxb_tag_id_t tag_id
Definition token.h:48
lxb_status_t status
Definition tree.h:66
lxb_html_tree_insertion_mode_f mode
Definition tree.h:62
@ LXB_TAG__EM_DOCTYPE
Definition const.h:29
@ LXB_TAG_COL
Definition const.h:64
@ LXB_TAG_TEMPLATE
Definition const.h:203
@ LXB_TAG_TITLE
Definition const.h:210
@ LXB_TAG__END_OF_FILE
Definition const.h:25
@ LXB_TAG_TD
Definition const.h:202
@ LXB_TAG_THEAD
Definition const.h:208
@ LXB_TAG_BGSOUND
Definition const.h:51
@ LXB_TAG__EM_COMMENT
Definition const.h:28
@ LXB_TAG_CAPTION
Definition const.h:59
@ LXB_TAG_BASEFONT
Definition const.h:48
@ LXB_TAG_META
Definition const.h:148
@ LXB_TAG_TBODY
Definition const.h:201
@ LXB_TAG_COLGROUP
Definition const.h:65
@ LXB_TAG_BASE
Definition const.h:47
@ LXB_TAG_SCRIPT
Definition const.h:185
@ LXB_TAG_LINK
Definition const.h:139
@ LXB_TAG_TFOOT
Definition const.h:206
@ LXB_TAG_TH
Definition const.h:207
@ LXB_TAG_STYLE
Definition const.h:195
@ LXB_TAG_TR
Definition const.h:211
@ LXB_TAG_NOFRAMES
Definition const.h:162
@ LXB_TAG__TEXT
Definition const.h:26
lxb_inline lxb_status_t lxb_html_tree_template_insertion_push(lxb_html_tree_t *tree, lxb_html_tree_insertion_mode_f mode)
lxb_inline lxb_html_tree_insertion_mode_f lxb_html_tree_template_insertion_pop(lxb_html_tree_t *tree)
#define lxb_inline
Definition types.h:21