php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
after_after_frameset.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
8
9
10bool
12 lxb_html_token_t *token)
13{
14 switch (token->tag_id) {
16 lxb_dom_comment_t *comment;
17
18 comment = lxb_html_tree_insert_comment(tree, token,
20 if (comment == NULL) {
21 return lxb_html_tree_process_abort(tree);
22 }
23
24 break;
25 }
26
28 case LXB_TAG_HTML:
29 return lxb_html_tree_insertion_mode_in_body(tree, token);
30
33 if (tree->status != LXB_STATUS_OK) {
34 return lxb_html_tree_process_abort(tree);
35 }
36
37 break;
38
40 return lxb_html_tree_insertion_mode_in_head(tree, token);
41
42 case LXB_TAG__TEXT: {
43 lxb_html_token_t ws_token = *token;
44
46 if (tree->status != LXB_STATUS_OK) {
47 return lxb_html_tree_process_abort(tree);
48 }
49
50 if (ws_token.text_start == ws_token.text_end) {
51 return lxb_html_tree_insertion_mode_in_body(tree, token);
52 }
53 }
54 /* fall through */
55
56 default:
58
59 break;
60 }
61
62 return true;
63}
bool lxb_html_tree_insertion_mode_after_after_frameset(lxb_html_tree_t *tree, lxb_html_token_t *token)
@ LXB_STATUS_OK
Definition base.h:49
#define lxb_dom_interface_node(obj)
Definition interface.h:31
struct lxb_dom_comment lxb_dom_comment_t
Definition interface.h:49
#define NULL
Definition gdcache.h:45
struct lxb_html_tree lxb_html_tree_t
Definition base.h:28
lxb_status_t lxb_html_token_data_skip_ws_begin(lxb_html_token_t *token)
Definition token.c:179
@ LXB_HTML_RULES_ERROR_UNTO
Definition error.h:22
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_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_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
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_document_t * document
Definition tree.h:42
@ LXB_TAG__EM_DOCTYPE
Definition const.h:29
@ 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_NOFRAMES
Definition const.h:162
@ LXB_TAG__TEXT
Definition const.h:26