php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
active_formatting.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Alexander Borisov
3 *
4 * Author: Alexander Borisov <borisov@lexbor.com>
5 */
6
7#ifndef LEXBOR_HTML_ACTIVE_FORMATTING_H
8#define LEXBOR_HTML_ACTIVE_FORMATTING_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include "lexbor/core/array.h"
15
16#include "lexbor/html/tree.h"
17
18
21
22void
24
25void
27 lxb_dom_node_t *node);
28
29bool
31 lxb_dom_node_t *node,
32 size_t *return_pos);
33
34bool
36 lxb_dom_node_t *node,
37 size_t *return_pos);
38
41
44 lxb_tag_id_t tag_idx,
45 size_t *return_idx);
46
47void
49 lxb_dom_node_t *node);
50
51
52/*
53 * Inline functions
54 */
57{
58 if (tree->active_formatting->length == 0) {
59 return NULL;
60 }
61
62 return (lxb_dom_node_t *) tree->active_formatting->list
63 [ (tree->active_formatting->length - 1) ];
64}
65
71
77
84
90
97
100 lxb_dom_node_t *node, size_t idx)
101{
102 return lexbor_array_insert(tree->active_formatting, idx, node);
103}
104
105lxb_inline void
110
111
112#ifdef __cplusplus
113} /* extern "C" */
114#endif
115
116#endif /* LEXBOR_HTML_ACTIVE_FORMATTING_H */
117
lxb_html_element_t * lxb_html_tree_active_formatting_marker(void)
bool lxb_html_tree_active_formatting_find_by_node_reverse(lxb_html_tree_t *tree, lxb_dom_node_t *node, size_t *return_pos)
lxb_inline lxb_dom_node_t * lxb_html_tree_active_formatting_first(lxb_html_tree_t *tree)
lxb_inline lxb_dom_node_t * lxb_html_tree_active_formatting_current_node(lxb_html_tree_t *tree)
void lxb_html_tree_active_formatting_remove_by_node(lxb_html_tree_t *tree, lxb_dom_node_t *node)
void lxb_html_tree_active_formatting_up_to_last_marker(lxb_html_tree_t *tree)
bool lxb_html_tree_active_formatting_find_by_node(lxb_html_tree_t *tree, lxb_dom_node_t *node, size_t *return_pos)
lxb_html_element_t * lxb_html_tree_active_formatting_marker(void)
lxb_dom_node_t * lxb_html_tree_active_formatting_between_last_marker(lxb_html_tree_t *tree, lxb_tag_id_t tag_idx, size_t *return_idx)
void lxb_html_tree_active_formatting_push_with_check_dupl(lxb_html_tree_t *tree, lxb_dom_node_t *node)
lxb_status_t lxb_html_tree_active_formatting_reconstruct_elements(lxb_html_tree_t *tree)
lxb_inline lxb_status_t lxb_html_tree_active_formatting_insert(lxb_html_tree_t *tree, lxb_dom_node_t *node, size_t idx)
lxb_inline lxb_dom_node_t * lxb_html_tree_active_formatting_get(lxb_html_tree_t *tree, size_t idx)
lxb_inline void lxb_html_tree_active_formatting_remove(lxb_html_tree_t *tree, size_t idx)
lxb_inline lxb_dom_node_t * lxb_html_tree_active_formatting_pop(lxb_html_tree_t *tree)
lxb_inline lxb_status_t lxb_html_tree_active_formatting_push(lxb_html_tree_t *tree, lxb_dom_node_t *node)
lxb_inline lxb_status_t lxb_html_tree_active_formatting_push_marker(lxb_html_tree_t *tree)
lxb_inline void * lexbor_array_get(lexbor_array_t *array, size_t idx)
Definition array.h:62
struct lxb_dom_node lxb_dom_node_t
Definition interface.h:38
void lexbor_array_delete(lexbor_array_t *array, size_t begin, size_t length)
Definition array.c:170
lxb_status_t lexbor_array_insert(lexbor_array_t *array, size_t idx, void *value)
Definition array.c:113
lxb_status_t lexbor_array_push(lexbor_array_t *array, void *value)
Definition array.c:87
void * lexbor_array_pop(lexbor_array_t *array)
Definition array.c:102
#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
size_t length
Definition array.h:20
void ** list
Definition array.h:18
lexbor_array_t * active_formatting
Definition tree.h:48
uintptr_t lxb_tag_id_t
Definition const.h:21
unsigned int lxb_status_t
Definition types.h:28
#define lxb_inline
Definition types.h:21